Esempio n. 1
0
        private void UpdateProgressOnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
        {
            var c   = new Site.Api.ApiClient();
            var num = c.SubPercent();

            Dispatcher.Invoke(new Action(() => this.UpdateNum(num)));
        }
Esempio n. 2
0
 private void UpdateProgressOnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
 {
     if (Dispatcher.CheckAccess())
     {
         Task.Factory.StartNew(() => UpdateProgressOnElapsed(sender, elapsedEventArgs));
         return;
     }
     UpdateProgress.Enabled = false;
     try
     {
         var c   = new Site.Api.ApiClient();
         var num = c.SubPercent();
         Dispatcher.Invoke(new Action(() => this.UpdateNum(num)));
     }
     finally
     {
         UpdateProgress.Enabled = true;
     }
 }
        private void UpdateProgressOnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
        {
            if (Dispatcher.CheckAccess())
            {
                Task.Factory.StartNew(() => UpdateProgressOnElapsed(sender, elapsedEventArgs));
                return;
            }
            UpdateProgress.Enabled = false;
            try
            {
                var c = new Site.Api.ApiClient();
                var num = c.SubPercent();
                Dispatcher.Invoke(new Action(() => this.UpdateNum(num)));

            }
            finally
            {
                UpdateProgress.Enabled = true;
            }
        }
Esempio n. 4
0
 private void UpdateProgressOnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
 {
     var c = new Site.Api.ApiClient();
     var num = c.SubPercent();
     Dispatcher.Invoke(new Action(() => this.UpdateNum(num)));
 }