예제 #1
0
        private void Mc_DeleteRequested(object sender, EventArgs e)
        {
            MachineControl machine = sender as MachineControl;

            ContainingProject.DFAMachines.Remove(machine.ContainingMachine);
            InvalidateMachinesGrid();
        }
예제 #2
0
        public void InvalidateMachinesGrid()
        {
            MachinesGrid.Children.Clear();
            foreach (DFAMachine machine in ContainingProject.DFAMachines)
            {
                MachineControl mc = new MachineControl(machine);
                mc.DeleteRequested += Mc_DeleteRequested;
                MachinesGrid.Children.Add(mc);
            }

            foreach (TuringMachine machine in ContainingProject.TuringMachines)
            {
                TuringMachineControl tmc = new TuringMachineControl(machine);
                tmc.DeleteRequested += Tmc_DeleteRequested;;
                MachinesGrid.Children.Add(tmc);
            }
        }