Пример #1
0
        public PrettyForm()
        {
            InitializeComponent();

            KeyPreview = true;

            buttonExit.Click  += (s, e) => Close();
            buttonRun.Click   += (s, e) => AutoStart?.Invoke(s, e);
            buttonStop.Click  += (s, e) => AutoStop?.Invoke(s, e);
            buttonReset.Click += (s, e) => ResetAll?.Invoke(s, e);
            buttonStep.Click  += (s, e) => OneStep?.Invoke(s, e);
        }
Пример #2
0
 /// <summary>
 /// Событие остановки по окончанию.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnAutoStop(EventArgs e)
 {
     AutoStop?.Invoke(this, e);
 }