예제 #1
0
        private void tsm3_Click(object sender, EventArgs e)
        {
            try
            {
                DataGridView dgv = new DataGridView();
                if (tabSim.SelectedTab.Name == "tabDev")
                {
                    dgv = this.dgOnline;
                }
                if (dgv.SelectedRows.Count != 1)
                {
                    return;
                }

                Cursor.Current    = Cursors.WaitCursor;
                CsConst.MyTmpName = new List <string>();
                int             wdDeviceType = CsConst.myOnlines[currentSelectDeviceDindex].DeviceType;
                frmModifAddress frmNew       = new frmModifAddress(currentSelectDeviceSubnetId, currentSelectDeviceDeviceId, wdDeviceType);
                if (frmNew.ShowDialog() == DialogResult.OK)
                {
                    UpdateAddressAfterModify();
                }
                Cursor.Current = Cursors.Default;
            }
            catch
            {
            }
        }
예제 #2
0
 private void dgvResult_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         if ((sender as DataGridView).SelectedCells == null)
         {
             return;
         }
         if (e.RowIndex < 0)
         {
             return;
         }
         Cursor.Current = Cursors.WaitCursor;
         int rowIndex = dgvResult.SelectedRows[0].Index;
         if (e.ColumnIndex == 1 || e.ColumnIndex == 2)
         {
             Cursor.Current = Cursors.WaitCursor;
             currentSelectDeviceSubnetId = Byte.Parse(dgvResult.SelectedCells[1].Value.ToString());
             currentSelectDeviceDeviceId = Byte.Parse(dgvResult.SelectedCells[2].Value.ToString());
             int wdDeviceType = Int32.Parse(dgvResult.SelectedCells[6].Value.ToString());
             CsConst.MyTmpName = new List <string>();
             frmModifAddress frmNew = new frmModifAddress(currentSelectDeviceSubnetId, currentSelectDeviceDeviceId, wdDeviceType);
             if (frmNew.ShowDialog() == DialogResult.OK)
             {
                 dgvResult.SelectedCells[1].Value = CsConst.MyTmpName[0];
                 dgvResult.SelectedCells[2].Value = CsConst.MyTmpName[1];
             }
         }
     }
     catch
     { }
 }
예제 #3
0
 private void ADV3_Click(object sender, EventArgs e)
 {
     try
     {
         CsConst.MyTmpName = new List <string>();
         frmModifAddress frmNew = new frmModifAddress();
         if (frmNew.ShowDialog() == DialogResult.OK)
         {
             UpdateAddressAfterModify();
         }
     }
     catch
     {
     }
 }