Esempio n. 1
0
        private void Tmc_DeleteRequested(object sender, EventArgs e)
        {
            TuringMachineControl machine = sender as TuringMachineControl;

            ContainingProject.TuringMachines.Remove(machine.ContainingMachine);
            InvalidateMachinesGrid();
        }
Esempio n. 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);
            }
        }