B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Volian.Controls.Library;
|
||||
using DevComponents.DotNetBar;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -281,7 +282,7 @@ namespace Volian.Controls.Library
|
||||
internal void OnLinkActiveChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
if (LinkActiveChanged != null) LinkActiveChanged(sender, args);
|
||||
else MessageBox.Show(args.LinkInfoText, "Unhandled Link Active Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else FlexibleMessageBox.Show(args.LinkInfoText, "Unhandled Link Active Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
/// <summary>
|
||||
/// This occurs when a Transition is inserted
|
||||
@@ -295,7 +296,7 @@ namespace Volian.Controls.Library
|
||||
internal void OnLinkInsertTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
if (LinkInsertTran != null) LinkInsertTran(sender, args);
|
||||
else MessageBox.Show(args.LinkInfoText, "Unhandled Link Insert Tran", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else FlexibleMessageBox.Show(args.LinkInfoText, "Unhandled Link Insert Tran", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
/// <summary>
|
||||
/// This occurs when an RO is inserted
|
||||
@@ -309,7 +310,7 @@ namespace Volian.Controls.Library
|
||||
internal void OnLinkInsertRO(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
if (LinkInsertRO != null) LinkInsertRO(sender, args);
|
||||
else MessageBox.Show(args.LinkInfoText, "Unhandled Link Insert RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else FlexibleMessageBox.Show(args.LinkInfoText, "Unhandled Link Insert RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
/// <summary>
|
||||
/// This occurs when a Transition is modified
|
||||
@@ -323,7 +324,7 @@ namespace Volian.Controls.Library
|
||||
internal void OnLinkModifyTran(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
if (LinkModifyTran != null) LinkModifyTran(sender, args);
|
||||
else MessageBox.Show(args.LinkInfoText, "Unhandled Link Modify Tran", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else FlexibleMessageBox.Show(args.LinkInfoText, "Unhandled Link Modify Tran", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
/// <summary>
|
||||
/// This occurs when an RO is modified
|
||||
@@ -337,7 +338,7 @@ namespace Volian.Controls.Library
|
||||
internal void OnLinkModifyRO(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
if (LinkModifyRO != null) LinkModifyRO(sender, args);
|
||||
else MessageBox.Show(args.LinkInfoText, "Unhandled Link Modify RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else FlexibleMessageBox.Show(args.LinkInfoText, "Unhandled Link Modify RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
/// <summary>
|
||||
/// Occurs when the user selects a different item or page
|
||||
@@ -379,31 +380,31 @@ namespace Volian.Controls.Library
|
||||
internal void OnModeChange(object sender, StepRTBModeChangeEventArgs args)
|
||||
{
|
||||
if (ModeChange != null) ModeChange(sender, args);
|
||||
else MessageBox.Show("Cannot change mode");
|
||||
else FlexibleMessageBox.Show("Cannot change mode");
|
||||
}
|
||||
public event StepPanelTabDisplayEvent PanelTabDisplay;
|
||||
internal void OnPanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
|
||||
{
|
||||
if (PanelTabDisplay != null) PanelTabDisplay(sender, args);
|
||||
else MessageBox.Show("Cannot display information");
|
||||
else FlexibleMessageBox.Show("Cannot display information");
|
||||
}
|
||||
public event StepPanelWordSectionCloseEvent WordSectionClose;
|
||||
internal void OnWordSectionClose(object sender, WordSectionEventArgs args)
|
||||
{
|
||||
if (WordSectionClose != null) WordSectionClose(sender, args);
|
||||
else MessageBox.Show("Cannot close associated Word section");
|
||||
else FlexibleMessageBox.Show("Cannot close associated Word section");
|
||||
}
|
||||
public event StepPanelWordSectionDeletedEvent WordSectionDeleted;
|
||||
internal void OnWordSectionDeleted(object sender, WordSectionEventArgs args)
|
||||
{
|
||||
if (WordSectionDeleted != null) WordSectionDeleted(sender, args);
|
||||
else MessageBox.Show("Cannot delete associated Word section");
|
||||
else FlexibleMessageBox.Show("Cannot delete associated Word section");
|
||||
}
|
||||
public event StepPanelItemPastedEvent ItemPaste;
|
||||
internal void OnItemPaste(object sender, vlnTreeItemInfoPasteEventArgs args)
|
||||
{
|
||||
if (ItemPaste != null) ItemPaste(sender, args);
|
||||
else MessageBox.Show("Cannot adjust panels for pasted item");
|
||||
else FlexibleMessageBox.Show("Cannot adjust panels for pasted item");
|
||||
}
|
||||
#endregion
|
||||
#region Contructor & Setup
|
||||
@@ -542,7 +543,7 @@ namespace Volian.Controls.Library
|
||||
ItemInfo myItemInfo = myItemInfo2;
|
||||
if (myItemInfo.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion
|
||||
{
|
||||
MessageBox.Show(this, "Possible disconnected item", "Item Not Found");
|
||||
FlexibleMessageBox.Show(this, "Possible disconnected item", "Item Not Found");
|
||||
return null;
|
||||
}
|
||||
string message = string.Empty;
|
||||
@@ -555,7 +556,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -563,7 +564,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Document Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Document Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -574,7 +575,7 @@ namespace Volian.Controls.Library
|
||||
// if this is an auto table of contents section, don't edit it:
|
||||
if (myItemInfo.IsAutoTOCSection)
|
||||
{
|
||||
MessageBox.Show("This is an automatically generated 'Table of Contents' section. It is not editable. It is generated during Print.", "Item not Editable", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
FlexibleMessageBox.Show("This is an automatically generated 'Table of Contents' section. It is not editable. It is generated during Print.", "Item not Editable", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return SelectedDisplayTabItem;
|
||||
}
|
||||
bool libDocAlreadyOpen = false;
|
||||
@@ -1066,7 +1067,7 @@ namespace Volian.Controls.Library
|
||||
ItemInfoList iil = pi.FindEnhancedProcedureTextDifferences();
|
||||
if (iil != null)
|
||||
{
|
||||
if (MessageBox.Show(this, "Text differences were found between this enhanced procedure and its source procedure. Do you want to refresh the text in this procedure?", "Confirm Text Refresh", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
if (FlexibleMessageBox.Show(this, "Text differences were found between this enhanced procedure and its source procedure. Do you want to refresh the text in this procedure?", "Confirm Text Refresh", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
|
||||
pi.EnhancedProcedureRefreshTextDifferences(iil);
|
||||
@@ -1153,7 +1154,7 @@ namespace Volian.Controls.Library
|
||||
if (displayMsg)
|
||||
{
|
||||
string msg = string.Format("{0} is already open", myItemInfo.MyContent.MyEntry.MyDocument.LibTitle);
|
||||
MessageBox.Show(msg, "Library Document is Already Open", MessageBoxButtons.OK);
|
||||
FlexibleMessageBox.Show(msg, "Library Document is Already Open", MessageBoxButtons.OK);
|
||||
}
|
||||
libDocAlreadyOpen = true;
|
||||
break;
|
||||
@@ -1178,7 +1179,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (DSOTabPanel.Count >= DSOTabPanel.MSWordLimit) // Limit the number of open document pages to 18
|
||||
{
|
||||
MessageBox.Show("Too many Word Documents Open. Please close one of the Documents before attempting to open another");
|
||||
FlexibleMessageBox.Show("Too many Word Documents Open. Please close one of the Documents before attempting to open another");
|
||||
return null;
|
||||
}
|
||||
//if ((myItemInfo.MyContent.MyEntry.MyDocument.LibTitle ?? "") != "")
|
||||
@@ -1212,7 +1213,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (DSOTabPanel.Count > DSOTabPanel.MSWordLimit) //18) // Limit the number of open document pages to 18
|
||||
{
|
||||
MessageBox.Show("Too many Word Documents Open. Please close one of the Documents before attempting to open another");
|
||||
FlexibleMessageBox.Show("Too many Word Documents Open. Please close one of the Documents before attempting to open another");
|
||||
return null;
|
||||
}
|
||||
pg = new DisplayTabItem(this.components, this, myDocumentInfo, key); // Open a new document page
|
||||
|
Reference in New Issue
Block a user