示例#1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (FormEditDevice form = new FormEditDevice(null, mListDevice))
     {
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             DoRefresh();
         }
     }
 }
示例#2
0
        private void mListViewData_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Device data = mListViewData.SelectedObject as Device;

            if (data != null && data.DeviceID > 0)
            {
                using (FormEditDevice form = new FormEditDevice(data, mListDevice))
                {
                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        DoRefresh();
                    }
                }
            }
        }