示例#1
0
        //Runtime timer
        private void tmrRuntime_Tick(object sender, EventArgs e)
        {
            _runtimeseconds++;
            if (_runtimeseconds == 60)
            {
                _runtimeminutes++;
                _runtimeseconds = 00;
            }
            else if (_runtimeminutes == 60)
            {
                _runtimehours++;
                _runtimeminutes = 00;
                if (_once)
                {
                    using (var x = new FormSupport())
                    {
                        x.ShowDialog();
                        _once = false;
                    }
                }
            }
            else if (_runtimehours == 24)
            {
                _runtimedays++;
                _runtimehours = 00;
            }

            lblRuntime.Text = @"Runtime: " + _runtimedays.ToString("00") + @":" + _runtimehours.ToString("00") + @":" + _runtimeminutes.ToString("00") + @":" +
                              _runtimeseconds.ToString("00");
        }
示例#2
0
        //Runtime timer
        private void tmrRuntime_Tick(object sender, EventArgs e)
        {
            

            _runtimeseconds++;
            if (_runtimeseconds == 60)
            {
                _runtimeminutes++;
                _runtimeseconds = 00;
            }
            else if (_runtimeminutes == 60)
            {
                _runtimehours++;
                _runtimeminutes = 00;
                if (_once)
                {
                    using (var x = new FormSupport())
                    {
                        x.ShowDialog();
                        _once = false;
                    }
                }
            }
            else if (_runtimehours == 24)
            {
                _runtimedays++;
                _runtimehours = 00;
            }

            lblRuntime.Text = @"Runtime: " +_runtimedays.ToString("00") + @":" + _runtimehours.ToString("00") + @":" + _runtimeminutes.ToString("00") + @":" +
                              _runtimeseconds.ToString("00");
        }