Ejemplo n.º 1
0
        private void Update(RemainingCount remainingCount, bool useCache)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                if (!useCache)
                {
                    this.IsLoading = false;
                }
                this.IsSupported = remainingCount != null;
                if (!this.IsSupported)
                {
                    this.GaugeColor = red;
                    return;
                }

                this.RemainingCountMin        = remainingCount.Min.ToString();
                this.RemainingCountMax        = remainingCount.Max.ToString();
                this.RemainingCountTransportS = this._source.RemainingCountTransportS.ToString();
                this.IsInfinity = remainingCount == RemainingCount.MaxValue;
                this.GaugeColor = remainingCount.Min < 2 ? red : green;
            });
        }
Ejemplo n.º 2
0
 //Back ground work-ProgressChanged, response command
 private void backgroundWorker2_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     LabelRemainingCount.Text = RemainingCount.ToString();
     TextBoxScriptResponse_Refresh((String)e.UserState);
 }