Exemple #1
0
 private void ManageDrivesNew()
 {
     try
     {
         using (var form = new DriveSettings(0))
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 InitialiseTimers(this.WritingEnabled);
                 LoadDrives(form.DriveInfoID);
             }
         }
     }
     catch (Exception exc)
     {
         LogManager.Write(exc.Message);
         MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }
Exemple #2
0
        private void ManageDrivesEdit()
        {
            try
            {
                if (dgDrives.SelectedRows.Count == 1)
                {
                    int id = SelectedDriveID;

                    using (var form = new DriveSettings(id))
                    {
                        if (form.ShowDialog() == DialogResult.OK)
                        {
                            InitialiseTimers(this.WritingEnabled);
                            LoadDrives(form.DriveInfoID);
                        }
                    }
                }
            }
            catch (Exception exc)
            {
                LogManager.Write(exc.Message);
                MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }