B2022-055 Fix to help prevent crashing when opening/closing/re-opening procedures.
This commit is contained in:
parent
b9a444c941
commit
e0acae62c9
@ -83,7 +83,8 @@ namespace Volian.Controls.Library
|
||||
if (_MyStepTabPanel == null) return null;
|
||||
return _MyStepTabPanel.SelectedItemInfo;
|
||||
}
|
||||
set {// B2018-074 Don't crash if opening MSWord section from Tools window in Debug Mode
|
||||
set
|
||||
{// B2018-074 Don't crash if opening MSWord section from Tools window in Debug Mode
|
||||
if (_MyStepTabPanel != null)
|
||||
_MyStepTabPanel.SelectedItemInfo = value;
|
||||
}
|
||||
@ -115,13 +116,20 @@ namespace Volian.Controls.Library
|
||||
else
|
||||
SetupDSOTabPanel();
|
||||
SetupSecurity(myItemInfo);
|
||||
if (MyDSOTabPanel == null || MyDSOTabPanel.MyEdWord != null) // B2017-219 check needed if we could not open a word attachment
|
||||
Name = string.Format("DisplayTabItem {0}", myItemInfo.ItemID);
|
||||
// B2022-055 assigning the Name caused a duplicate name error
|
||||
// we found that the procedure tab control remained in the Control list after the procedure was closed
|
||||
// later on we need to find out why it isn't removed when the procedure is closed
|
||||
//if (MyDSOTabPanel == null || MyDSOTabPanel.MyEdWord != null) // B2017-219 check needed if we could not open a word attachment
|
||||
//{
|
||||
// //Name = string.Format("DisplayTabItem {0}", myItemInfo.ItemID);
|
||||
//}
|
||||
|
||||
}
|
||||
private bool MesssageShown = false;
|
||||
public void SetupSecurity(ItemInfo myItem)
|
||||
{
|
||||
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
|
||||
|
||||
if (ui == null)
|
||||
{
|
||||
if (!MesssageShown)
|
||||
@ -135,6 +143,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (_MyStepTabPanel != null)
|
||||
_MyStepTabPanel.MyStepTabRibbon.SetupAdminMode();
|
||||
|
||||
MyUserRole = Volian.Base.Library.VlnSettings.UserID + " - Administrator";
|
||||
}
|
||||
else if (ui.IsSetAdministrator(myItem.MyDocVersion))
|
||||
@ -178,7 +187,10 @@ namespace Volian.Controls.Library
|
||||
InitializeComponent();
|
||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||
SetupLibraryDocumentDSOTabPanel();
|
||||
Name = string.Format("DisplayTabLibraryDocument {0}", myDocumentInfo.DocID);
|
||||
// B2022-055 assigning the Name caused a duplicate name error
|
||||
// we found that the procedure tab control remained in the Control list after the procedure was closed
|
||||
// later on we need to find out why it isn't removed when the procedure is closed
|
||||
//Name = string.Format("DisplayTabLibraryDocument {0}", myDocumentInfo.DocID);
|
||||
}
|
||||
|
||||
protected override void OnDisplayedChanged()
|
||||
@ -243,7 +255,10 @@ namespace Volian.Controls.Library
|
||||
// tabItem
|
||||
//
|
||||
Control = _MyStepTabPanel;
|
||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
// B2022-055 assigning the Name caused a duplicate name error
|
||||
// we found that the procedure tab control remained in the Control list after the procedure was closed
|
||||
// later on we need to find out why it isn't removed when the procedure is closed
|
||||
//Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
Text = _MyItemInfo.TabTitle;
|
||||
_MyItemInfo.Changed += new ItemInfoEvent(_MyItemInfo_Changed);
|
||||
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-").Replace(@"\u9586?", @"\");
|
||||
@ -301,7 +316,10 @@ namespace Volian.Controls.Library
|
||||
// tabItem
|
||||
//
|
||||
Control = _MyDSOTabPanel;
|
||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
// B2022-055 assigning the Name caused a duplicate name error
|
||||
// we found that the procedure tab control remained in the Control list after the procedure was closed
|
||||
// later on we need to find out why it isn't removed when the procedure is closed
|
||||
//Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
Text = _MyItemInfo.TabTitle;
|
||||
Tooltip = _Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011", "-").Replace(@"\u9586?", @"\");
|
||||
MouseMove += new System.Windows.Forms.MouseEventHandler(DisplayTabItem_MouseMove);
|
||||
@ -329,7 +347,10 @@ namespace Volian.Controls.Library
|
||||
// tabItem
|
||||
//
|
||||
Control = _MyDSOTabPanel;
|
||||
Name = "tabLibraryDocument " + _MyDocumentInfo.DocID;
|
||||
// B2022-055 assigning the Name caused a duplicate name error
|
||||
// we found that the procedure tab control remained in the Control list after the procedure was closed
|
||||
// later on we need to find out why it isn't removed when the procedure is closed
|
||||
//Name = "tabLibraryDocument " + _MyDocumentInfo.DocID;
|
||||
Text = _MyDocumentInfo.LibTitle;
|
||||
DocumentConfig dc = new DocumentConfig(_MyDocumentInfo);
|
||||
Tooltip = _Tooltip = dc.LibDoc_Comment;
|
||||
|
Loading…
x
Reference in New Issue
Block a user