-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDataBrige.cs
234 lines (165 loc) · 6.74 KB
/
DataBrige.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using static IPAM_NOTE.ViewMode;
namespace IPAM_NOTE
{
internal class DataBrige
{
public static ViewMode.AddressInfo TempAddress = new ViewMode.AddressInfo(0, "", "", "", "", "");
public static string SelectIp;
public static ViewMode.IpAddressInfo IpAddress = new ViewMode.IpAddressInfo(0, 0, "", "", System.Net.NetworkInformation.IPStatus.Unknown, -1, "", "", "", "");
public static List<IpAddressInfo> ipAddressInfos = new List<IpAddressInfo>();
/// <summary>
/// 当前软件版本号
/// </summary>
public static string Ver = "1.24";
/// <summary>
/// 最新版本号
/// </summary>
public static string LatestVersion = "0";
/// <summary>
/// 最新下载地址
/// </summary>
public static String DownloadUrl = "";
/// <summary>
/// 0为新建网段,1为编辑网段
/// </summary>
public static int AddStatus = 0;
/// <summary>
/// 搜索框搜索后被选中的IP地址索引
/// </summary>
public static int SelectIndex;
/// <summary>
/// 搜索框搜索的网段INDEX
/// </summary>
public static int SelectNetwork;
/// <summary>
/// 正常加载=0,搜索加载=1
/// </summary>
public static int LoadType;
/// <summary>
/// 搜索时所选表格名字
/// </summary>
public static string SelectTableName;
//public static List<IpAddressInfo> ipAddressInfos = new List<IpAddressInfo>();
//搜索区网段列表
public static ObservableCollection<ComBoxAddressInfo> ComBoxAddressInfos = new ObservableCollection<ComBoxAddressInfo>();
/// <summary>
/// 数据导入界面,网段ComboBox数据源
/// </summary>
public static List<string> ComboBoxAddressList = new List<string>();
/// <summary>
/// 被选择的按钮的标记
/// </summary>
public static int SelectButtonTag;
/// <summary>
/// 搜索的类型,0为全局搜索,1为指定搜索
/// </summary>
public static int SearchType;
/// <summary>
/// 全局搜索时点击搜索结果被选中的表项
/// </summary>
public static ViewMode.SearchInfo SelectSearchInfo = new ViewMode.SearchInfo();
/// <summary>
/// 全局搜索时候获取的结果列表
/// </summary>
public static List<ViewMode.SearchInfo> searchInfos = new List<SearchInfo>();
/// <summary>
/// 分配或者释放模式,0为未选择状态、1为选择未分配地址准备分配,2为选择已分配地址准备释放
/// </summary>
public static int SelectMode = 0;
/// <summary>
/// 多选模式下一并被选择的IP
/// </summary>
public static List<int> SelectedIpAddress = new List<int>();
/// <summary>
/// 更新信息
/// </summary>
public static string UpdateInfos = "";
//----------------------------DevicesPage-----------------------------------
//获取到的设备信息列表
public static List<DeviceInfo> DeviceInfos = new List<DeviceInfo>();
/// <summary>
/// 从数据库获取到的设备端口信息列表
/// </summary>
public static List<ViewMode.DevicePortInfo> DevicePortInfos = new List<ViewMode.DevicePortInfo>();
/// <summary>
/// 所选设备端口的标签
/// </summary>
public static string SelectDeviceButtonTag;
/// <summary>
/// 点击设备列表时临时存储当前所选设备的对应信息
/// </summary>
public static ViewMode.DeviceInfo SelectDeviceInfo;
/// <summary>
/// 点击端口按钮后临时存储所选端口对应的信息
/// </summary>
public static ViewMode.DevicePortInfo SelectDevicePortInfo;
/// <summary>
/// 0为添加设备,1为编辑设备
/// </summary>
public static int DeviceAddStatus = 0;
/// <summary>
/// 设备端口的选择模式,0为未选择状态,1为已选择未分配端口准备分配,2为已选择已分配端口准备释放
/// </summary>
public static int SelectDevicePortMode = 0;
/// <summary>
/// 多选模式下首次选择的端口类型,E,F,M,D
/// </summary>
public static string SelectDevicePortType = "";
/// <summary>
/// 多选模式下首次选择的端口状态,0未分配,1已分配
/// </summary>
public static string SelectDevicePortStatus = "-1";
/// <summary>
/// 多选模式下,一次选择的多个端口清单
/// </summary>
public static List<string> portList = new List<string>();//批量选择的端口号
/// <summary>
/// 设备端口列表显示还是图形显示,0为图形,1为列表
/// </summary>
public static int GraphicsMode = 0;
/// <summary>
/// 搜索的设备表名
/// </summary>
public static string SearchDeviceTableName;
/// <summary>
/// 点击设备列表时候的设备表名
/// </summary>
public static string SelectDeviceTableName;
/// <summary>
/// 全局搜索到的设备信息清单
/// </summary>
public static List<SearchDeviceInfo> SearchDeviceInfos = new List<SearchDeviceInfo>();
/// <summary>
/// 设备信息加载方式,0为正常加载,1为搜索加载
/// </summary>
public static int DeviceLoadType;
/// <summary>
/// 设备端口信息搜索方式,0为全局搜索,1为指定搜索
/// </summary>
public static int DeviceSearchType = -1;
/// <summary>
/// 设备列表,显示在搜索筛选框
/// </summary>
public static List<string> DevicesList = new List<string>();
/// <summary>
/// 表示点击标签是编辑还是访问,0为访问,1为编辑
/// </summary>
public static int EditMode = 0;
/// <summary>
/// 表示当前选中的导航标签,-1为未选择
/// </summary>
public static int SelectIndexTag = -1;
//----------------------------ModelPreset-----------------------------------
/// <summary>
/// 型号预设列表
/// </summary>
public static List<ViewMode.ModelPresetInfo> ModelPresetInfos = new List<ViewMode.ModelPresetInfo>();
}
}