-
Notifications
You must be signed in to change notification settings - Fork 0
/
MsgBox.cs
66 lines (59 loc) · 2.24 KB
/
MsgBox.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Decompiled with JetBrains decompiler
// Type: MsgBox.MBox
// Assembly: WebOrderImportCraft, Version=1000.510.8894.24695, Culture=neutral, PublicKeyToken=bf11c4f15ab4e1ef
// MVID: F965BC17-D6AC-43D0-B104-3E53F0C380F8
// Assembly location: P:\Synergy\VMAWS Custom Apps\WebOrderImportCraft\WebOrderImportCraft.exe
using SRISupport;
using System.Windows.Forms;
namespace MsgBox
{
internal static class MBox
{
public static bool logIt;
public static UserMessageBatch UserMsg;
public static DialogResult Show(string message)
{
if (!MBox.logIt)
return MessageBox.Show(message);
MBox.UserMsg.MessageSend(message, "Program", UserMessage.msgLevel.Information);
return DialogResult.OK;
}
public static DialogResult Show(string text, string caption)
{
if (!MBox.logIt)
return MessageBox.Show(text, caption);
MBox.UserMsg.MessageSend(caption + ": " + text, "Program", UserMessage.msgLevel.Information);
return DialogResult.OK;
}
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons)
{
if (!MBox.logIt)
return MessageBox.Show(text, caption, buttons);
MBox.UserMsg.MessageSend(caption + ": " + text, "Program", UserMessage.msgLevel.Information);
return buttons == MessageBoxButtons.YesNo ? DialogResult.Yes : DialogResult.OK;
}
public static DialogResult Show(
string text,
string caption,
MessageBoxButtons buttons,
MessageBoxIcon icon)
{
if (!MBox.logIt)
return MessageBox.Show(text, caption, buttons, icon);
MBox.UserMsg.MessageSend(caption + ": " + text, "Program", UserMessage.msgLevel.Information);
return buttons == MessageBoxButtons.YesNo ? DialogResult.Yes : DialogResult.OK;
}
public static DialogResult Show(
string text,
string caption,
MessageBoxButtons buttons,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton)
{
if (!MBox.logIt)
return MessageBox.Show(text, caption, buttons, icon, defaultButton);
MBox.UserMsg.MessageSend(caption + ": " + text, "Program", UserMessage.msgLevel.Information);
return buttons == MessageBoxButtons.YesNo ? DialogResult.Yes : DialogResult.OK;
}
}
}