private void MachineDetail_Click(object sender, EventArgs e) { if (machineDetailForm.IsDisposed) { machineDetailForm = new MachineDetailForm(KC_DisMachine, Machine); } machineDetailForm.Show(); machineDetailForm.BringToFront(); }
public void RefreshData(KC_DisMachine DisMachine) { KC_DisMachine = DisMachine; DataContext = new DataContext(); KC_ImplementBase = new KC_ImplementBase(DataContext); Machine = new AutoCutMachine(); Machine = KC_ImplementBase.Get_AutoCutMachine((int)KC_DisMachine.AutoCutMachineId); if (machineDetailForm == null) { machineDetailForm = new MachineDetailForm(DisMachine, Machine); } else { machineDetailForm.RefreshDetail(DisMachine); } UpdateMachineInfo(); }