-
Notifications
You must be signed in to change notification settings - Fork 0
/
modMain.cs
99 lines (86 loc) · 2.56 KB
/
modMain.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using System;
using System.Windows.Forms;
namespace SKS
{
internal static class modMain
{
public static bool CurrentUserAdmin = false;
public static string UserFullname = "";
public static string UserLevel = "";
public static string UserId = "";
public static string ConnectionString = "";
public static int DetectionType = 0;
public static double n = 0;
public static int i = 0;
public static string s = "";
public static System.DateTime d = DateTime.FromOADate(0);
public static string msg = "";
public static string ImgName = "", ImgSrc = "";
//UPGRADE_WARNING: (1047) Application will terminate when Sub Main() finishes. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1047
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Orders.mdb;Persist Security Info=False";
modConnection.OpenConnection();
CurrentUserAdmin = true;
UserFullname = "Allan Cantillo";
UserLevel = "Administrator";
UserId = "acantillo";
Application.Run(frmMain.DefInstance);
}
internal static void LogStatus(string message, Form frm = null)
{
StatusStrip sb = null;
sb = null;
((ToolStripStatusLabel) frmMain.DefInstance.sbStatusBar.Items[0]).Text = message;
if (frm != null)
{
if (frm == frmAdjustStockManual.DefInstance)
{
sb = frmAdjustStockManual.DefInstance.sbStatusBar;
}
else if (frm == frmActionOrderReception.DefInstance)
{
sb = frmActionOrderReception.DefInstance.sbStatusBar;
}
else if (frm == frmActionOrderRequest.DefInstance)
{
sb = frmActionOrderRequest.DefInstance.sbStatusBar;
}
else if (frm == frmAddStockManual.DefInstance)
{
sb = frmAddStockManual.DefInstance.sbStatusBar;
}
else if (frm == frmReceptionApproval.DefInstance)
{
sb = frmReceptionApproval.DefInstance.sbStatusBar;
}
else if (frm == frmOrderReception.DefInstance)
{
sb = frmOrderReception.DefInstance.sbStatusBar;
}
else if (frm == frmOrderRequest.DefInstance)
{
sb = frmOrderRequest.DefInstance.sbStatusBar;
}
else if (frm == frmRequestApproval.DefInstance)
{
sb = frmRequestApproval.DefInstance.sbStatusBar;
}
if (sb != null)
{
if (((ToolStripStatusLabel) sb.Items[0]) != null)
{
((ToolStripStatusLabel) sb.Items[0]).Text = message;
}
}
}
}
internal static void ClearLogStatus(Form frm = null)
{
LogStatus("", frm);
}
}
}