Пример #1
0
 private void AddMachine()
 {
     Machine machine = new Machine();
     machine.MasterFile = this.txtMasterFile.Text;
     machine.ProductionFile = this.txtProductionDirectory.Text;
     AddMachine am = new AddMachine(machine);
     if (am.ShowDialog() == DialogResult.OK)
     {
         this.m_MachineCollection.AddMachine(machine);
     }
 }
Пример #2
0
 private void EditMachine(DataGridViewRow row)
 {
     try
     {
         Machine machine = row.DataBoundItem as Machine;
         using (AddMachine am = new AddMachine(machine))
         {
             am.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error loading settings", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log.LogError("EditMachine", ex);
     }
 }