Model/CustomTimer.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.Timers;
using System.ComponentModel;
using System.Diagnostics;
using CustomTimers.Model;

namespace CustomTimers
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class CustomTimer
    {
        //-----------------------------------------------
        // Private data members
        //-----------------------------------------------
        public enum IntervalUnits { Millisecond, Second, Minute, Hour };
        public enum TimerStates { Stopped, Running, Paused };

        protected int _Hour = 0;
        protected int _Minute = 0;
        protected int _Second = 0;
        protected int _Millisecond = 0;
        protected int _Interval = 1000;
        protected IntervalUnits _IntervalUnit = IntervalUnits.Millisecond;
        protected TimerStates _State = TimerStates.Stopped;
        protected ISynchronizeInvoke _SynchronizingObject = null;
        protected bool _UseHighResolution = true;

        protected IPrimitiveTimer _Timer = null;
        protected bool _IsCompleted = false;
        //protected DateTime _SystemTimeLatched = DateTime.Now;
        protected Stopwatch _DiagnosticsStopWatch = new Stopwatch ();

        //-----------------------------------------------
        // Public properties
        //-----------------------------------------------
        public int Hour
        {
            get { return _Hour; }
            set { _Hour = value; }
        }

        public int Minute
        {
            get { return _Minute; }
            set { _Minute = value; }
        }

        public int Second
        {
            get { return _Second; }
            set { _Second = value; }
        }

        public int Millisecond
        {
            get { return _Millisecond; }
后面还有 303 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。