B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.
This commit is contained in:
@@ -15,6 +15,7 @@ using Volian.Base.Library;
|
||||
using DevComponents.DotNetBar;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -326,7 +327,7 @@ namespace Volian.Controls.Library
|
||||
else if (btn.Name.Contains("Unlink"))
|
||||
{
|
||||
// C2019=003: add a confirmation dialog before unlinking a step:
|
||||
if (MessageBox.Show(this, "Do you want to unlink this step?", "Confirm Enhanced Step Unlink", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
if (FlexibleMessageBox.Show(this, "Do you want to unlink this step?", "Confirm Enhanced Step Unlink", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
MyEditItem.UnlinkEnhanced(MyEditItem.MyItemInfo);
|
||||
}
|
||||
}
|
||||
@@ -662,7 +663,7 @@ namespace Volian.Controls.Library
|
||||
SymbolList sl = fmt.PlantFormat.FormatData.SymbolList;
|
||||
if (sl == null || sl.Count <= 0)
|
||||
{
|
||||
MessageBox.Show("No symbols are available, check with administrator");
|
||||
FlexibleMessageBox.Show("No symbols are available, check with administrator");
|
||||
return;
|
||||
}
|
||||
BuildSymbolGallery(sl, galleryContainerSymbolsCM, galleryContainerSymbolsCM3, galleryContainerSymbolsGrid, galleryContainerSymbolsCM4);
|
||||
@@ -1039,9 +1040,9 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
// Fix B2016-238 Fix B2017-139 account for image sub-steps
|
||||
// C2017-028 don't display message if on a table (allow sup info off of a table)
|
||||
if (_MyEditItem.MyStepRTB.Text == "" && !(_MyEditItem is ImageItem) && !(_MyEditItem is GridItem))
|
||||
if (_MyEditItem.MyStepRTB.Text == "" && !(_MyEditItem is ImageItem) && !(_MyEditItem is GridItem))
|
||||
{
|
||||
MessageBox.Show(this, "Cannot insert step from empty step.", "Insert step", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
FlexibleMessageBox.Show(this, "Cannot insert step from empty step.", "Insert step", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
string cautNoteOrder = _MyEditItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CautionNoteOrder;
|
||||
@@ -1114,7 +1115,7 @@ namespace Volian.Controls.Library
|
||||
System.Drawing.Image img = Clipboard.GetImage();
|
||||
if (img == null && tabOrFigType.Contains("CL"))
|
||||
{
|
||||
MessageBox.Show("Clipboard does not contain image data. Cannot create figure.", "Clipboard Error");
|
||||
FlexibleMessageBox.Show("Clipboard does not contain image data. Cannot create figure.", "Clipboard Error");
|
||||
return;
|
||||
}
|
||||
_MyEditItem.AddChild((E_FromType)fromtype, contenttype, tabOrFigType.Contains("CL") ? ImageItem.E_ImageSource.Clipboard : ImageItem.E_ImageSource.File);
|
||||
@@ -1128,7 +1129,7 @@ namespace Volian.Controls.Library
|
||||
switch (OleObjectEditors)
|
||||
{
|
||||
case 0: // None
|
||||
MessageBox.Show("The Equation Editor needs to be started.", "Reminder", MessageBoxButtons.OK);
|
||||
FlexibleMessageBox.Show("The Equation Editor needs to be started.", "Reminder", MessageBoxButtons.OK);
|
||||
break;
|
||||
case 1: // Equation Editor
|
||||
Process.Start(EqnEdtPath);
|
||||
@@ -2804,7 +2805,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
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 myROID;
|
||||
@@ -2828,7 +2829,7 @@ namespace Volian.Controls.Library
|
||||
if (myROID == null) return;
|
||||
if (myROID.StartsWith("ffff"))
|
||||
{
|
||||
MessageBox.Show("Unit Information RO's cannot be edited", "Unit Information RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show("Unit Information RO's cannot be edited", "Unit Information RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
//string roapp = Environment.GetEnvironmentVariable("roapp");
|
||||
@@ -2836,7 +2837,7 @@ namespace Volian.Controls.Library
|
||||
string args = "\"" + myRODB.FolderPath + "\" " + myROID;
|
||||
if (!Directory.Exists(myRODB.FolderPath))
|
||||
{
|
||||
MessageBox.Show(string.Format("RO Database directory does not exist: {0}", myRODB.FolderPath));
|
||||
FlexibleMessageBox.Show(string.Format("RO Database directory does not exist: {0}", myRODB.FolderPath));
|
||||
return;
|
||||
}
|
||||
System.Diagnostics.Process.Start(roapp, args);
|
||||
@@ -2951,20 +2952,20 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -2975,13 +2976,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);
|
||||
return;
|
||||
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);
|
||||
@@ -2995,7 +2996,7 @@ namespace Volian.Controls.Library
|
||||
if (Mydvi.DocVersionAssociations.Count < 1)
|
||||
{
|
||||
FinalProgressBarMessage = "No ROs associated";
|
||||
MessageBox.Show("Error Updating ro.fst", "No associated ro.fst"); //B2017-125 added title to messagebox
|
||||
FlexibleMessageBox.Show("Error Updating ro.fst", "No associated ro.fst"); //B2017-125 added title to messagebox
|
||||
return;
|
||||
}
|
||||
ROFstInfo roFstInfo = Mydvi.DocVersionAssociations[0].MyROFst;
|
||||
@@ -3004,7 +3005,7 @@ namespace Volian.Controls.Library
|
||||
if (!File.Exists(rofstPath))
|
||||
{
|
||||
FinalProgressBarMessage = "No existing RO.FST";
|
||||
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
|
||||
return;
|
||||
}
|
||||
// B2017-130 code no longer needed. Was checking the DTS but always was different by miliseconds
|
||||
@@ -3182,7 +3183,7 @@ namespace Volian.Controls.Library
|
||||
if (tmp.MyDisplayTabControl.MyCopyStep != null &&
|
||||
tmp.MyDisplayTabControl.MyCopyStep.ItemID == MyEditItem.MyItemInfo.ItemID)
|
||||
{
|
||||
if (MessageBox.Show("Are you sure?\n\nIf you delete this step you will not able to paste it.\nYou should paste it before you delete it.", "Attempting to delete copied step.", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
|
||||
if (FlexibleMessageBox.Show("Are you sure?\n\nIf you delete this step you will not able to paste it.\nYou should paste it before you delete it.", "Attempting to delete copied step.", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
|
||||
clearCopyStep = true;
|
||||
}
|
||||
|
||||
@@ -3191,7 +3192,7 @@ namespace Volian.Controls.Library
|
||||
if (si != null)
|
||||
{
|
||||
string msg = si.HasChildren ? "Are you sure you want to delete this section and its steps?" : "Are you sure you want to delete this section?";
|
||||
DialogResult result = MessageBox.Show(msg, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
DialogResult result = FlexibleMessageBox.Show(msg, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
|
||||
@@ -3212,7 +3213,7 @@ namespace Volian.Controls.Library
|
||||
StepInfo stpi = MyEditItem.MyItemInfo as StepInfo;
|
||||
if (stpi == null) // not sure that it will every get here!
|
||||
{
|
||||
MessageBox.Show("Unknown type {0}, cannot delete!", MyEditItem.MyItemInfo.GetType().Name);
|
||||
FlexibleMessageBox.Show("Unknown type {0}, cannot delete!", MyEditItem.MyItemInfo.GetType().Name);
|
||||
return;
|
||||
}
|
||||
if (!surpressMessageBox)
|
||||
@@ -3228,7 +3229,7 @@ namespace Volian.Controls.Library
|
||||
if (stpi.HasEnhancedLinkedStep)
|
||||
msgs = msgs + " The linked Enhanced step will also be deleted!";
|
||||
//string msgs = stpi.HasChildren ? "Are you sure you want to delete this step and its substeps?" : "Are you sure you want to delete this step?";
|
||||
DialogResult results = MessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
DialogResult results = FlexibleMessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
if (MyFlexGrid != null)
|
||||
{
|
||||
MyFlexGrid.Styles.Fixed.BackColor = MyFlexGrid.DefaultFixedBackgroundColor;
|
||||
@@ -3282,7 +3283,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
case "OpenRtfRawContextMenu":
|
||||
ClearContextMenu();
|
||||
MessageBox.Show("No context menu for equations.");
|
||||
FlexibleMessageBox.Show("No context menu for equations.");
|
||||
break;
|
||||
case "PSI":
|
||||
displayMenu = true;
|
||||
@@ -3322,7 +3323,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
// If in Proms Express, let user know if they are going to create a new substep deeper than 4 levels:
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.Express && MyItemInfo.GetStepLevel() >= 4)
|
||||
MessageBox.Show("Per PPA WG Standard If the task exceeds four step levels, consider rewriting the task.", "Warning...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
FlexibleMessageBox.Show("Per PPA WG Standard If the task exceeds four step levels, consider rewriting the task.", "Warning...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
break;
|
||||
case "InsCaution":
|
||||
displayMenu = ((actable & E_AccStep.AddingCaution) > 0) && btnCMInsCaution.Enabled;
|
||||
@@ -3372,7 +3373,7 @@ namespace Volian.Controls.Library
|
||||
if ((actable & e_AccStep) > 0) return;
|
||||
string msg = string.Format("Cannot add a {0} to this step type. If this is desired please contact Volian to change your format", stepType);
|
||||
string cpt = string.Format("Cannot add {0}", stepType);
|
||||
MessageBox.Show(msg, cpt, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(msg, cpt, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btnSpell_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -3388,7 +3389,7 @@ namespace Volian.Controls.Library
|
||||
ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo);
|
||||
this.Cursor = Cursors.Default;
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||
MessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btnRefObjRefresh_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
@@ -3397,7 +3398,7 @@ namespace Volian.Controls.Library
|
||||
ProcedureInfo.ResetROCounters();
|
||||
ProcedureInfo.RefreshReferenceObjects(MyItemInfo.MyProcedure as ProcedureInfo);
|
||||
this.Cursor = Cursors.Default;
|
||||
MessageBox.Show(this, string.Format("Checked {0} referenced objects, fixed {1} referenced objects", ProcedureInfo.ROCheckCount, ProcedureInfo.ROFixCount), "Results of Refresh Referenced Objects", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(this, string.Format("Checked {0} referenced objects, fixed {1} referenced objects", ProcedureInfo.ROCheckCount, ProcedureInfo.ROFixCount), "Results of Refresh Referenced Objects", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
//private FindReplace dlgFindReplace = null;
|
||||
private void btnFindRplDlg_Click(object sender, EventArgs e)
|
||||
@@ -3631,7 +3632,7 @@ namespace Volian.Controls.Library
|
||||
// highlight selected step(s) and prompt to see if selection is what user wants:
|
||||
if (MyFlexGrid != null) MyEditItem.IdentifyMe(true);
|
||||
MyEditItem.IdentifyChildren(true);
|
||||
DialogResult dr = MessageBox.Show("Step as Marked?", "Identify Step To Be Copied", MessageBoxButtons.YesNo);
|
||||
DialogResult dr = FlexibleMessageBox.Show("Step as Marked?", "Identify Step To Be Copied", MessageBoxButtons.YesNo);
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
StepTabPanel tmp = Parent as StepTabPanel;
|
||||
|
Reference in New Issue
Block a user