Пример #1
0
        /// <summary>
        /// 初始化倒计时
        /// </summary>
        private void InitClock()
        {
            pCount        = new ProcessCount(40);
            tbSecond.Text = pCount.GetSecond();

            timer          = new DispatcherTimer();
            timer.Tick    += new EventHandler(timer_Tick);
            timer.Interval = TimeSpan.FromMilliseconds(1000);
            timer.Start();
        }
Пример #2
0
        public async Task ProcessCountTest()
        {
            var widget = new ProcessCount();

            var request = MetricQueryRequest.Create(widget);

            var handler = new ProcessCountQuery();

            await handler.Handle(request, CancellationToken.None).ConfigureAwait(false);

            Assert.AreEqual(State.Ok, widget.State);

            Assert.IsTrue(widget.Value > 0);
        }
Пример #3
0
 public int CompareTo(RemotingHandlerItem <T> other)
 {
     return(ProcessCount.CompareTo(other.ProcessCount));
 }