BGE: Save Change id on grid edit

BGE: Save Change id on step edit
BGE: Added user interface for modifying current change id
BGE: Added menu item for removing change ids (no supporting code yet – the actual code to remove ids needs to be developed)
BGE: If format uses ‘ChangeIds’, then use the data from the changed step config for printing the change bar data.
This commit is contained in:
2014-05-07 13:43:07 +00:00
parent b48a813a85
commit c0c9c8e314
7 changed files with 275 additions and 218 deletions

View File

@@ -55,9 +55,12 @@ namespace Volian.Controls.Library
ToggleTableDesignButtons(true);
MyFlexGrid_SelChange(this, new EventArgs());
}
}
else
MyStepRTB = null;
if (rtabChgId.Visible)
txtBxChgId.Text = (this.Parent as StepTabPanel).MyDisplayTabControl.ChgId;
}
}
// added jcb 20121221 to support set ro from word doc
@@ -593,6 +596,8 @@ namespace Volian.Controls.Library
public StepTabRibbon()
{
InitializeComponent();
SetChangeIdRibbon();
EnableROEdit = true;
_RibbonControl.AutoSize = true;
_RibbonControl.SizeChanged += new EventHandler(_RibbonControl_SizeChanged);
@@ -889,6 +894,17 @@ namespace Volian.Controls.Library
// Can't replace step with same step
if (tmp.MyDisplayTabControl.MyCopyStep.ItemID == MyItemInfo.ItemID) btnPasteReplace.Enabled = false;
}
private void SetChangeIdRibbon()
{
if (MyItemInfo == null)
{
FolderInfo fi = FolderInfo.Get(1);
FormatInfo frmI = FormatInfo.Get(fi.FormatID ?? 1);
rtabChgId.Visible = frmI.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit;
}
else
rtabChgId.Visible = MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds;
}
private void SetStepButtonAndMenuEnabling(bool docontextmenus)
{
if (MyEditItem == null) return;
@@ -2748,7 +2764,10 @@ namespace Volian.Controls.Library
_PasteStepTextOvrRide = true;
btnPaste_Click(sender, e);
}
private void btnSaveChgId_Click(object sender, EventArgs e)
{
(this.Parent as StepTabPanel).MyDisplayTabControl.ChgId = txtBxChgId.Text;
}
}
public enum E_FieldToEdit { StepText, Text, Number, PSI };
public class StepTabRibbonEventArgs : EventArgs