Пример #1
0
        private void InitializeTimer()
        {
            InitTimer e = (this.ReceivedEvent as InitTimer);

            this.client     = e.client;
            this.IsPeriodic = e.IsPeriodic;
            this.tid        = e.tid;
            this.Send(this.Id, new RepeatTimeout());
        }
Пример #2
0
        private void InitializeTimer()
        {
            InitTimer e = (this.ReceivedEvent as InitTimer);

            this.Client     = e.client;
            this.IsPeriodic = e.IsPeriodic;
            this.Period     = e.Period;
            this.tid        = e.tid;

            this.IsTimerEnabled = true;
            this.timer          = new System.Timers.Timer(Period);

            if (!IsPeriodic)
            {
                this.timer.AutoReset = false;
            }

            this.timer.Elapsed += ElapsedEventHandler;
            this.timer.Start();
        }