Added ‘UseSpecificPageNo’ for printing of explicit page number transitions

Use ‘UseSpecificPageNo’ for printing of explicit page number transitions
Allow Change Id for each procedure (not one for entire session). Request from Calvert.
Implement ‘UseSpecificPageNo’ flag.
Added ‘UseSpecificPageNo’ flag
Change Id dialog (moved from VEPROMS UI)
This commit is contained in:
2014-07-02 13:14:33 +00:00
parent b1740f888c
commit f9bfbea84a
12 changed files with 343 additions and 15 deletions

View File

@@ -81,6 +81,15 @@ namespace Volian.Controls.Library
/// A bar is the docking location for the DisplayTabItems.
/// </summary>
private int _UniqueBarCount;
/// <summary>
/// ItemsChangeIds is used to store a procedure's itemid and its associated (input from dialog)
/// Change Id. Any time a user enters a procedure for the first time in this program session,
/// the user gets prompted to enter a change id. Any time a modification is made to the procedure
/// this change id is used. The user can modify this change id from the step tab ribbon/change id
/// tab (only if the format uses change ids is this tab visible).
/// </summary>
public Dictionary<int, string> ItemsChangeIds = null;
private ItemInfo _MyItemInfo = null;
private EditItem _MyEditItem = null;
private StepRTB _MyStepRTB = null;
@@ -282,6 +291,7 @@ namespace Volian.Controls.Library
}
private void SetUp()
{
ItemsChangeIds = new Dictionary<int, string>();
_RemovedDisplayTabItems = new List<DisplayTabItem>();
Dock = DockStyle.Fill;
dotNetBarManager1.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
@@ -823,6 +833,7 @@ namespace Volian.Controls.Library
{
pg = _MyDisplayTabItems[key];
pg.Selected = true;
HandleChangeId(myItemInfo, pg);
if (SelectedDisplayTabItem != pg) // If the selected page doesn't match
SelectDisplayTabItem(pg); // Set the selected page
}
@@ -831,6 +842,7 @@ namespace Volian.Controls.Library
pg = new DisplayTabItem(this.components, this, proc, key); // Open a new Procedure Tab
_MyDisplayTabItems.Add(key, pg);
pg.Selected = true;
HandleChangeId(myItemInfo, pg);
SelectDisplayTabItem(pg);
pg.MyStepTabPanel.MyProcedureItemInfo = proc;
@@ -847,6 +859,33 @@ namespace Volian.Controls.Library
pg.SelectedItemInfo = myItemInfo; // Select the item
return pg;
}
public void HandleChangeId(ItemInfo myItemInfo, DisplayTabItem pg)
{
if (myItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
{
if (ItemsChangeIds.ContainsKey(myItemInfo.MyProcedure.ItemID)) SetChangeId(ItemsChangeIds[myItemInfo.MyProcedure.ItemID], pg);
else PromptForChangeId(myItemInfo, pg);
}
}
private void PromptForChangeId(ItemInfo myItemInfo, DisplayTabItem pg)
{
dlgChgId dlgCI = new dlgChgId(this);
dlgCI.ShowDialog(this);
ItemsChangeIds.Add(myItemInfo.MyProcedure.ItemID, ChgId);
SetChangeId(ChgId, pg);
}
private void SetChangeId(string chgid, DisplayTabItem pg)
{
if (pg == null || pg.MyStepTabPanel == null)
{
ChgId = null;
return;
}
pg.MyStepTabPanel.MyStepTabRibbon.SetChangeId(chgid);
ChgId = chgid;
}
/// <summary>
/// This opens a Word page based upon an itemInfo. Since a word document may be a library
/// document, the related DocID is used for the Word document.