B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Drawing;
|
||||
using Volian.Base.Library;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
// This was moved from volian.controls.library
|
||||
namespace VEPROMS.CSLA.Library
|
||||
@@ -2220,7 +2221,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!DidMsgBox) // only put the message box out once.
|
||||
{
|
||||
DidMsgBox = true;
|
||||
MessageBox.Show(string.Format("{0} does not have Referenced Object Path set.",myDocVersion.MyFolder.Name), "No RO Path Set", MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
|
||||
FlexibleMessageBox.Show(string.Format("{0} does not have Referenced Object Path set.", myDocVersion.MyFolder.Name), "No RO Path Set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
return myROFst==null?false:myROFst.IsSetpointDB(dbid, myDocVersion);
|
||||
|
@@ -83,7 +83,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
else
|
||||
MessageBox.Show(ex.Message, "SQL Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
FlexibleMessageBox.Show(ex.Message, "SQL Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ namespace VEPROMS.CSLA.Library
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!HandleSqlExceptionOnCopy(ex))
|
||||
System.Windows.Forms.MessageBox.Show("Details were written to the Error Log.", "Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -551,7 +551,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (DestType >= 20000 && DestType != SourceType)
|
||||
{
|
||||
string msg = "The step you are copying TO is a different type than the step you are copying FROM.\n\nThe copied step will inherit the destination step type.\n\nOnce copied, the step type can be changed from the Tags tab on the Step Properties panel.";
|
||||
MessageBox.Show(msg, "Different Step Types", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(msg, "Different Step Types", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
// B2016-009 - added a message box explaining to the user that the copyed step will take on the destination type. 16-bit PROMS had also done this way.
|
||||
@@ -561,7 +561,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (DestType >= 20000 && DestType != SourceType)
|
||||
{
|
||||
string msg = "The step you are copying TO is a different type than the step you are copying FROM.\n\nThe copied step will inherit the destination step type.\n\nOnce copied, the step type can be changed from the Tags tab on the Step Properties panel.";
|
||||
MessageBox.Show(msg, "Different Step Types", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(msg, "Different Step Types", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
public ItemInfo PasteSiblingBefore(int copyStartID, string chgid)
|
||||
@@ -586,7 +586,7 @@ namespace VEPROMS.CSLA.Library
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!HandleSqlExceptionOnCopy(ex))
|
||||
System.Windows.Forms.MessageBox.Show("Details were written to the Error Log.","Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -617,7 +617,7 @@ namespace VEPROMS.CSLA.Library
|
||||
catch (Exception ex)
|
||||
{
|
||||
if(!HandleSqlExceptionOnCopy(ex))
|
||||
System.Windows.Forms.MessageBox.Show("Details were written to the Error Log.", "Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -630,13 +630,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
if (ex.Message.Contains("This step has been deleted"))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("The step being pasted has been deleted!", "Cannot Paste Deleted Step"
|
||||
FlexibleMessageBox.Show("The step being pasted has been deleted!", "Cannot Paste Deleted Step"
|
||||
, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
|
||||
return true;
|
||||
}
|
||||
if(ex.Message.Contains("This current step has been deleted in another session"))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("The highlighted step has been deleted by another user!", "Cannot Paste Step"
|
||||
FlexibleMessageBox.Show("The highlighted step has been deleted by another user!", "Cannot Paste Step"
|
||||
, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
|
||||
return true;
|
||||
}
|
||||
@@ -2440,7 +2440,7 @@ namespace VEPROMS.CSLA.Library
|
||||
|| ex.Message.Contains("This step has been deleted")
|
||||
)
|
||||
throw ex;
|
||||
System.Windows.Forms.MessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
return itemInfo;
|
||||
}
|
||||
else
|
||||
@@ -2452,13 +2452,13 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (ex.Message.Contains("This step has been deleted"))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("The step being pasted has been deleted!", "Cannot Paste Deleted Step"
|
||||
FlexibleMessageBox.Show("The step being pasted has been deleted!", "Cannot Paste Deleted Step"
|
||||
, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
|
||||
return true;
|
||||
}
|
||||
if (ex.Message.Contains("This current step has been deleted in another session"))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("The highlighted step has been deleted by another user!", "Cannot Paste Step"
|
||||
FlexibleMessageBox.Show("The highlighted step has been deleted by another user!", "Cannot Paste Step"
|
||||
, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand);
|
||||
return true;
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ using System.Data.SqlClient;
|
||||
using System.Text.RegularExpressions;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -806,8 +807,8 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex.Message.Contains("Could not find stored procedure"))
|
||||
System.Windows.Forms.MessageBox.Show("Have your DBA run the latest version of PROMSFixes.SQL", "SQL code is not current", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
|
||||
if (ex.Message.Contains("Could not find stored procedure"))
|
||||
FlexibleMessageBox.Show("Have your DBA run the latest version of PROMSFixes.SQL", "SQL code is not current", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@ using System.Data.SqlClient;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using Volian.Base.Library;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -321,11 +322,11 @@ namespace VEPROMS.CSLA.Library
|
||||
SetAssociationLastCompleted(docver, DateTime.Now.ToString()); // RO Update completed successfully and un-interrupted, save the date/time to the Doc Version Association config
|
||||
myProgressBarRefresh(100, 100, "RO Update Complete"); // update the progress bar
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
// pop up a message window telling the user the RO Update has completed and now many ROs were updated
|
||||
// pop up a message window telling the user the RO Update has completed and how many ROs were updated
|
||||
// If we are updating RO from the Admin Tools (from the V button) and we are updating more than on procedure set, then just append the "RO Update Complete" text
|
||||
// To the MessageList. Once completed will all procedure sets, Admin Tools will display one message box with all the results in it.
|
||||
if (MessageList == null)
|
||||
System.Windows.Forms.MessageBox.Show(fixedROs == 0 ? "No ROs Required Updating" : string.Format("{0} ROs Updated for {1}", fixedROs, dvi.MyFolder.Name), "RO Update Complete");
|
||||
FlexibleMessageBox.Show(fixedROs == 0 ? "No ROs Required Updating" : string.Format("{0} ROs Updated for {1}", fixedROs, dvi.MyFolder.Name), "RO Update Complete");
|
||||
else
|
||||
MessageList.AppendLine((fixedROs == 0 ? "No ROs Required Updating for " : string.Format("{0} ROs Updated for ", fixedROs)) + dvi.MyFolder.Name);
|
||||
|
||||
|
Reference in New Issue
Block a user