B2019-030 Use FlexableMesageBox instead of MessageBox so that it is always on top.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user