Use StepRTB for number and title

handle dash
This commit is contained in:
2009-07-24 21:35:59 +00:00
parent cf69fdd572
commit 7af7d8d4ef
8 changed files with 2951 additions and 2786 deletions

View File

@@ -8,6 +8,7 @@ using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using VEPROMS.Properties;
using DevComponents.DotNetBar;
using Volian.Controls.Library;
namespace VEPROMS
{
@@ -17,19 +18,41 @@ namespace VEPROMS
private bool _Initializing;
private SectionConfig _SectionConfig;
private Document _DocumentToDelete = null;
private StepTabRibbon _MyStepTabRibbon;
public frmSectionProperties(SectionConfig sectionConfig)
{
_SectionConfig = sectionConfig;
InitializeComponent();
btnGeneral.PerformClick(); // always start with General tab or button
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
//if (sectionConfig.Number.Length > 0)
// this.Text = string.Format("{0} {1} Properties", sectionConfig.Number, sectionConfig.Title);
//else
// this.Text = string.Format("{0} Properties", sectionConfig.Title);
if (sectionConfig.Number.Length > 0)
this.Text = string.Format("{0} {1} Properties", sectionConfig.Number, sectionConfig.Title);
this.Text = string.Format("{0} {1} Properties", ii.DisplayNumber, ii.DisplayText);
else
this.Text = string.Format("{0} Properties", sectionConfig.Title);
this.Text = string.Format("{0} Properties", ii.DisplayText);
ppSectTitleStpRTB.FieldToEdit = E_FieldToEdit.Text;
ppSectTitleStpRTB.BorderStyle = BorderStyle.Fixed3D;
ppSectTitleStpRTB.ViewRTB = false;
ppSectTitleStpRTB.MyItemInfo = ii;
ppSectNumberStpRTB.FieldToEdit = E_FieldToEdit.Number;
ppSectNumberStpRTB.BorderStyle = BorderStyle.Fixed3D;
ppSectNumberStpRTB.ViewRTB = false;
ppSectNumberStpRTB.MyItemInfo = ii;
_MyStepTabRibbon = new StepTabRibbon();
//_MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
//_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
_MyStepTabRibbon.Name = "displayTabRibbon1";
_MyStepTabRibbon.Visible = false;
// set up some of the format tab:
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
cbIsStepSection.Enabled = !(ii.HasWordContent || ii.HasStepContent);
// check type of section from document styles to determine if the stepsection checkbox should
// be checked.
@@ -62,6 +85,8 @@ namespace VEPROMS
Document.Delete(_DocumentToDelete.DocID);
_DocumentToDelete = null;
}
ppSectNumberStpRTB.SaveText();
ppSectTitleStpRTB.SaveText();
this.Close();
}
private void btnSectPropCancel_Click(object sender, EventArgs e)
@@ -457,6 +482,16 @@ namespace VEPROMS
defaultSettingsVisiblity();
}
#endregion
private void ppSectNumberStpRTB_Enter(object sender, EventArgs e)
{
_MyStepTabRibbon.MyStepRTB = ppSectNumberStpRTB;
}
private void ppSectTitleStpRTB_Enter(object sender, EventArgs e)
{
_MyStepTabRibbon.MyStepRTB = ppSectTitleStpRTB;
}
}