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

@@ -8,6 +8,7 @@ using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using System.IO;
using System.Text.RegularExpressions;
using JR.Utils.GUI.Forms;
namespace Volian.Controls.Library
{
@@ -197,10 +198,10 @@ namespace Volian.Controls.Library
ContentAuditInfo cai = lbChanges.SelectedItem as ContentAuditInfo;
if (cai != null)
{
// The following line was incorrectly showing a message stating that the item was deleted when it was noot.
// The following line was incorrectly showing a message stating that the item was deleted when it was not.
//if (cai.DeleteStatus > 0 || (cai.DeleteStatus == 0 && cai.ActionWhen.Year == DateTime.MinValue.Year))
if (cai.DeleteStatus > 0)
MessageBox.Show("This item has been deleted.", "Deleted Item", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
FlexibleMessageBox.Show("This item has been deleted.", "Deleted Item", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
else
{
try
@@ -210,7 +211,7 @@ namespace Volian.Controls.Library
// If the selected item is deleted display a message rather than crashing
catch (Exception ex)
{
MessageBox.Show("This item has been deleted.", "Deleted Item", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
FlexibleMessageBox.Show("This item has been deleted.", "Deleted Item", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
@@ -622,10 +623,10 @@ namespace Volian.Controls.Library
// if original equation is restored, don't allow it because it is empty:
if ((cai.Type > 20999 && cai.Type < 21010) && cai.ActionWhat.ToUpper() == "ORIGINAL")
{
MessageBox.Show(this, "Cannot restore original empty or new equation.", "Warning on restore", MessageBoxButtons.OK);
FlexibleMessageBox.Show(this, "Cannot restore original empty or new equation.", "Warning on restore", MessageBoxButtons.OK);
return;
}
if (MessageBox.Show(this, "Do you want to restore this content change?", "Confirm Content Change Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (FlexibleMessageBox.Show(this, "Do you want to restore this content change?", "Confirm Content Change Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
ROFstInfo myRoFst = null; // B2017-118 If No ROFST don't crash
if (MyItemInfo.MyDocVersion.DocVersionAssociations != null)
@@ -656,7 +657,7 @@ namespace Volian.Controls.Library
if (tn.Tag is ItemAuditInfo)
{
ItemAuditInfo iai = tn.Tag as ItemAuditInfo;
if (MessageBox.Show(this, string.Format("Do you want to restore this {0}?",iai.ItemType), string.Format("Confirm {0} Restore",iai.ItemType), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (FlexibleMessageBox.Show(this, string.Format("Do you want to restore this {0}?", iai.ItemType), string.Format("Confirm {0} Restore", iai.ItemType), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
//Console.WriteLine("DisplayHistory.btnRestore_Click @ {0}", DateTime.Now);
ItemInfo ii = null;
@@ -782,7 +783,7 @@ namespace Volian.Controls.Library
if (tn.Tag is AnnotationAuditInfo)
{
AnnotationAuditInfo aai = tn.Tag as AnnotationAuditInfo;
if (MessageBox.Show(this, "Do you want to restore this annotation?", "Confirm Annotation Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (FlexibleMessageBox.Show(this, "Do you want to restore this annotation?", "Confirm Annotation Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
AnnotationInfo ai = AnnotationInfo.RestoreAnnotation(aai);
OnAnnotationRestored(ai, ai.MyItem);
@@ -795,7 +796,7 @@ namespace Volian.Controls.Library
if (tn.Tag is GridAuditInfo)
{
GridAuditInfo gai = tn.Tag as GridAuditInfo;
if (MessageBox.Show(this, "Do you want to restore this table?", "Confirm Table Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (FlexibleMessageBox.Show(this, "Do you want to restore this table?", "Confirm Table Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
ContentAuditInfo cai = ContentAuditInfo.Get(gai.ContentAuditID);
ROFstInfo myRoFst = null; // B2017-118 If No ROFST don't crash
@@ -813,7 +814,7 @@ namespace Volian.Controls.Library
if (tn.Tag is ImageAuditInfo)
{
ImageAuditInfo iai = tn.Tag as ImageAuditInfo;
if (MessageBox.Show(this, "Do you want to restore this image?", "Confirm Image Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (FlexibleMessageBox.Show(this, "Do you want to restore this image?", "Confirm Image Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
ContentInfo ci = ContentInfo.RestoreImage(iai);
RefreshRequired = true;