Code cleanup – commented out non-reachable code

C2015-022 Separate Windows Upgrade – child window support for CopyStep, code cleanup
This commit is contained in:
John Jenko 2018-03-12 14:37:40 +00:00
parent 8ba6a5d64a
commit 725f5d651f
2 changed files with 8 additions and 4 deletions

View File

@ -318,7 +318,7 @@ namespace Volian.Controls.Library
if (btn.Name.StartsWith("btnEnhancedTo")) if (btn.Name.StartsWith("btnEnhancedTo"))
{ {
MyEditItem.SaveContents(); 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")) else if (btn.Name.Contains("Unlink"))
MyEditItem.UnlinkEnhanced(MyEditItem.MyItemInfo); MyEditItem.UnlinkEnhanced(MyEditItem.MyItemInfo);
@ -1729,7 +1729,7 @@ namespace Volian.Controls.Library
if (MyItemInfo.IsHigh && !MyItemInfo.IsEnhancedStep) if (MyItemInfo.IsHigh && !MyItemInfo.IsEnhancedStep)
{ {
stepToCfg = MyItemInfo.MyConfig as StepConfig; 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) // 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 // 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) if (clearCopyStep)
{ {
tmp.MyDisplayTabControl.MyCopyStep = null; tmp.MyDisplayTabControl.MyCopyStep = null;
tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows
SetPasteButtonEnabled(); SetPasteButtonEnabled();
} }
} }
@ -3233,6 +3234,7 @@ namespace Volian.Controls.Library
if (clearCopyStep) if (clearCopyStep)
{ {
tmp.MyDisplayTabControl.MyCopyStep = null; tmp.MyDisplayTabControl.MyCopyStep = null;
tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows
SetPasteButtonEnabled(); SetPasteButtonEnabled();
} }
} }
@ -3382,6 +3384,7 @@ namespace Volian.Controls.Library
//private FindReplace dlgFindReplace = null; //private FindReplace dlgFindReplace = null;
private void btnFindRplDlg_Click(object sender, EventArgs e) private void btnFindRplDlg_Click(object sender, EventArgs e)
{ {
if (MyEditItem == null || MyEditItem.MyStepPanel == null) return;
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl"); StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("FndRpl");
MyEditItem.MyStepPanel.OnTabDisplay(sender, args); MyEditItem.MyStepPanel.OnTabDisplay(sender, args);
} }
@ -3617,6 +3620,7 @@ namespace Volian.Controls.Library
{ {
StepTabPanel tmp = Parent as StepTabPanel; StepTabPanel tmp = Parent as StepTabPanel;
tmp.MyDisplayTabControl.MyCopyStep = MyItemInfo; tmp.MyDisplayTabControl.MyCopyStep = MyItemInfo;
tmp.MyDisplayTabControl.OnCopyStepSelected(null); // C2015-022 event to save copystep info in all of the separate windows
btnStepPaste.Enabled = true; btnStepPaste.Enabled = true;
SetPasteButtonEnabled(); SetPasteButtonEnabled();
} }

View File

@ -162,7 +162,7 @@ namespace Volian.Controls.Library
get get
{ {
return Application.ProductVersion; return Application.ProductVersion;
return Assembly.GetExecutingAssembly().GetName().Version.ToString(); //return Assembly.GetExecutingAssembly().GetName().Version.ToString();
} }
} }
} }