From 725f5d651f7f3c946e6aa6b3996a478470876a91 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 12 Mar 2018 14:37:40 +0000 Subject: [PATCH] =?UTF-8?q?Code=20cleanup=20=E2=80=93=20commented=20out=20?= =?UTF-8?q?non-reachable=20code=20C2015-022=20Separate=20Windows=20Upgrade?= =?UTF-8?q?=20=E2=80=93=20child=20window=20support=20for=20CopyStep,=20cod?= =?UTF-8?q?e=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 10 +++++++--- PROMS/Volian.Controls.Library/frmSendErrorLog.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 7827da74..f855d0b2 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -318,7 +318,7 @@ namespace Volian.Controls.Library if (btn.Name.StartsWith("btnEnhancedTo")) { MyEditItem.SaveContents(); - MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OnOpenEnhancedDocument(new ItemSelectedChangedEventArgs(ii)); // is this creating ONE? + MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(ii); } else if (btn.Name.Contains("Unlink")) MyEditItem.UnlinkEnhanced(MyEditItem.MyItemInfo); @@ -1729,7 +1729,7 @@ namespace Volian.Controls.Library if (MyItemInfo.IsHigh && !MyItemInfo.IsEnhancedStep) { stepToCfg = MyItemInfo.MyConfig as StepConfig; - if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count>0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) + if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) { // Current selected step is source (i.e. has enhanced links to enhanced steps) // check if 'from' step is non. If so, allow paste before/after but not replace @@ -3223,6 +3223,7 @@ namespace Volian.Controls.Library if (clearCopyStep) { tmp.MyDisplayTabControl.MyCopyStep = null; + tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows SetPasteButtonEnabled(); } } @@ -3233,6 +3234,7 @@ namespace Volian.Controls.Library if (clearCopyStep) { tmp.MyDisplayTabControl.MyCopyStep = null; + tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows SetPasteButtonEnabled(); } } @@ -3382,7 +3384,8 @@ namespace Volian.Controls.Library //private FindReplace dlgFindReplace = null; private void btnFindRplDlg_Click(object sender, EventArgs e) { - StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl"); + if (MyEditItem == null || MyEditItem.MyStepPanel == null) return; + StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl"); MyEditItem.MyStepPanel.OnTabDisplay(sender, args); } @@ -3617,6 +3620,7 @@ namespace Volian.Controls.Library { StepTabPanel tmp = Parent as StepTabPanel; tmp.MyDisplayTabControl.MyCopyStep = MyItemInfo; + tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows btnStepPaste.Enabled = true; SetPasteButtonEnabled(); } diff --git a/PROMS/Volian.Controls.Library/frmSendErrorLog.cs b/PROMS/Volian.Controls.Library/frmSendErrorLog.cs index 9f6b6778..ee687638 100644 --- a/PROMS/Volian.Controls.Library/frmSendErrorLog.cs +++ b/PROMS/Volian.Controls.Library/frmSendErrorLog.cs @@ -162,7 +162,7 @@ namespace Volian.Controls.Library get { return Application.ProductVersion; - return Assembly.GetExecutingAssembly().GetName().Version.ToString(); + //return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } }