Beispiel #1
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            FrmDevice frmDevice = new FrmDevice();
            long selectedID = long.Parse(e.Node.Name.Substring(3));
            if (e.Node.Name.Substring(0,3) == "Dev")
            {
                frmDevice.SelectedFormType = FrmDevice.Device_EndPoint.Device;
                frmDevice.SelectedApiDevice = C.apiDevices.First(x => x.ID == selectedID);
            }
            else
            {
                frmDevice.SelectedFormType = FrmDevice.Device_EndPoint.EndPoint;
                frmDevice.SelectedAPIEndPoint = C.apiEndPoints.First(x => x.ID == selectedID);
            }
            frmDevice.lblSelectedFormType.Text = frmDevice.SelectedFormType.ToString();

            frmDevice.ShowDeviceInfo();
            frmDevice.Show();
        }
Beispiel #2
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            FrmDevice frmDevice  = new FrmDevice();
            long      selectedID = long.Parse(e.Node.Name.Substring(3));

            if (e.Node.Name.Substring(0, 3) == "Dev")
            {
                frmDevice.SelectedFormType  = FrmDevice.Device_EndPoint.Device;
                frmDevice.SelectedApiDevice = C.apiDevices.First(x => x.ID == selectedID);
            }
            else
            {
                frmDevice.SelectedFormType    = FrmDevice.Device_EndPoint.EndPoint;
                frmDevice.SelectedAPIEndPoint = C.apiEndPoints.First(x => x.ID == selectedID);
            }
            frmDevice.lblSelectedFormType.Text = frmDevice.SelectedFormType.ToString();

            frmDevice.ShowDeviceInfo();
            frmDevice.Show();
        }