Пример #1
0
        // Protected implementation of Dispose pattern.
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                handle.Dispose();
                timer.Dispose();
                ucTimer = null;
            }

            disposed = true;
        }
Пример #2
0
        /// <summary>
        /// Create a new TimerItem to create multiple running timers.
        /// </summary>
        public TimerItem(DateTime popupDate, string text, int id, string mode)
        {
            this.popupDate = popupDate;
            timer          = new Timer();
            timer.Interval = 1000;
            timer.Tick    += Timer_Tick;
            this.timerText = text;
            this.id        = id;

            if (mode == "old")
            {
                ucTimer = Form1.Instance.ucTimer;
            }
            else
            {
                mucTimer = MaterialForm1.Instance.timer;
            }
        }
Пример #3
0
        // Protected implementation of Dispose pattern.
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                handle.Dispose();
                timer.Dispose();
                if (ucTimer != null)
                {
                    ucTimer = null;
                }
                else
                {
                    mucTimer = null;
                }
            }

            disposed = true;
        }