B2017-084: Fix hang when closing PROMS with Word doc open & open/close of RO Editor

B2017-084: Fix hang when closing PROMS with Word doc open & open/close of RO Editor.
This commit is contained in:
Kathy Ruffing 2017-05-18 14:13:23 +00:00
parent ab44a78d9e
commit 5ea29fbc74
3 changed files with 18 additions and 1 deletions

View File

@ -943,6 +943,7 @@ namespace VEPROMS
// if ro.fst was 'updated' from the roeditor, enable the update ro.fst values on // if ro.fst was 'updated' from the roeditor, enable the update ro.fst values on
// the steptabribbon. // the steptabribbon.
if (tc.ShuttingDown) return;
if (SelectedStepTabPanel!=null && SelectedStepTabPanel.MyStepTabRibbon != null) if (SelectedStepTabPanel!=null && SelectedStepTabPanel.MyStepTabRibbon != null)
SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst()); SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst());
} }
@ -1050,7 +1051,13 @@ namespace VEPROMS
} }
private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e) private void frmVEPROMS_FormClosing(object sender, FormClosingEventArgs e)
{ {
//tc.ShuttingDown = true;// This keeps PROMS from Hanging under certain circumstances tc.ShuttingDown = true; // This keeps PROMS from Hanging under certain circumstances
foreach (DisplayTabItem dti in tc.MyBar.Items)
{
if (dti.MyDSOTabPanel != null)
dti.MyDSOTabPanel.CloseDSO();
}
_MyLog.WarnFormat("frmVEPROMS_FormClosing");
if (MyParent == null) if (MyParent == null)
{ {
if (MyActivityTimer != null) MyActivityTimer.Dispose(); if (MyActivityTimer != null) MyActivityTimer.Dispose();
@ -2163,6 +2170,7 @@ namespace VEPROMS
} }
void tc_Leave(object sender, EventArgs e) void tc_Leave(object sender, EventArgs e)
{ {
if (tc.ShuttingDown) return;
tc.ShowCaret();// Show the pseudo cursor (caret) tc.ShowCaret();// Show the pseudo cursor (caret)
} }
void tc_Enter(object sender, EventArgs e) void tc_Enter(object sender, EventArgs e)

View File

@ -13,6 +13,7 @@ namespace Volian.Controls.Library
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
{ {
ShuttingDown = true;
// Cleanup Bars // Cleanup Bars
if (dotNetBarManager1.Bars != null) if (dotNetBarManager1.Bars != null)
foreach (DevComponents.DotNetBar.Bar myBar in dotNetBarManager1.Bars) foreach (DevComponents.DotNetBar.Bar myBar in dotNetBarManager1.Bars)

View File

@ -696,8 +696,16 @@ namespace Volian.Controls.Library
get { return _PnlCaret; } get { return _PnlCaret; }
} }
private static int trackerSC = 0; private static int trackerSC = 0;
private bool _ShuttingDown = false;
public bool ShuttingDown
{
get { return _ShuttingDown; }
set { _ShuttingDown = value; }
}
public void ShowCaret() public void ShowCaret()
{ {
if (_ShuttingDown) return;
if (_MyStepRTB != null) if (_MyStepRTB != null)
{ {
if (_MyEditItem.RTBLastFocus) if (_MyEditItem.RTBLastFocus)