B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.
This commit is contained in:
@@ -639,7 +639,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
if (ui == null)
|
||||
{
|
||||
MessageBox.Show("Security has not been defined for PROMS. All functionality has been defaulted to the lowest level for all users until security is defined.", "no security defined", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show("Security has not been defined for PROMS. All functionality has been defaulted to the lowest level for all users until security is defined.", "no security defined", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
@@ -1276,7 +1276,7 @@ namespace Volian.Controls.Library
|
||||
if (!di.Exists) di.Create();
|
||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") +"_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_") + ".pxml";
|
||||
xd.Save(fileName);
|
||||
MessageBox.Show("Approved procedure saved to import file " + fileName,"Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
void ApprovedRevision_Click(object sender, EventArgs e)
|
||||
@@ -1642,7 +1642,7 @@ namespace Volian.Controls.Library
|
||||
if (mip.Text.StartsWith("Showing Change Bars Starting"))
|
||||
OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
else
|
||||
MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mip.Text));
|
||||
FlexibleMessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mip.Text));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1812,11 +1812,11 @@ namespace Volian.Controls.Library
|
||||
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
|
||||
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
|
||||
case "CANNOT PASTE HERE. Click for more information...":
|
||||
MessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" +
|
||||
FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" +
|
||||
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
|
||||
break;
|
||||
case "CANNOT PASTE HERE, Click for more information...":
|
||||
MessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" +
|
||||
FlexibleMessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" +
|
||||
"It CANNOT be pasted before or after an Enhanced Document.", "Cannot Paste Here");
|
||||
break;
|
||||
//case "Check Out Procedure Set":
|
||||
@@ -1829,7 +1829,7 @@ namespace Volian.Controls.Library
|
||||
if (mi.Text.StartsWith("Showing Change Bars Starting"))
|
||||
OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
else
|
||||
MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mi.Text));
|
||||
FlexibleMessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mi.Text));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1874,7 +1874,7 @@ namespace Volian.Controls.Library
|
||||
// to modify code to get which one (when there is more than one)
|
||||
if (MyDVI.DocVersionAssociations.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Error Updating ro.fst. No associated ro.fst", "No ROs associated"); //B2017-125 added title to messagebox
|
||||
FlexibleMessageBox.Show("Error Updating ro.fst. No associated ro.fst", "No ROs associated"); //B2017-125 added title to messagebox
|
||||
FinalProgressBarMessage = "No ROs associated";
|
||||
return;
|
||||
}
|
||||
@@ -1882,20 +1882,20 @@ namespace Volian.Controls.Library
|
||||
string rofstPath = roFstInfo.MyRODb.FolderPath + @"\ro.fst";
|
||||
if (!File.Exists(rofstPath))
|
||||
{
|
||||
MessageBox.Show("No existing ro.fst in path " + roFstInfo.MyRODb.FolderPath + ". Check for invalid path", "No existing RO.FST"); //B2017-125 added title to messagebox
|
||||
FlexibleMessageBox.Show("No existing ro.fst in path " + roFstInfo.MyRODb.FolderPath + ". Check for invalid path", "No existing RO.FST"); //B2017-125 added title to messagebox
|
||||
FinalProgressBarMessage = "No existing RO.FST";
|
||||
return;
|
||||
}
|
||||
FileInfo fiRofst = new FileInfo(rofstPath);
|
||||
if (roFstInfo.DTS == fiRofst.LastWriteTimeUtc)
|
||||
{
|
||||
MessageBox.Show("ro.fst files are same for path " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done", "RO.FST up to date"); //B2017-125 added title to messagebox
|
||||
FlexibleMessageBox.Show("ro.fst files are same for path " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done", "RO.FST up to date"); //B2017-125 added title to messagebox
|
||||
FinalProgressBarMessage = "RO.FST up to date";
|
||||
return;
|
||||
}
|
||||
if (roFstInfo.DTS > fiRofst.LastWriteTimeUtc)
|
||||
{
|
||||
MessageBox.Show("Cannot copy older ro.fst from " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done", "Older RO.FST"); //B2017-125 added title to messagebox
|
||||
FlexibleMessageBox.Show("Cannot copy older ro.fst from " + roFstInfo.MyRODb.FolderPath + ", import of that ro.fst will not be done", "Older RO.FST"); //B2017-125 added title to messagebox
|
||||
FinalProgressBarMessage = "Older RO.FST";
|
||||
return;
|
||||
}
|
||||
@@ -1903,7 +1903,7 @@ namespace Volian.Controls.Library
|
||||
string message = string.Empty;
|
||||
if (!MySessionInfo.CanCheckOutItem(MyDVI.VersionID, CheckOutType.DocVersion, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FinalProgressBarMessage = "Cannot check-out Working Draft";
|
||||
return;
|
||||
}
|
||||
@@ -2011,20 +2011,20 @@ namespace Volian.Controls.Library
|
||||
DocVersionInfo MyDVI = tn.VEObject as DocVersionInfo;
|
||||
if (VlnSettings.ReleaseMode.Equals("DEMO"))
|
||||
{
|
||||
MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
|
||||
FlexibleMessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
|
||||
return;
|
||||
}
|
||||
//string roapp = Environment.GetEnvironmentVariable("roapp");
|
||||
string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable
|
||||
if (roapp == null || roapp == string.Empty)
|
||||
{
|
||||
MessageBox.Show("The 'roapp' environment variable needs to be set to the path of the RO Editor\n\n Ex: C:\\VE-PROMS.NET\\Bin\\roeditor.exe", "Environment Variable Error");
|
||||
FlexibleMessageBox.Show("The 'roapp' environment variable needs to be set to the path of the RO Editor\n\n Ex: C:\\VE-PROMS.NET\\Bin\\roeditor.exe", "Environment Variable Error");
|
||||
return;
|
||||
}
|
||||
if (!File.Exists(roapp))
|
||||
{
|
||||
string errtxt = string.Format("Could not find path to Referenced Objects Editor:\n\n roapp = {0}\n\n Verify the path assigned to the 'roapp' environment variable", roapp);
|
||||
MessageBox.Show(errtxt, "Environment Variable Error");
|
||||
FlexibleMessageBox.Show(errtxt, "Environment Variable Error");
|
||||
//MessageBox.Show("Could not find path to Ro Editor, check 'roapp' environment variable","Environment Variable Error");
|
||||
return;
|
||||
}
|
||||
@@ -2035,13 +2035,13 @@ namespace Volian.Controls.Library
|
||||
//}
|
||||
if (MyDVI == null || MyDVI.DocVersionAssociationCount < 1)
|
||||
{
|
||||
MessageBox.Show("Could not find associated path for ro data.", "No RO Data", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show("Could not find associated path for ro data.", "No RO Data", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
string roloc = "\"" + MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath + "\"";
|
||||
if (!Directory.Exists(MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath))
|
||||
{
|
||||
MessageBox.Show(string.Format("RO Database directory does not exist: {0}", MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
|
||||
FlexibleMessageBox.Show(string.Format("RO Database directory does not exist: {0}", MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
|
||||
return;
|
||||
}
|
||||
System.Diagnostics.Process.Start(roapp, roloc);
|
||||
@@ -2066,7 +2066,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(iiClipboard.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Copied Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Copied Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2074,7 +2074,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!MySessionInfo.CanCheckOutItem(iiClipboard.MyContent.MyEntry.DocID, CheckOutType.Document, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Copied Document Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Copied Document Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2256,7 +2256,7 @@ namespace Volian.Controls.Library
|
||||
else if ((tn.VEObject as SectionInfo) != null)
|
||||
OpenProperties(tn.VEObject as SectionInfo);
|
||||
else if ((tn.VEObject as StepInfo) != null)
|
||||
MessageBox.Show("Open up info tab or whatever is associated with step");
|
||||
FlexibleMessageBox.Show("Open up info tab or whatever is associated with step");
|
||||
if (!tn.MovedToSeparateWindow) tn.RefreshNode(); // C2015-022 don't want to rebuild tree node in the main window if it is currently in a child window
|
||||
}
|
||||
private void OpenProperties(FolderInfo folderInfo)
|
||||
@@ -2476,7 +2476,7 @@ namespace Volian.Controls.Library
|
||||
if (_LastProcedureInfo != null)
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
@@ -2502,7 +2502,7 @@ namespace Volian.Controls.Library
|
||||
if (_LastItemInfo.Sections == null && _LastItemInfo.Steps != null && _LastItemInfo.Steps.Count > 0)
|
||||
{
|
||||
|
||||
if (MessageBox.Show(this, "Inserting a subsection at this location will cause the steps of this section to become hidden. After inserting the subsection, you will need exit and re-enter PROMS, then select the Editable Data checkbox on the properties page for the section containing the hidden steps in order for the steps to become visible again. Do you want to continue?", "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
if (FlexibleMessageBox.Show(this, "Inserting a subsection at this location will cause the steps of this section to become hidden. After inserting the subsection, you will need exit and re-enter PROMS, then select the Editable Data checkbox on the properties page for the section containing the hidden steps in order for the steps to become visible again. Do you want to continue?", "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2558,7 +2558,7 @@ namespace Volian.Controls.Library
|
||||
string message = string.Empty;
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
@@ -2600,7 +2600,7 @@ namespace Volian.Controls.Library
|
||||
string message = string.Empty;
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
@@ -2611,7 +2611,7 @@ namespace Volian.Controls.Library
|
||||
string message = string.Empty;
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastStepInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
@@ -2910,19 +2910,19 @@ namespace Volian.Controls.Library
|
||||
if(_LastStepInfo != null)
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastStepInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
if (_LastSectionInfo != null)
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
if (_LastProcedureInfo != null)
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
if (_LastDocVersionInfo != null)
|
||||
@@ -2936,7 +2936,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
MessageBox.Show(this, sb.ToString(), "Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, sb.ToString(), "Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2957,12 +2957,12 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
MessageBox.Show(this, sb.ToString(), "Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show(this, sb.ToString(), "Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
DialogResult result = MessageBox.Show("Are you sure you want to delete " + SelectedNode.Text, "Verify Delete",
|
||||
DialogResult result = FlexibleMessageBox.Show("Are you sure you want to delete " + SelectedNode.Text, "Verify Delete",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
@@ -3220,7 +3220,7 @@ namespace Volian.Controls.Library
|
||||
DocVersionInfo ddrag = ((VETreeNode)dragNode).VEObject as DocVersionInfo;
|
||||
if ((iidrag == null && fdrag == null && ddrag == null))
|
||||
{
|
||||
MessageBox.Show("Cannot drag/drop a grouping node.");
|
||||
FlexibleMessageBox.Show("Cannot drag/drop a grouping node.");
|
||||
return;
|
||||
}
|
||||
// don't put up message, message kept coming up on any selection of node (to copy, properties, etc)
|
||||
|
Reference in New Issue
Block a user