Пример #1
0
 /// <summary>
 /// 创建唯一实例
 /// </summary>
 public static FrmOnOff CreateInstance(int idNo, int outPutNum, COnOff_List OnOff)
 {
     lock (syncRoot)
     {
         if (dlg == null || dlg.IsDisposed)
         {
             dlg = new FrmOnOff(idNo, outPutNum, OnOff);
         }
     }
     return(dlg);
 }
Пример #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (OnOffView.SelectedCells.Count == 0)
            {
                return;
            }

            if (OnOffView.SelectedCells[0].RowIndex < 0)
            {
                return;
            }

            int row = OnOffView.SelectedCells[0].RowIndex;

            _onOff[row].Describe = OnOffView.Rows[row].Cells[1].Value.ToString();

            FrmOnOff.CreateInstance(row, _outPutNum, _onOff[row]).Show();
        }