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

@@ -10,6 +10,7 @@ using VEPROMS.Properties;
using DescriptiveEnum;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Controls;
using Volian.Controls.Library;
namespace VEPROMS
{
@@ -26,6 +27,7 @@ namespace VEPROMS
private string _DefaultFormatColumns = null;
private bool _Initializing;
private ProcedureConfig _ProcedureConfig;
private StepTabRibbon _MyStepTabRibbon;
public frmProcedureProperties(ProcedureConfig procedureConfig)
{
@@ -35,8 +37,24 @@ namespace VEPROMS
btnGeneral.PerformClick(); // always start with General tab or button
_Initializing = false;
// build the title bar caption
this.Text = string.Format("{0} {1} Properties", procedureConfig.Number, procedureConfig.Title);
}
//this.Text = string.Format("{0} {1} Properties", procedureConfig.Number, procedureConfig.Title);
ItemInfo itmInfo = ItemInfo.Get(_ProcedureConfig.MyProcedure.ItemID);
this.Text = string.Format("{0} {1} Properties", itmInfo.DisplayNumber, itmInfo.DisplayText);
ppProcTitleStpRTB.FieldToEdit = E_FieldToEdit.Text;
ppProcTitleStpRTB.BorderStyle = BorderStyle.Fixed3D;
ppProcTitleStpRTB.ViewRTB = false;
ppProcTitleStpRTB.MyItemInfo = itmInfo;
ppProcNumStpRTB.FieldToEdit = E_FieldToEdit.Number;
ppProcNumStpRTB.BorderStyle = BorderStyle.Fixed3D;
ppProcNumStpRTB.ViewRTB = false;
ppProcNumStpRTB.MyItemInfo = itmInfo;
_MyStepTabRibbon = new StepTabRibbon();
//_MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
//_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
_MyStepTabRibbon.Name = "displayTabRibbon1";
_MyStepTabRibbon.Visible = false;
}
private void ppBtnOK_Click(object sender, EventArgs e)
{
@@ -48,7 +66,9 @@ namespace VEPROMS
Settings.Default.ShowDefaultProcedureProp = ppCbShwDefSettings.Checked;
Settings.Default.Save();
_ProcedureConfig.MyProcedure.Save().Dispose();
this.Close();
ppProcTitleStpRTB.SaveText();
ppProcNumStpRTB.SaveText();
this.Close();
}
private void ppBtnCancel_Click(object sender, EventArgs e)
@@ -549,5 +569,15 @@ namespace VEPROMS
deflabel.Visible = ppCbShwDefSettings.Checked && button.Visible;
}
#endregion
private void ppProcTitleStpRTB_Enter(object sender, EventArgs e)
{
_MyStepTabRibbon.MyStepRTB = ppProcTitleStpRTB;
}
private void ppProcNumStpRTB_Enter(object sender, EventArgs e)
{
_MyStepTabRibbon.MyStepRTB = ppProcNumStpRTB;
}
}
}