|
|
|
@@ -359,7 +359,8 @@ namespace VEPROMS
|
|
|
|
|
public bool PauseRefresh
|
|
|
|
|
{
|
|
|
|
|
get { return _PauseRefresh; }
|
|
|
|
|
set {
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
//_MyLog.WarnFormat(value ? "=== Pause" : "=== UnPause");
|
|
|
|
|
_PauseRefresh = value;
|
|
|
|
|
}
|
|
|
|
@@ -437,6 +438,20 @@ namespace VEPROMS
|
|
|
|
|
displayBookMarks.ResetBookMarksInPROMSWindows += displayBookMarks_ResetBookMarksInPROMSWindows;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Part of Separate Windows upgrade C2015-022
|
|
|
|
|
// Extend changeds to BookMark information to all of the child windows
|
|
|
|
|
void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
|
|
|
|
|
{
|
|
|
|
|
foreach (int k in PROMSWindowForms.Keys)
|
|
|
|
|
{
|
|
|
|
|
frmVEPROMS tmp = PROMSWindowForms[k];
|
|
|
|
|
if (tmp.MyDocVersion.VersionID != this.SelectedDVI.VersionID)
|
|
|
|
|
tmp.displayBookMarks.ResetBookMarkList();
|
|
|
|
|
else if (tmp.MyParent != null)
|
|
|
|
|
tmp.MyParent.displayBookMarks.ResetBookMarkList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Part of Separate Windows upgrade C2015-022
|
|
|
|
|
// Extend changeds to BookMark information to all of the child windows
|
|
|
|
|
void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
|
|
|
|
@@ -511,7 +526,7 @@ namespace VEPROMS
|
|
|
|
|
void tv_NodeCopy(object sender, vlnTreeEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
VETreeNode tn = args.Node as VETreeNode;
|
|
|
|
|
ItemInfo ii = tn.VEObject as ItemInfo;
|
|
|
|
|
ItemInfo ii = tn.VEObject as ItemInfo;?
|
|
|
|
|
tc.MyCopyStep = ii;
|
|
|
|
|
tc_CopyStepSelected(sender, null); // C2015-022 set copy step info in the child windows
|
|
|
|
|
}
|
|
|
|
@@ -906,7 +921,7 @@ namespace VEPROMS
|
|
|
|
|
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
|
|
|
|
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
|
|
|
|
|
if (pi == null) return;
|
|
|
|
|
// B2017-242 added check for duplicate procedure numbers in a procedure set
|
|
|
|
|
// B2017-242 added check for duplicate procedure numbers in a procedure set?
|
|
|
|
|
if (DuplicateProcedureNumbers(pi.MyDocVersion, pi))
|
|
|
|
|
{
|
|
|
|
|
// C2020-036 display list of duplicate procedure numbers
|
|
|
|
@@ -1044,23 +1059,27 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
tmrTreeView.Enabled = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int _LastROFSTID = 0;
|
|
|
|
|
|
|
|
|
|
void frmVEPROMS_Activated(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (ActiveControl == tc) tc.HideCaret();
|
|
|
|
|
// refresh anything that pertains to external files or programs:
|
|
|
|
|
|
|
|
|
|
// if ro.fst was 'updated' from the roeditor, enable the update ro.fst values on
|
|
|
|
|
// the steptabribbon.
|
|
|
|
|
// if ro.fst was 'updated' from the roeditor, enable the update ro.fst values on the stepRibbon
|
|
|
|
|
if (tc.ShuttingDown) return;
|
|
|
|
|
|
|
|
|
|
// B2017-202 update the RO tree in the step properties panel
|
|
|
|
|
// B2017-205 - displayRO.MyROFST will be null if first thing opened is a Word section so added null check
|
|
|
|
|
if (tc.MyBar.SelectedDockTab > -1 && displayRO.MyROFST != null)
|
|
|
|
|
{
|
|
|
|
|
DisplayTabItem myDTI = tc.MyBar.Items[tc.MyBar.SelectedDockTab] as DisplayTabItem;
|
|
|
|
|
|
|
|
|
|
if (myDTI.MyDSOTabPanel != null)
|
|
|
|
|
{
|
|
|
|
|
DSOTabPanel myDTP = myDTI.MyDSOTabPanel;
|
|
|
|
|
|
|
|
|
|
if (myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations == null)
|
|
|
|
|
{
|
|
|
|
|
SelectedROFst = null; // B2020-071 ROs are not associated with this procedure set. Set value to null so that PROMS does not try to generate the RO tree in Step Properties.
|
|
|
|
@@ -1068,29 +1087,22 @@ namespace VEPROMS
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
|
|
|
|
if (_LastROFSTID != SelectedROFst.ROFstID) // B2017-240 Only refresh when the ROFSTID is different
|
|
|
|
|
{
|
|
|
|
|
_LastROFSTID = SelectedROFst.ROFstID;
|
|
|
|
|
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
|
|
|
|
|
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayRO.RefreshRoTree();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)
|
|
|
|
|
{
|
|
|
|
|
SelectedROFst = tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
|
|
|
|
if (_LastROFSTID != SelectedROFst.ROFstID)// B2017-240 Only refresh when the ROFSTID is different
|
|
|
|
|
{
|
|
|
|
|
_LastROFSTID = SelectedROFst.ROFstID;
|
|
|
|
|
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
|
|
|
|
|
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayRO.RefreshRoTree();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// need this to update RO Tree after UpdateRofst (B2015-226)
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.MyROFST = SelectedROFst;
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (SelectedStepTabPanel != null && SelectedStepTabPanel.MyStepTabRibbon != null)
|
|
|
|
|
SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst());
|
|
|
|
|
|
|
|
|
|
// C2015-022 needed when creating a separate window from a tree selection
|
|
|
|
|
if (selectedChildWindow != null)
|
|
|
|
|
{
|
|
|
|
@@ -1098,12 +1110,14 @@ namespace VEPROMS
|
|
|
|
|
selectedChildWindow = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add a tree node for a procedure if this is the first procedure in the docversion, added from
|
|
|
|
|
// step editor (used for creating enhanced procedure in empty docversion)
|
|
|
|
|
void MyStepTabRibbon_AddProcToDocVersionInTree(object sender, StepTabRibbonEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
tv.AdjustTree(args.Proc as ProcedureInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MyStepTabRibbon_PrintRequest(object sender, StepTabRibbonEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// Fix for B2013-173:
|
|
|
|
@@ -1129,6 +1143,7 @@ namespace VEPROMS
|
|
|
|
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
|
|
|
|
//end added by jcb 20130718
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void displaySearch1_PrintRequest(object sender, DisplaySearchEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// C2020-002 paper size is now set in the format files - default is Letter, pass this PDFReport
|
|
|
|
@@ -1171,20 +1186,20 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROSummaryReport.pdf", args.RofstLookup, args.ROListForReport, args.PaperSize);
|
|
|
|
|
myReport.Build();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool tv_InsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// Don't select the newly created Step. This will be handled by tmrTreeView
|
|
|
|
|
return tc.InsertRTBItem(args.MyItemInfo, args.StepText, args.InsertType, args.FromType, args.Type, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool tv_DeleteItemInfo(object sender, vlnTreeItemInfoEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (displayHistory.MyEditItem != null && displayHistory.MyItemInfo.MyProcedure.ItemID == args.MyItemInfo.ItemID)
|
|
|
|
|
displayHistory.MyEditItem = null;
|
|
|
|
|
|
|
|
|
|
// bug fix B2016-005 - set MyCopyStep to null. This will take the paste options off of the tree node context menus. jsj 4-19-2016
|
|
|
|
|
// B2016-105 - added null reference check -jsj
|
|
|
|
|
if (tc.MyCopyStep != null && args.MyItemInfo.ItemID == tc.MyCopyStep.ItemID)
|
|
|
|
@@ -1192,20 +1207,24 @@ namespace VEPROMS
|
|
|
|
|
tc.MyCopyStep = null;
|
|
|
|
|
tc_CopyStepSelected(sender, null); // C2015-022 update copystep info in the child windows
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool rtval = tc.DeleteRTBItem(args.MyItemInfo);
|
|
|
|
|
|
|
|
|
|
// Also disable the paste options on the ribbon if it is open. jsj 4-19-2016
|
|
|
|
|
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment
|
|
|
|
|
{
|
|
|
|
|
StepPanel pnl = tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepPanel;
|
|
|
|
|
if (pnl != null)
|
|
|
|
|
pnl.MyStepTabPanel.MyStepTabRibbon.SetPasteButtons(false);
|
|
|
|
|
if (pnl != null) pnl.MyStepTabPanel.MyStepTabRibbon.SetPasteButtons(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return rtval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool tv_PasteItemInfo(object sender, vlnTreeItemInfoPasteEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
return tc.PasteRTBItem(args.MyItemInfo, args.CopyStartID, args.PasteType, (int)args.Type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// C2020-033: Display the search panel with Incoming Transition info for the tree view
|
|
|
|
|
// and for the editor.
|
|
|
|
|
private ItemInfo tv_SearchIncTrans(object sender, vlnTreeItemInfoEventArgs args)
|
|
|
|
@@ -1215,6 +1234,7 @@ namespace VEPROMS
|
|
|
|
|
displaySearch1.UpdateSearchIncTransResults();
|
|
|
|
|
return args.MyItemInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private ItemInfo tc_SearchIncTrans(object sender, vlnTreeItemInfoEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
displaySearch1.SearchIncTransII = args.MyItemInfo;
|
|
|
|
@@ -1222,9 +1242,11 @@ namespace VEPROMS
|
|
|
|
|
displaySearch1.UpdateSearchIncTransResults();
|
|
|
|
|
return args.MyItemInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _RemoveFromPROMSWindowForms = true;
|
|
|
|
|
public bool ClosingWithError = false; // B2019-098: prevent looping between error & exit dialog
|
|
|
|
|
private bool _WeAreExitingPROMS = false; // B2019-101 if exiting PROMS from main window don't prompt on each child window (separate windows)
|
|
|
|
|
|
|
|
|
|
private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// B2017-212 If the user uses the X button in Word to close the word attachment, PROMS thinks that the user wants to close out of PROMS as well
|
|
|
|
@@ -1243,6 +1265,7 @@ namespace VEPROMS
|
|
|
|
|
dctoe.Close();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string stk = Volian.Base.Library.vlnStackTrace.StackToString();
|
|
|
|
|
if (!stk.Contains("Exception"))
|
|
|
|
|
{
|
|
|
|
@@ -1271,19 +1294,22 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
//C2015-022 Separate Windows - if child windows are open and we are closing the main PROMS window, give user a chance to not close PROMS and that child windows
|
|
|
|
|
// B2019-101 if we are exiting from PROMS main window no need to prompt user about child windows.
|
|
|
|
|
if (MyParent == null && PROMSWindowForms.Count > 0 && !_WeAreExitingPROMS)
|
|
|
|
|
if (MyParent == null && PROMSWindowForms.Count > 0 && !_WeAreExitingPROMS)?
|
|
|
|
|
{
|
|
|
|
|
DialogResult dr = MessageBox.Show("Close all of the child windows and exit PROMS?", "Exit PROMS", MessageBoxButtons.YesNo);
|
|
|
|
|
DialogResult dr = MessageBox.Show("Close all of the child windows and exit PROMS?", "Exit PROMS", MessageBoxButtons.YesNo);?
|
|
|
|
|
if (dr == System.Windows.Forms.DialogResult.No)
|
|
|
|
|
{
|
|
|
|
|
e.Cancel = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tc.ShuttingDown = true; // This keeps PROMS from Hanging under certain circumstances
|
|
|
|
|
|
|
|
|
|
// B2019-161 When shutting down output the timing information (to the error log)
|
|
|
|
|
if (VolianTimer.TimingsOn)
|
|
|
|
|
VolianTimer.ShowTimers();
|
|
|
|
|
|
|
|
|
|
foreach (DisplayTabItem dti in tc.MyBar.Items)
|
|
|
|
|
{
|
|
|
|
|
if (dti.MyDSOTabPanel != null)
|
|
|
|
@@ -1291,6 +1317,7 @@ namespace VEPROMS
|
|
|
|
|
else
|
|
|
|
|
MySessionInfo.CheckInItem(dti.OwnerID); //C2015-022 Separate Windows closing child form only left procedure ownership active
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//_MyLog.WarnFormat("frmVEPROMS_FormClosing");
|
|
|
|
|
if (MyParent == null)
|
|
|
|
|
{
|
|
|
|
@@ -1299,6 +1326,7 @@ namespace VEPROMS
|
|
|
|
|
MyActivityTimer.Dispose();
|
|
|
|
|
_MyLog.Debug("VEPROMS FormClosing - dispose timer");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// part of separate windows upgrade C2015-022
|
|
|
|
|
// close all of the child windows before closing the main PROMS window
|
|
|
|
|
if (PROMSWindowForms != null && PROMSWindowForms.Count > 0)
|
|
|
|
@@ -1313,28 +1341,35 @@ namespace VEPROMS
|
|
|
|
|
child.MySessionInfo.EndSession();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (MySessionInfo != null) MySessionInfo.EndSession();
|
|
|
|
|
|
|
|
|
|
// Save the location and size of the VE-PROMS appication for this user
|
|
|
|
|
if (this.WindowState == FormWindowState.Normal)
|
|
|
|
|
{
|
|
|
|
|
Settings.Default.Location = this.Location;
|
|
|
|
|
Settings.Default.Size = this.Size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.MyVersionWindowList != null)
|
|
|
|
|
Settings.Default.VersionWindows = this.MyVersionWindowList.ToSettings();
|
|
|
|
|
|
|
|
|
|
Settings.Default.WindowState = this.WindowState;
|
|
|
|
|
Settings.Default.QATItems = ribbonControl1.QatLayout;
|
|
|
|
|
SaveMRU();
|
|
|
|
|
|
|
|
|
|
//Settings.Default.Save();
|
|
|
|
|
Volian.Base.Library.DebugPagination.Close();
|
|
|
|
|
Volian.Base.Library.DebugText.Close();
|
|
|
|
|
Volian.Base.Library.BaselineMetaFile.Close(); // C2018-004 create meta file for baseline compares
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void frmVEPROMS_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// Close any open documents
|
|
|
|
|
tc.Dispose();
|
|
|
|
|
|
|
|
|
|
// RHM 20121010
|
|
|
|
|
// Something was causing the process to remain in memory for an extended period of time
|
|
|
|
|
// after printing procedures. The following lines kills the process immediately.
|
|
|
|
@@ -1350,6 +1385,7 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get the "Procedures" Panel Heading (title).
|
|
|
|
|
// by default the heading is "Procedures" (handled in the getting from the config)
|
|
|
|
|
// the heading is stored in the "title" field of the folder config.
|
|
|
|
@@ -1362,6 +1398,7 @@ namespace VEPROMS
|
|
|
|
|
else
|
|
|
|
|
return jj_vetn.Text; // C2018-029 return the child window's procedure set name
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int getTimeout()
|
|
|
|
|
{
|
|
|
|
|
VETreeNode jj_vetn = (VETreeNode)tv.Nodes[0]; // the VEPROMS tree node
|
|
|
|
@@ -1399,6 +1436,8 @@ namespace VEPROMS
|
|
|
|
|
void _RefreshTimer_Tick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//_MyLog.DebugFormat("_RefreshTimer_Tick {0}", RefreshTimerActive);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (RefreshTimerActive)
|
|
|
|
|
{
|
|
|
|
|
_TimeActivity.Open();
|
|
|
|
@@ -1407,6 +1446,7 @@ namespace VEPROMS
|
|
|
|
|
RefreshChanged(this);
|
|
|
|
|
_TimeActivity.Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnStepRTF_Click(object sender, System.EventArgs e)
|
|
|
|
@@ -1416,32 +1456,21 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
PingSession(null);
|
|
|
|
|
StartRefreshChanged(null);
|
|
|
|
|
//RefreshChanged(null);
|
|
|
|
|
//if (tc.MyStepRTB != null)
|
|
|
|
|
//{
|
|
|
|
|
// StepConfig sc = new StepConfig(tc.MyStepRTB.MyItemInfo.MyContent.Config);
|
|
|
|
|
// if (sc.Step_SourceToBackground != null)
|
|
|
|
|
// OpenMyItem(sc.Step_SourceToBackground);
|
|
|
|
|
// if(sc.Step_BackgroundToSource != null)
|
|
|
|
|
// OpenMyItem(sc.Step_BackgroundToSource);
|
|
|
|
|
|
|
|
|
|
//frmStepRTF frm = new frmStepRTF();
|
|
|
|
|
//frm.MyStepRTB = tc.MyStepRTB;
|
|
|
|
|
//frm.Show();
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SessionInfo _MySessionInfo;
|
|
|
|
|
public SessionInfo MySessionInfo
|
|
|
|
|
{
|
|
|
|
|
get {
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_MySessionInfo == null && MyParent != null)// B2017-152 Don't crash if MySessionInfo is null
|
|
|
|
|
_MySessionInfo = MyParent.MySessionInfo;
|
|
|
|
|
return _MySessionInfo;
|
|
|
|
|
}
|
|
|
|
|
set { _MySessionInfo = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private System.Threading.Timer MyActivityTimer;
|
|
|
|
|
//private System.Threading.Timer MyRefreshTimer;
|
|
|
|
|
private DevComponents.DotNetBar.ButtonItem btnManageSecurity;
|
|
|
|
@@ -1453,10 +1482,12 @@ namespace VEPROMS
|
|
|
|
|
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsExport;
|
|
|
|
|
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsImport;
|
|
|
|
|
private TabItemsToClose _MyCloseTabList = new TabItemsToClose();
|
|
|
|
|
|
|
|
|
|
public TabItemsToClose MyCloseTabList
|
|
|
|
|
{
|
|
|
|
|
get { return _MyCloseTabList; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _DisablePing = false;
|
|
|
|
|
public bool DisablePing
|
|
|
|
|
{
|
|
|
|
@@ -1467,6 +1498,7 @@ namespace VEPROMS
|
|
|
|
|
//_MyLog.WarnFormat("DisableSessionPing = {0}", value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void PingSession(Object obj)
|
|
|
|
|
{
|
|
|
|
|
MySemaphore.WaitOne();
|
|
|
|
@@ -1485,6 +1517,7 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
MySemaphore.Release();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WindowsFormsSynchronizationContext mUIContext = new WindowsFormsSynchronizationContext();
|
|
|
|
|
public void MyFindNodeAndExpand(object obj)
|
|
|
|
|
{
|
|
|
|
@@ -1509,6 +1542,7 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
MySemaphore.Release(); // ping session control
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void StartRefreshChanged(Object obj)
|
|
|
|
|
{
|
|
|
|
|
//_MyLog.Debug("StartRefreshChanged");
|
|
|
|
@@ -1517,6 +1551,7 @@ namespace VEPROMS
|
|
|
|
|
RefreshTimerActive = !PauseRefresh;
|
|
|
|
|
MySemaphore.Release();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RefreshChanged(Object obj)
|
|
|
|
|
{
|
|
|
|
|
//if (SkipRefresh) return;
|
|
|
|
@@ -1536,8 +1571,10 @@ namespace VEPROMS
|
|
|
|
|
MyFindNodeAndExpand(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// B2017-247 Error Handler for Ping Session
|
|
|
|
|
if (MySessionInfo.ChangedContents != null && MySessionInfo.ChangedContents.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (int id in MySessionInfo.ChangedContents.Keys)
|
|
|
|
|
{
|
|
|
|
|
if (ContentInfo.IsInCache(id))
|
|
|
|
@@ -1554,20 +1591,23 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
lastChanged = MySessionInfo.ChangedContents[id];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MySessionInfo.ChangedItems.Clear();
|
|
|
|
|
MySessionInfo.ChangedContents.Clear();
|
|
|
|
|
|
|
|
|
|
if (lastChanged > 0)
|
|
|
|
|
{
|
|
|
|
|
MySessionInfo.LastContentChange = lastChanged;
|
|
|
|
|
RefreshLastChange();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
catch { }
|
|
|
|
|
|
|
|
|
|
//MySemaphore.Release();
|
|
|
|
|
//_MyLog.DebugFormat("{0},{1:X},{2:X},{3:X}", DateTime.Now.ToLongTimeString(), lastChanged, MySessionInfo.LastContentChange, MySessionInfo.LastChangedInt64);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int TotalCount(TreeNodeCollection tns)
|
|
|
|
|
{
|
|
|
|
|
int total = tns.Count;
|
|
|
|
@@ -1575,6 +1615,7 @@ namespace VEPROMS
|
|
|
|
|
total += TotalCount(tn.Nodes);
|
|
|
|
|
return total;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool ByteArrayIsEmpty(byte[] myArray)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < myArray.Length; i++)
|
|
|
|
@@ -1594,6 +1635,7 @@ namespace VEPROMS
|
|
|
|
|
public Timer tmrCloseTabItems;
|
|
|
|
|
public System.Threading.Semaphore MySemaphore = new System.Threading.Semaphore(1, 1);
|
|
|
|
|
private bool _frmVEPROMSloading = false;
|
|
|
|
|
|
|
|
|
|
private void frmVEPROMS_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// B2019-116 Use Volian.Base.Library.VlnItextFont
|
|
|
|
@@ -1813,6 +1855,7 @@ namespace VEPROMS
|
|
|
|
|
if (this.txtSearch.Text.Length > 0 && !this.txtSearch.Text.Contains("\r\n"))
|
|
|
|
|
CurrentID = txtSearch.Text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void tc_RefreshEnhancedDocument(object sender, ItemSelectedChangedEventArgs args)
|
|
|
|
|
{
|
|
|
|
@@ -1874,12 +1917,6 @@ namespace VEPROMS
|
|
|
|
|
if (i == 0)// Turn-on Change Manger if there are no active Sessions
|
|
|
|
|
TurnChangeManagerOn.Execute();
|
|
|
|
|
}
|
|
|
|
|
//public bool IsEnhancedDocumentOpen(ItemInfo ii)
|
|
|
|
|
//{
|
|
|
|
|
// if (tc.dicEnhancedDocuments.ContainsKey(ii.MyProcedure))
|
|
|
|
|
// return true;
|
|
|
|
|
// return false;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
// C2015-022 Separate Windows. This is a dictionary of child PROMS windows forms (frmVEPROMS)
|
|
|
|
|
//
|
|
|
|
@@ -2052,6 +2089,7 @@ namespace VEPROMS
|
|
|
|
|
OpenMyItem(value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string FindNextLine()
|
|
|
|
|
{
|
|
|
|
|
if (txtSearch.SelectionLength > 0)
|
|
|
|
@@ -2065,6 +2103,7 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string FindPreviousLine()
|
|
|
|
|
{
|
|
|
|
|
if (txtSearch.SelectionLength > 0)
|
|
|
|
@@ -2082,6 +2121,7 @@ namespace VEPROMS
|
|
|
|
|
txtSearch.ScrollToCaret();
|
|
|
|
|
return GetCurrentLine();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void txtSearch_KeyUp(object sender, KeyEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.Control && e.KeyCode == Keys.V)
|
|
|
|
@@ -2103,6 +2143,7 @@ namespace VEPROMS
|
|
|
|
|
e.Handled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetCurrentLine()
|
|
|
|
|
{
|
|
|
|
|
while (txtSearch.SelectionStart > 0 && txtSearch.Text[txtSearch.SelectionStart - 1] != '\n')
|
|
|
|
@@ -2111,6 +2152,7 @@ namespace VEPROMS
|
|
|
|
|
if (sub.Contains("\r\n")) return sub.Substring(0, sub.IndexOf("\r\n"));
|
|
|
|
|
return sub;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void txtSearch_KeyPress(object sender, KeyPressEventArgs e) // used when running in debug mode, for text box where you enter an ItemID or ContextID number
|
|
|
|
|
{
|
|
|
|
|
if (e.KeyChar == '\r')
|
|
|
|
@@ -2137,7 +2179,7 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
DisplayTabItem dti = tc.OpenItem(ii);// B2018-035 Allow procedure to be printed and property grid to be opened
|
|
|
|
|
// B2019-003: was crashing if another user was in same procedure (dti would have been null because procedure could not be opened):
|
|
|
|
|
if (dti == null) return;
|
|
|
|
|
if (dti == null) return;?
|
|
|
|
|
|
|
|
|
|
SelectedStepTabPanel = dti.MyStepTabPanel;
|
|
|
|
|
tc.SelectedDisplayTabItem = dti;
|
|
|
|
@@ -2177,6 +2219,8 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108);
|
|
|
|
|
|
|
|
|
|
private static VolianTimer _TimeActivity1 = new VolianTimer("frmVEPROMS.cs tmrCloseTabItems_Tick", 2108);
|
|
|
|
|
|
|
|
|
|
void tmrCloseTabItems_Tick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
_TimeActivity1.Open();
|
|
|
|
@@ -2257,11 +2301,13 @@ namespace VEPROMS
|
|
|
|
|
lblUser.Text = VlnSettings.UserID;
|
|
|
|
|
lblUser.MouseDown += new MouseEventHandler(lblUser_MouseDown);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetSecurityKey()
|
|
|
|
|
{
|
|
|
|
|
Random rnd = new Random(DateTime.Now.Year + DateTime.Now.DayOfYear * 1000);
|
|
|
|
|
return rnd.Next(10000).ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lblUser_MouseDown(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.Button == MouseButtons.Right)
|
|
|
|
@@ -2719,6 +2765,7 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
_ExpandingTree = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void tv_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (_ExpandingTree)
|
|
|
|
@@ -2853,7 +2900,7 @@ namespace VEPROMS
|
|
|
|
|
toolsPanel.Expanded = true;
|
|
|
|
|
toolsTabs.SelectedTab = toolstabResults;
|
|
|
|
|
}
|
|
|
|
|
if (frmver._refreshProcedureList) tv.RefreshDocVersion(); //B2021-066: Refresh Procedure Numbers if Working Draft (docversion) applicability change
|
|
|
|
|
if (frmver._refreshProcedureList) tv.RefreshDocVersion(); //B2021-066: Refresh Procedure Numbers if Working Draft (docversion) applicability change?
|
|
|
|
|
MySessionInfo.CheckInItem(ownerID);
|
|
|
|
|
}
|
|
|
|
|
else if (args.ProcedureConfig != null)
|
|
|
|
@@ -3222,22 +3269,26 @@ namespace VEPROMS
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region InfoTabRO
|
|
|
|
|
|
|
|
|
|
private void infotabRO_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
infoPanel.Expanded = true;
|
|
|
|
|
infoTabs.SelectedTab = infotabRO;
|
|
|
|
|
//if (dtp == null) return;
|
|
|
|
|
|
|
|
|
|
//displayRO.Mydvi = SelectedDVI;
|
|
|
|
|
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayRO.ProgressBar = bottomProgBar;
|
|
|
|
|
|
|
|
|
|
displayRO.MyRTB = (SelectedStepTabPanel == null) ? null :
|
|
|
|
|
SelectedStepTabPanel.MyStepPanel.SelectedEditItem == null ? null : SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
|
|
|
|
|
displayRO.ProgressBar = bottomProgBar;
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
|
|
|
|
|
displayRO.LoadTree(); //B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region InfoTabTransition
|
|
|
|
|
|
|
|
|
|
private void infotabTransition_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (tc == null || tc.SelectedDisplayTabItem == null) return;
|
|
|
|
@@ -3327,6 +3378,7 @@ namespace VEPROMS
|
|
|
|
|
private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (_SelectedDVI == null) return;
|
|
|
|
|
|
|
|
|
|
if (args.PanelTabName == "Bookmarks")
|
|
|
|
|
{
|
|
|
|
|
toolsPanel.Expanded = true;
|
|
|
|
@@ -3376,21 +3428,23 @@ namespace VEPROMS
|
|
|
|
|
else if (args.PanelTabName == "DisplayROUpdateROFST")
|
|
|
|
|
{
|
|
|
|
|
_SelectedROFst = null;
|
|
|
|
|
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
|
|
|
|
|
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayRO.RefreshRoTree();
|
|
|
|
|
|
|
|
|
|
// need this to update RO Tree after UpdateRofst (B2015-226)
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.MyROFST = SelectedROFst;
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
|
|
|
|
|
// resetting the MyROFSTLookup for the search & reports panels will refresh the RO trees after UpdateRofst in each of those panels (B2015-226)
|
|
|
|
|
if (SelectedDVI != null)
|
|
|
|
|
{
|
|
|
|
|
displaySearch1.MyROFSTLookup = SelectedDVI.DocVersionAssociations[0].MyROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayReports.MyROFSTLookup = SelectedDVI.DocVersionAssociations[0].MyROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayReports.Mydocversion = SelectedDVI; // B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void tc_SelectedDisplayTabItemChanged(object sender, EventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (tc.ShuttingDown) return; // B2022-026 RO Memory Reduction code - to prevent refreshing the RO tree again
|
|
|
|
|
|
|
|
|
|
// If the current procedure or section in the treeview doesn't match then change the treeview selection.
|
|
|
|
|
//jcb added for error B2012-117
|
|
|
|
|
ItemInfo tvii;
|
|
|
|
@@ -3398,8 +3452,10 @@ namespace VEPROMS
|
|
|
|
|
tvii = null;
|
|
|
|
|
else
|
|
|
|
|
tvii = ((tv.SelectedNode as VETreeNode).VEObject) as ItemInfo;
|
|
|
|
|
|
|
|
|
|
if (tc.SelectedDisplayTabItem == null) return;
|
|
|
|
|
if (tc.SelectedDisplayTabItem.MyItemInfo == null) return; // library document.
|
|
|
|
|
|
|
|
|
|
if (tc.SelectedDisplayTabItem.MyItemInfo.IsProcedure)
|
|
|
|
|
{
|
|
|
|
|
if (tvii == null || tvii.IsSection || tc.SelectedDisplayTabItem.MyItemInfo.ItemID != tvii.MyProcedure.ItemID)
|
|
|
|
@@ -3418,16 +3474,26 @@ namespace VEPROMS
|
|
|
|
|
|
|
|
|
|
SetCaption(tv.SelectedNode as VETreeNode);
|
|
|
|
|
displayApplicability.MyDisplayTabItem = tc.SelectedDisplayTabItem;
|
|
|
|
|
|
|
|
|
|
if (tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0)
|
|
|
|
|
{
|
|
|
|
|
displayRO.MyROFSTLookup = tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion);
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
displayRO.MyROFST = tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
displayRO.MyROFST = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
|
|
|
|
|
lblUser.Text = tc.SelectedDisplayTabItem.MyUserRole;
|
|
|
|
|
|
|
|
|
|
if (tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.MultiUnitCount > 1)
|
|
|
|
|
btnPrint.Visible = false;
|
|
|
|
|
else
|
|
|
|
|
btnPrint.Visible = true;
|
|
|
|
|
|
|
|
|
|
// Reset the ribbon buttons B2016-148 (ex. a copystep done in a different procedure tab my require the paste step options to be active
|
|
|
|
|
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment
|
|
|
|
|
{
|
|
|
|
@@ -3444,6 +3510,7 @@ namespace VEPROMS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
this.lblEditView.Text = args.ViewMode == E_ViewMode.Edit ? "Edit" : "View";
|
|
|
|
@@ -3455,6 +3522,7 @@ namespace VEPROMS
|
|
|
|
|
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null && tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon != null)
|
|
|
|
|
tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.ToggleFindReplaceToolTip(args.ViewMode == E_ViewMode.View);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private ItemInfo _CurrentItem = null;
|
|
|
|
|
private StepRTB _LastStepRTB = null;
|
|
|
|
|
//private Timer _TmrRefreshItem = null;
|
|
|
|
@@ -3531,10 +3599,11 @@ namespace VEPROMS
|
|
|
|
|
|
|
|
|
|
if (args.MyItemInfo.MyDocVersion.DocVersionAssociations != null)
|
|
|
|
|
{
|
|
|
|
|
displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
|
|
|
|
displayRO.MyRTB = null;
|
|
|
|
|
infotabRO.Visible = true;
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.MyRTB = null;
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
infotabTags.Visible = false;
|
|
|
|
@@ -3552,6 +3621,7 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
epAnnotations.Enabled = true;
|
|
|
|
|
ctrlAnnotationDetails.Enabled = true;
|
|
|
|
|
|
|
|
|
|
if (args.MyEditItem.MyItemInfo.IsSection || args.MyEditItem.MyItemInfo.IsProcedure)
|
|
|
|
|
{
|
|
|
|
|
infotabRO.Visible = false; // B2022-039 Do NOT allow ROs to be inserted in section or procedures // B2017-245 Allow Ro Menu to be seen for Procedures and Sections
|
|
|
|
@@ -3562,6 +3632,7 @@ namespace VEPROMS
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
infotabTags.Visible = true;
|
|
|
|
|
|
|
|
|
|
if (_LastStepRTB != null)
|
|
|
|
|
{
|
|
|
|
|
infotabRO.Visible = _LastStepRTB.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0;
|
|
|
|
@@ -3573,13 +3644,16 @@ namespace VEPROMS
|
|
|
|
|
displayTransition.Enabled = _LastStepRTB.EditMode;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
infotabRO.Visible = infotabTransition.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// When infotabTags is set to Visible, the matching panel also needs to be set to visible
|
|
|
|
|
// the other panels will appear as they are selected by the user.
|
|
|
|
|
infotabControlPanelTags.Visible = true;
|
|
|
|
|
displayTags.IsVisible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
infotabHistory.Visible = true;
|
|
|
|
|
// C2021-027: Procedure level PC/PC
|
|
|
|
|
// B2021-065: wasn't showing applicability tab for formats that didn't have procedure level flag.
|
|
|
|
@@ -3589,7 +3663,10 @@ namespace VEPROMS
|
|
|
|
|
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
infotabApplicability.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.MyEditItem.MyItemInfo.ActiveFormat != null)
|
|
|
|
|
{
|
|
|
|
|
// see if format has floating foldouts, and if so, display the panel.
|
|
|
|
@@ -3602,29 +3679,33 @@ namespace VEPROMS
|
|
|
|
|
displayFoldoutMaint.MyItemInfo = args.MyItemInfo;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// When infotabTags is set to Visible, it is given focus. The next line returns focus to the StepRTB
|
|
|
|
|
args.MyEditItem.SetFocus();
|
|
|
|
|
displayTransition.MyRTB = args.MyEditItem.MyStepRTB;
|
|
|
|
|
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.ProgressBar = bottomProgBar;
|
|
|
|
|
displayRO.MyRTB = args.MyEditItem.MyStepRTB;
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
|
|
|
|
|
displayBookMarks.MyEditItem = args.MyEditItem;
|
|
|
|
|
displayHistory.MyEditItem = args.MyEditItem;
|
|
|
|
|
|
|
|
|
|
displayRO.ProgressBar = bottomProgBar;
|
|
|
|
|
|
|
|
|
|
lblEditView.Text = args.MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? "Edit" : "View";
|
|
|
|
|
_CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
|
|
|
|
|
dlgFindReplace.MyEditItem = args.MyEditItem;
|
|
|
|
|
SpellChecker.MyEditItem = args.MyEditItem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.MyEditItem != null)
|
|
|
|
|
{
|
|
|
|
|
SelectedStepTabPanel = args.MyEditItem.MyStepPanel.MyStepTabPanel;
|
|
|
|
|
displayTags.Mydvi = SelectedDVI;
|
|
|
|
|
displayTags.MyEditItem = args.MyEditItem;
|
|
|
|
|
|
|
|
|
|
displayRO.ROTypeFilter = SelectedStepTabPanel.MyStepPanel.SelectedEditItem is Volian.Controls.Library.GridItem && (SelectedStepTabPanel.MyStepPanel.SelectedEditItem as Volian.Controls.Library.GridItem).MyFlexGrid.IsRoTable ?
|
|
|
|
|
E_ROValueType.Table : (SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyItemInfo.IsFigure) ? E_ROValueType.Image : E_ROValueType.Text;
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
|
|
|
|
|
if (_LastStepRTB.IsRoTable && _LastStepRTB.MyItemInfo.MyContent.ContentRoUsageCount > 0)
|
|
|
|
|
displayRO.CurROLink = _LastStepRTB.MyItemInfo.MyContent.ContentRoUsages[0];
|
|
|
|
@@ -3632,35 +3713,29 @@ namespace VEPROMS
|
|
|
|
|
if (_LastStepRTB.IsRoFigure && _LastStepRTB.MyItemInfo.MyContent.ContentRoUsageCount > 0)
|
|
|
|
|
displayRO.CurROLink = _LastStepRTB.MyItemInfo.MyContent.ContentRoUsages[0];
|
|
|
|
|
|
|
|
|
|
// if this is an enhanced step (linked from a source document), don't bring up the ro or transition panel,
|
|
|
|
|
// and don't allow replace on the find/replace dialog.
|
|
|
|
|
if (args.MyItemInfo.IsEnhancedStep)
|
|
|
|
|
{
|
|
|
|
|
// originally had these two lines to make the step properties panel/tran & ro tabs invisitble for
|
|
|
|
|
// enhanced steps but this was causing an error in the caret management code in StepTabPanel (Hide/ShowCaret)
|
|
|
|
|
//infotabTransition.Visible = false;
|
|
|
|
|
//infotabRO.Visible = false;
|
|
|
|
|
|
|
|
|
|
// RHM: Had to use a timer to keep from getting into an infinite loop
|
|
|
|
|
// Not sure why , but tc_Leave was being called over and over again.
|
|
|
|
|
//KBR:TmrSetTransROInVisible.Enabled = true;
|
|
|
|
|
}
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.SetFindDocROButton(false);
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SelectedDVI = args.MyItemInfo.MyDocVersion;
|
|
|
|
|
//B2017-244 Open RO Panel for MSWord Sections
|
|
|
|
|
if (args.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0)
|
|
|
|
|
if (args.MyItemInfo != null && args.MyItemInfo.MyDocVersion != null && args.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0)
|
|
|
|
|
{
|
|
|
|
|
displayRO.MyROFSTLookup = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(args.MyItemInfo.MyDocVersion);
|
|
|
|
|
displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
SelectedDVI = args.MyItemInfo.MyDocVersion;
|
|
|
|
|
displayRO.MyDvi = SelectedDVI;
|
|
|
|
|
displayRO.ROTypeFilter = E_ROValueType.All; // allow all RO types for Word attachments (but fix)
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
|
|
|
|
|
displayRO.SetFindDocROButton(true);
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ctrlAnnotationDetails.Enabled && epAnnotations.Enabled)
|
|
|
|
|
{
|
|
|
|
|
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
|
|
|
|
@@ -3711,8 +3786,11 @@ namespace VEPROMS
|
|
|
|
|
{
|
|
|
|
|
//displayBookMarks.DeleteItemBookMarkPanel(_CurrentItem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Annotations
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Display or hide the Annotation Details panel
|
|
|
|
|
/// </summary>
|
|
|
|
@@ -3733,8 +3811,11 @@ namespace VEPROMS
|
|
|
|
|
ctrlAnnotationDetails.AnnotationText = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region LinkSupport
|
|
|
|
|
|
|
|
|
|
private void tc_LinkActiveChanged(object sender, StepPanelLinkEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
// determine if any infotabs are visisble, and if it is the Transition,
|
|
|
|
@@ -3744,6 +3825,7 @@ namespace VEPROMS
|
|
|
|
|
displayTransition.CurTrans = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void tc_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
infoPanel.Expanded = true;
|
|
|
|
@@ -3753,6 +3835,7 @@ namespace VEPROMS
|
|
|
|
|
displayTransition.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
|
|
|
|
|
displayTransition.CurTrans = args.MyLinkText.MyTransitionInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void tc_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (_SelectedROFst == null && (SelectedDVI == null || SelectedDVI.DocVersionAssociationCount == 0)) return; // B2016-128, not RO path associated to the working draft
|
|
|
|
@@ -3761,17 +3844,21 @@ namespace VEPROMS
|
|
|
|
|
infoPanel.Expanded = true;
|
|
|
|
|
infoTabs.SelectedTab = infotabRO;
|
|
|
|
|
|
|
|
|
|
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
|
|
|
|
|
displayRO.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
|
|
|
|
|
displayRO.CurROLink = args.MyLinkText.MyRoUsageInfo;
|
|
|
|
|
displayRO.ROTypeFilter = SelectedStepTabPanel.MyStepPanel.SelectedEditItem is Volian.Controls.Library.GridItem && (SelectedStepTabPanel.MyStepPanel.SelectedEditItem as Volian.Controls.Library.GridItem).MyFlexGrid.IsRoTable ?
|
|
|
|
|
E_ROValueType.Table : (SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyItemInfo.IsFigure) ? E_ROValueType.Image : E_ROValueType.Text;
|
|
|
|
|
//displayRO.Mydvi = SelectedDVI;
|
|
|
|
|
|
|
|
|
|
displayRO.ProgressBar = bottomProgBar;
|
|
|
|
|
displayRO.LoadTree(); // B2022-026 RO Memory Reduction code
|
|
|
|
|
displayRO.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
|
|
|
|
|
displayRO.CurROLink = args.MyLinkText.MyRoUsageInfo;
|
|
|
|
|
|
|
|
|
|
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
|
|
|
|
displayRO.LoadTree();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region VButton
|
|
|
|
|
|
|
|
|
|
private void office2007StartButton1_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// If the V-Button is clicked, check to see what tree node is s selected
|
|
|
|
@@ -3783,7 +3870,7 @@ namespace VEPROMS
|
|
|
|
|
btnNew.Enabled = false;
|
|
|
|
|
// if focus is in the step editor, position in the tree view to match the location in the step editor
|
|
|
|
|
if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null)
|
|
|
|
|
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);
|
|
|
|
|
tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo);?
|
|
|
|
|
|
|
|
|
|
VETreeNode vtn = tv.SelectedNode as VETreeNode;
|
|
|
|
|
if (vtn == null) return;
|
|
|
|
@@ -3888,7 +3975,7 @@ namespace VEPROMS
|
|
|
|
|
if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
|
|
|
|
|
{
|
|
|
|
|
ButtonItem subbtn = new ButtonItem("subbtn", "SubSection");
|
|
|
|
|
btnNew.SubItems.Add(subbtn);
|
|
|
|
|
btnNew.SubItems.Add(subbtn);?
|
|
|
|
|
subbtn.Click += new EventHandler(subbtn_Click);
|
|
|
|
|
}
|
|
|
|
|
ButtonItem stpbtn = new ButtonItem("stpbtn", "New Step");
|
|
|
|
|