示例#1
0
 private void ToolStripMenuItem_DirectionalTest_1_Click(object sender, EventArgs e)
 {
     if (listViewEx_GWlist.SelectedItems != null)
     {
         if (listViewEx_GWlist.SelectedItems.Count == 0)
         {
             return;
         }
         int                   nowSelectIndex  = listViewEx_GWlist.SelectedItems[0].Index;
         byte[]                tempIp          = myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x89);
         int                   tempPort        = myVaneConfigTool.getByteLen(myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x8A));
         string                tempGW_SN       = myVaneConfigTool.getUtf8StrByBytes(myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x99));
         IPEndPoint            tempIep         = new IPEndPoint(new IPAddress(tempIp), tempPort);
         vaneConfigConnectInfo tempConnectInfo = new vaneConfigConnectInfo(tempGW_SN, tempIep);
         Thread                myThread        = new Thread(new ParameterizedThreadStart(newDirectionalTestForDevEpAdd));
         myThread.Start(tempConnectInfo);
     }
 }
示例#2
0
 private void listViewEx_GWlist_DoubleClick(object sender, EventArgs e)
 {
     //testWindow myTestWindow = new testWindow();
     //myTestWindow.TopLevel = false;
     //myTestWindow.Parent = this.panel_configMain;
     //myTestWindow.Show();
     //return;
     if (listViewEx_GWlist.SelectedItems != null)
     {
         if (listViewEx_GWlist.SelectedItems.Count == 0)
         {
             return;
         }
         setGwListMax(false);
         int                   nowSelectIndex  = listViewEx_GWlist.SelectedItems[0].Index;
         byte[]                tempIp          = myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x89);
         int                   tempPort        = myVaneConfigTool.getByteLen(myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x8A));
         string                tempGW_ID       = myVaneConfigTool.getUtf8StrByBytes(myVaneConfigTool.pickOutContent(myVaneBroadcastConfigList[nowSelectIndex].myVaneConfig, 0x86));
         IPEndPoint            tempIep         = new IPEndPoint(new IPAddress(tempIp), tempPort);
         vaneConfigConnectInfo tempConnectInfo = new vaneConfigConnectInfo(tempGW_ID, tempIep);
         Thread                myThread        = new Thread(new ParameterizedThreadStart(newVaneCfgWindow));
         myThread.Start(tempConnectInfo);
     }
 }