コード例 #1
0
ファイル: MainForm.cs プロジェクト: heatgithub/TheSilencer
 /// <summary>
 /// Clicking the Stop button
 /// </summary>
 private void Stop_Click(object sender, EventArgs e)
 {
     // stop the timer
     textBoxMusicProgram.Enabled = true;
     textBoxDelay.Enabled        = true;
     TheTimer.Stop();
 }
コード例 #2
0
 private void ToolStripButton2_Click(object sender, EventArgs e)
 {
     //TheTimer.Enabled = false;
     TheTimer.Stop();
     IsRunning             = false;
     propertyGrid1.Enabled = true;
     btnStart.Enabled      = true;
     btnStop.Enabled       = false;
     statusPanel.Text      = "off";
 }
コード例 #3
0
 private void TheTimer_Tick(object sender, EventArgs e)
 {
     try
     {
         _timeSpan          = DateTime.Now - _past;
         toolPanelTime.Text = ElapsedTime = _timeSpan.Minutes.ToString() + ":" + _timeSpan.Seconds.ToString();
         ///Запускает эмулицию продукции на производстве
         Simulation();
     }
     catch (Exception ex)
     {
         TheTimer.Stop();
         MessageBox.Show(ex.Message);
         //return;
     }
 }
コード例 #4
0
        private void Source_OnEmpty(object sender, EventArgs e)
        {
            TheTimer.Stop();
            TheTimer.Enabled = false;
            IsRunning        = false;
            MessageBox.Show("Источник пуст!");
            Statisctics statisctics = new Statisctics()
            {
                Count       = this.Count,
                CrashCount  = this.CrashCount,
                ElapsedTime = this.ElapsedTime
            };

            if (CreateStatisctics(statisctics))
            {
                toolStripButtonStatisctics.Enabled = true;
                toolStripButtonStatisctics.Checked = true;
                btnStop.PerformClick();
                statusPanel.Text = "complete";
            }
        }
コード例 #5
0
 private void ToolStripButton4_Click(object sender, EventArgs e)
 {
     TheTimer.Stop();
     IsRunning        = false;
     btnStart.Enabled = true;
 }