Ejemplo n.º 1
0
        private void timer1_CustomTick(object sender, EventArgs e)
        {
            var elapsedTime = globalModel.Time;

            if (time == globalModel.Time)
            {
                timer1.Dispose();
                timer1.Stop();
                timer1.Tick   -= timer1_CustomTick;
                timer1.Enabled = false;
                time           = 0;
                txtTime.Text   = "00:00";
                isWorking      = false;
                _service.showHeatedMessage(txtProgram.Text);
                return;
            }
            txtTime.Text     = ConvertSecondsToMask(elapsedTime.Value - time);
            txtProgram.Text += potencyStr;
            if (!globalFile.IsNull())
            {
                File.AppendAllText(globalFile, potencyStr);
            }
            time++;
        }