B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.

This commit is contained in:
2019-03-07 18:02:31 +00:00
parent 7e4770d76d
commit 17260519e3
25 changed files with 238 additions and 218 deletions

View File

@@ -10,6 +10,7 @@ using System.Text.RegularExpressions;
using AT.STO.UI.Win;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
namespace Volian.Controls.Library
{
@@ -761,7 +762,7 @@ namespace Volian.Controls.Library
}
else
{
MessageBox.Show("Based on your selection, cannot get list of procedures, Select another folder.");
FlexibleMessageBox.Show("Based on your selection, cannot get list of procedures, Select another folder.");
// disable ALL other controls
cbTranProcs.Enabled = false;
cbTranSects.Enabled = false;
@@ -777,7 +778,7 @@ namespace Volian.Controls.Library
defines_set = true;
if (!defines_set)
{
MessageBox.Show("Based on your selection, cannot get list of procedures, narrow the procedure set selection.");
FlexibleMessageBox.Show("Based on your selection, cannot get list of procedures, narrow the procedure set selection.");
// disable ALL other controls
cbTranProcs.Enabled = false;
cbTranSects.Enabled = false;
@@ -806,7 +807,7 @@ namespace Volian.Controls.Library
dv = (DocVersionInfo)obj;
if (dv.Procedures.Count < 1)
{
MessageBox.Show("There are no procedures in this set. Cannot insert a transition within it.");
FlexibleMessageBox.Show("There are no procedures in this set. Cannot insert a transition within it.");
cbTranProcs.Enabled = false;
cbTranSects.Enabled = false;
tvTran.Enabled = false;
@@ -1049,7 +1050,7 @@ namespace Volian.Controls.Library
ItemInfo selii = vt.VEObject as ItemInfo;
if (selii == null)
{
MessageBox.Show("Must select a valid step, not a grouping part such as 'RNO', 'Steps', etc");
FlexibleMessageBox.Show("Must select a valid step, not a grouping part such as 'RNO', 'Steps', etc");
return;
}
SaveCancelEnabling();
@@ -1141,7 +1142,7 @@ namespace Volian.Controls.Library
{
if (tvTran.SelectedNode==null)
{
MessageBox.Show("Must 'Select Step' for transition 'to'");
FlexibleMessageBox.Show("Must 'Select Step' for transition 'to'");
return;
}
}
@@ -1151,13 +1152,13 @@ namespace Volian.Controls.Library
{
if (_RangeNode1==null)
{
MessageBox.Show("Must 'Select Step' for transition 'to'");
FlexibleMessageBox.Show("Must 'Select Step' for transition 'to'");
return;
}
toItem = (ItemInfo)_RangeNode1.VEObject;
if (_RangeNode2 == null && tvTran.SelectedNode == null)
{
MessageBox.Show("Must 'Select Step' for range transition 'to'");
FlexibleMessageBox.Show("Must 'Select Step' for range transition 'to'");
return;
}
if (_RangeNode2 == null) _RangeNode2 = (VETreeNode)tvTran.SelectedNode;
@@ -1183,7 +1184,7 @@ namespace Volian.Controls.Library
// Check that the two items are of the below the section type.
if (toItem.MyContent.Type < 20000 || rangeItem.MyContent.Type < 20000)
{
MessageBox.Show("Must select two items at the step level or below, i.e. no sections, procedures, etc.");
FlexibleMessageBox.Show("Must select two items at the step level or below, i.e. no sections, procedures, etc.");
return;
}
// be sure that the order is right, i.e. to is before range in list.
@@ -1231,7 +1232,7 @@ namespace Volian.Controls.Library
}
if (toItem==null)
{
MessageBox.Show("Must 'Select Section' or 'Select Step' for transition 'to'");
FlexibleMessageBox.Show("Must 'Select Section' or 'Select Step' for transition 'to'");
return;
}
linktxt = string.Format("#Link:Transition:{0} <NewID> {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID);
@@ -1241,7 +1242,7 @@ namespace Volian.Controls.Library
toItem = (ItemInfo)cbTranProcs.SelectedItem;
if (toItem == null)
{
MessageBox.Show("Must select an item for transition 'to'");
FlexibleMessageBox.Show("Must select an item for transition 'to'");
return;
}
linktxt = string.Format("#Link:Transition:{0} <NewID> {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID);
@@ -1255,19 +1256,19 @@ namespace Volian.Controls.Library
sb.AppendLine();
sb.AppendLine(string.Format("Source step {0} has applicability of {1}", pt.FromStep, pt.FromAppl));
sb.AppendLine(string.Format("Destination step {0} has applicability of {1}", pt.ToStep, pt.ToAppl));
MessageBox.Show(sb.ToString());
FlexibleMessageBox.Show(sb.ToString());
return;
}
if(listBoxTranFmt.Text.Contains("{Step Text}") && toItem.ItemID == MyRTB.MyItemInfo.ItemID)
{
MessageBox.Show("You cannot add a transition to itself for a transition that includes Step Text",
FlexibleMessageBox.Show("You cannot add a transition to itself for a transition that includes Step Text",
"Cannot add recusive transition", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
// B2015-170 - don't allow a transition to step that is not sequental
if ((toItem != null &&!toItem.IsNumbered) || (rangeItem != null && !rangeItem.IsNumbered))
{
MessageBox.Show("For transitions containing step references, the transition must be to a numbered or lettered step.",
FlexibleMessageBox.Show("For transitions containing step references, the transition must be to a numbered or lettered step.",
"Cannot add transition to a non-seqential step", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}