Пример #1
0
        private void minimizeToolBn_Click(object sender, EventArgs e)
        {
            if ((ActiveMdiChild is MDIChildTemplate) && (ActiveMdiChild != null))
            {
                TerminalAutomat min, old =
                    ((MDIChildTemplate)ActiveMdiChild).machine;


                if (minimizationShower.Visible)
                {
                    minimizationShower.Clear();
                }
                else
                {
                    minimizationShower = new MinimizationPiClasses(this);
                }

                old.ClassesChanged += min_ClassesChanged;
                min = old.GetMinimized();
                old.ClassesChanged -= min_ClassesChanged;

                MDIChildTemplate child = new MDIChildTemplate(min);
                child.MdiParent = this;
                child.Text      = "Minimized automat " +
                                  ((MDIChildTemplate)ActiveMdiChild).Text;

                child.Show();
                minimizationShower.Show();
                minimizationShower.Left = Right - minimizationShower.Width;
            }
        }
Пример #2
0
 public MDIChildTemplate(TerminalAutomat a)
 {
     if (a == null)
     {
         throw new AutomatException("Automat is a 'null'!");
     }
     InitializeComponent();
     machine = a;
     //progressBar.Minimum = 0;
     //progressBar.Step = 1;
     txtIn_TextChanged(null, new EventArgs());
     if (machine != null)
     {
         machine.PrintAutomat(grid);
     }
 }