FormManager.cs
4.0 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.AutoInOutStore
{
public class FormManager
{
//#03A9F4
public static Color buttonColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
//public static Color buttonColor = System.Drawing.SystemColors.ActiveCaption;
//public static Color buttonColor = System.Drawing.Color.FromArgb(((int)((0x00))), ((int)((0x66))), ((int)(0xFF)));
//private static string skinFileName = Application.StartupPath + @"\Skins\Wave.ssk";
private static string skinFileName = Application.StartupPath + @"\Skins\DiamondBlue.ssk";
public static string SkinFileName
{
set
{
}
get
{
if (SkinsList.Count <= 0)
{
SkinsList = GetSkinList();
}
if (SkinsList.Count > 0 && index >= 0)
{
return SkinsList[index];
}
return skinFileName;
}
}
private static int index = -1;
public static void DefaultSkin()
{
index = -1;
}
public static void NextSkin()
{
index++;
if (index >= SkinsList.Count)
{
index = 0;
}
}
public static List<string> SkinsList = new List<string>();
private static List<string> GetSkinList()
{
List<string> returnList = new System.Collections.Generic.List<string>();
string[] fileList = Directory.GetFiles(Application.StartupPath + @"\Skins");
foreach (string sr in fileList)
{
if (sr.Contains(".ssk"))
{
returnList.Add(sr);
}
}
return returnList;
}
//public static FrmAxisMoveConfig FrmAxisConfig = null;
//public static void ShowAxisConfig(AC_SA_BoxBean boxBean)
//{
// if (FormManager.FrmAxisConfig == null)
// {
// FormManager.FrmAxisConfig = new FrmAxisMoveConfig(boxBean);
// FormManager.FrmAxisConfig.Show();
// }
// else
// {
// //FormManager.FrmAxisConfig.ShowDialog();
// if (FormManager.FrmAxisConfig.IsDisposed)
// {
// FormManager.FrmAxisConfig = new FrmAxisMoveConfig(boxBean);
// FormManager.FrmAxisConfig.Show();
// }
// else
// {
// FormManager.FrmAxisConfig.Activate();
// }
// }
//}
private static FrmAxisDebug debug = null;
public static void ShowAxisDebug(AC_SA_BoxBean store)
{
if (debug == null)
{
debug = new FrmAxisDebug(store);
debug.Show();
}
else
{
if (debug.IsDisposed)
{
debug = new FrmAxisDebug(store);
debug.Show();
}
else
{
debug.Activate();
}
}
}
private static FrmIOStatus frmIo = null;
public static void ShowIOShow(AC_SA_BoxBean store)
{
if (frmIo == null)
{
frmIo = new FrmIOStatus(store);
frmIo.Show();
}
else
{
if (frmIo.IsDisposed)
{
frmIo = new FrmIOStatus(store);
frmIo.Show();
}
else
{
frmIo.Activate();
}
}
}
}
}