예제 #1
0
 public override void Close()
 {
     if (null != MonitorTimer)
     {
         MonitorTimer.Stop();
         MonitorTimer = null;
     }
 }
예제 #2
0
        public override bool Start()
        {
            if (null != MonitorTimer)
            {
                MonitorTimer.Stop();
            }
            MonitorTimer          = new Timer();
            MonitorTimer.Interval = ConstCodeHelper.MONITOR_INTERVAL;
            MonitorTimer.Elapsed += MonitorTimer_Elapsed;
            MonitorTimer.Start();

            return(true);
        }
예제 #3
0
        /// <summary>
        ///     Disposes this instance.
        /// </summary>
        /// <param name="disposing">A value indicating whether disposal is in progress.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!Disposed)
            {
                if (disposing)
                {
                    MonitorTimer.Stop();
                    MonitorTimer.Dispose();

                    CancelAll();
                }

                Disposed = true;
            }
        }