This commit is contained in:
Generated
+1
-1
@@ -78,7 +78,7 @@
|
||||
// comboBox1
|
||||
//
|
||||
comboBox1.FormattingEnabled = true;
|
||||
comboBox1.Items.AddRange(new object[] { "172.16.48.9\tkr0-1-sw1", "172.16.48.10\tkr0-1-sw2", "172.16.48.11\tkr0-1-sw3", "172.16.48.12\tkr0-1-sw4", "172.16.48.13\tkr0-2-sw1", "172.16.48.14\tkr0-2-sw2", "172.16.48.15\tkr0-2-sw3", "172.16.48.16\tkr0-2-sw4", "172.16.48.17\tkr1_sw1", "172.16.48.18\tkr1_sw2", "172.16.48.19\tkr1_sw3", "172.16.48.20\tkr1_sw4", "172.16.48.21\tkr1_sw5", "172.16.48.22\tkr1_sw6", "172.16.48.23\tkr2-sw1", "172.16.48.24\tkr2-sw2", "172.16.48.25\tkr2-sw3", "172.16.48.26\tkr2-sw4", "172.16.48.27\tkr2-sw5", "172.16.48.28\tkr2-sw6", "172.16.48.29\tkr2-sw7", "172.16.48.30\tkr2-sw8", "172.16.48.31\tkr3-sw1", "172.16.48.32\tkr3-sw2", "172.16.48.33\tkr3-sw3", "172.16.48.34\tkr3-sw4", "172.16.48.35\tkr3-sw5", "172.16.48.36\tkr3-sw6", "172.16.48.37\tkr4-sw1", "172.16.48.38\tkr4-sw2", "172.16.48.39\tkr4-sw3", "172.16.48.40\tkr4-sw4", "172.16.48.41\tkr4-sw5", "172.16.48.42\tkr4-sw6", "172.16.48.43\tkr4-sw7", "172.16.48.44\tkr4-sw8", "172.16.48.45\tkr5-sw1", "172.16.48.46\tkr6-sw1", "172.16.48.47\tkr6-sw2", "172.16.48.48\tkr7-sw1", "172.16.48.49\tkr7-sw2", "172.16.48.50\tkr8-sw1", "172.16.48.51\tkr8-sw2", "172.16.48.52\tkr9-sw1", "172.16.48.53\tkr10-sw1", "172.16.48.54\tkr10-sw2", "172.16.48.55\tkr10-sw3", "172.16.48.56\tkr11-sw1", "172.16.48.57\tkr11-sw2", "172.16.48.58\tkr11-sw3", "172.16.48.59\tkr11-sw4", "172.16.48.60\tkr12-sw1", "172.16.48.61\tkr12-sw2", "172.16.48.62\tkr13-sw1", "172.16.48.63\tkr13-sw2", "172.16.48.64\tkr14-sw1", "172.16.48.65\tkr14-sw2", "172.16.48.66\tkr15-sw1", "172.16.48.67\tkr15-sw2", "172.16.48.68\tkr15-sw3", "172.16.48.69\tkr15-sw4", "172.16.48.70\tkr16-sw1", "172.16.48.71\tkr16-sw2", "172.16.48.72\tkr16-sw3", "172.16.48.73\tkr16-sw4", "172.16.48.74\tkr16-sw5", "172.16.48.75\tkr16-sw6", "172.16.48.76\tkr2_sw9", "172.16.48.77\tsw_rum111", "172.16.48.78\tkr15_sw5" });
|
||||
comboBox1.Items.AddRange(new object[] { "172.22.10.2\t", "172.22.10.3\t", "172.22.10.6\t", "172.22.10.7\t", "172.22.10.8\t", "172.22.10.9\t", "172.22.10.12\t", "172.22.10.13\t" });
|
||||
comboBox1.Location = new Point(32, 20);
|
||||
comboBox1.Name = "comboBox1";
|
||||
comboBox1.Size = new Size(147, 21);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace SwitchDahua
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
|
||||
};
|
||||
server = "172.16.48.9";
|
||||
server = "172.22.10.7";
|
||||
_httpClient = new HttpClient(handler);
|
||||
_httpClient.Timeout = TimeSpan.FromSeconds(30);
|
||||
|
||||
@@ -193,9 +193,10 @@ namespace SwitchDahua
|
||||
|
||||
var responseJson = await response.Content.ReadAsStringAsync();
|
||||
LLDP ListDev = JsonConvert.DeserializeObject<LLDP>(responseJson);
|
||||
|
||||
var DevList = ListDev.Params;
|
||||
DevList = DevList.OrderBy(item => item.ManagerIP).ToList();
|
||||
string txt = string.Empty;
|
||||
foreach (var dev in ListDev.Params)
|
||||
foreach (var dev in DevList)
|
||||
{
|
||||
txt += dev.LocalInterface.Substring(dev.LocalInterface.LastIndexOf('/') + 1) + "\t" + dev.ManagerIP + Environment.NewLine;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user