public override void updateProgress(ProgressUpdatedEventArgs e) { // Do nothing! }
public override void updateProgress(ProgressUpdatedEventArgs e) { if(e.message!=null) progressTxt.Text = e.message; applyProgress(progressBar,e); }
public override void updateProgress(ProgressUpdatedEventArgs e) { if(e.message!=null) this.Title = e.message; applyProgress(progressBar1,e); }
private static void setSubProgress(int value, int max, ProgressState progstate) { ProgressUpdatedEventArgs e = new ProgressUpdatedEventArgs(); e.max = max; e.message = null; e.value = value; e.state = progstate; ICommunicationReceiver receiver = getReceiver(); if(receiver==null) return; if(receiver.context!=null) { receiver.context.Post(new SendOrPostCallback(delegate(object state) { ProgressChangedEventHandler handler = receiver.updateProgress; if(handler!=null) { handler(e); } }),null); } else { receiver.updateProgress(e); } }
private void subProgressChanged(ProgressUpdatedEventArgs e) { setTaskBarState(e.state); }
private void progressChanged(ProgressUpdatedEventArgs e) { setTaskBarState(e.state); if(e.max==0) { TaskbarItemInfo.ProgressValue = 0; } else { TaskbarItemInfo.ProgressValue = (double)e.value/(double)e.max; } }
protected void applyProgress(ProgressBar progress, ProgressUpdatedEventArgs e) { progress.IsEnabled = e.state!= ProgressState.None; progress.IsIndeterminate = e.state== ProgressState.Indeterminate; switch(e.state) { case ProgressState.Normal: progress.Foreground = default_progress_color; break; case ProgressState.Error: progress.Foreground = Brushes.Red; break; case ProgressState.Wait: progress.Foreground = Brushes.Yellow; break; } progress.Visibility = System.Windows.Visibility.Visible; if(e.max==0) progress.Value = 0; else { progress.Maximum = e.max; progress.Value = e.value; } }
public virtual void updateProgress(ProgressUpdatedEventArgs e) { }