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.Runtime.InteropServices;
using System.Text.RegularExpressions;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
namespace Volian.Controls.Library
{
@@ -2196,16 +2197,16 @@ namespace Volian.Controls.Library
}
if (MyItemInfo != null && MyItemInfo.IsRtfRaw && MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION") && !hasEquation)
{
MessageBox.Show("Cannot paste non-equation data into an equation step type.", "Invalid data", MessageBoxButtons.OK);
FlexibleMessageBox.Show("Cannot paste non-equation data into an equation step type.", "Invalid data", MessageBoxButtons.OK);
//richTextBox1.Dispose();
e.Handled = true;
return;
}
// if inserting anything other than equation, be sure that an equation is not in the buffer:
else if (hasEquation && (MyItemInfo==null || (MyItemInfo != null && !MyItemInfo.IsRtfRaw && !MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION"))))
else if (hasEquation && (MyItemInfo == null || (MyItemInfo != null && !MyItemInfo.IsRtfRaw && !MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION"))))
{
MessageBox.Show("Cannot paste equation data into an non-equation step type.", "Invalid data", MessageBoxButtons.OK);
//richTextBox1.Dispose();
FlexibleMessageBox.Show("Cannot paste equation data into an non-equation step type.", "Invalid data", MessageBoxButtons.OK);
//richTextBox1.Dispose();
e.Handled = true;
return;
}
@@ -2242,7 +2243,7 @@ namespace Volian.Controls.Library
{
if (!iData.GetDataPresent(DataFormats.Text) && !iData.GetDataPresent(DataFormats.Rtf))
{
MessageBox.Show("Cannot paste, text has special characters or symbols that will not paste correctly.");
FlexibleMessageBox.Show("Cannot paste, text has special characters or symbols that will not paste correctly.");
}
else
{
@@ -2631,7 +2632,7 @@ namespace Volian.Controls.Library
if (!IsControlChar && MyItemInfo != null && MyItemInfo.IsRtfRaw)
{
string err = string.Format("Cannot enter text into an equation or incorrect keystroke entered for equation");
MessageBox.Show(err, "Invalid text.", MessageBoxButtons.OK);
FlexibleMessageBox.Show(err, "Invalid text.", MessageBoxButtons.OK);
e.Handled = true;
return;
}
@@ -2746,7 +2747,7 @@ namespace Volian.Controls.Library
ptext = ptext.Replace("\u2011", "-"); // Replace non-breaking hyphen with hyphen
ptext = ptext.Replace("\u2572", "\\"); // Replace backslash symbol with backslash character
if (didCharReplace)
MessageBox.Show("Replacing pasted characters that are not supported by Proms with a '?'.");
FlexibleMessageBox.Show("Replacing pasted characters that are not supported by Proms with a '?'.");
return ptext;
}
private void DoDeleteEndBetweenLinks()
@@ -2947,13 +2948,13 @@ namespace Volian.Controls.Library
{
if (IsSelectionLinked(SelectionStart, SelectionLength))
{
MessageBox.Show(fndrpldlg,"Cannot replace linked text!", "Find/Replace");
FlexibleMessageBox.Show(fndrpldlg, "Cannot replace linked text!", "Find/Replace");
dlgrslt = DialogResult.No;
}
else
{
if (prompt)
dlgrslt = MessageBox.Show(fndrpldlg,"Replace This Occurence?", "Replace Text", MessageBoxButtons.YesNoCancel);
dlgrslt = FlexibleMessageBox.Show(fndrpldlg, "Replace This Occurrence?", "Replace Text", MessageBoxButtons.YesNoCancel);
if (dlgrslt == DialogResult.Yes)
SelectedText = rpltxt;
}