示例#1
0
 public override void updateProgress(ProgressUpdatedEventArgs e)
 {
     // Do nothing!
 }
示例#2
0
 public override void updateProgress(ProgressUpdatedEventArgs e)
 {
     if(e.message!=null)
         progressTxt.Text = e.message;
     applyProgress(progressBar,e);
 }
示例#3
0
 public override void updateProgress(ProgressUpdatedEventArgs e)
 {
     if(e.message!=null)
         this.Title = e.message;
     applyProgress(progressBar1,e);
 }
示例#4
0
        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);
            }
        }
示例#5
0
文件: AWindow.cs 项目: elkine/MASGAU
 private void subProgressChanged(ProgressUpdatedEventArgs e)
 {
     setTaskBarState(e.state);
 }
示例#6
0
文件: AWindow.cs 项目: elkine/MASGAU
 private void progressChanged(ProgressUpdatedEventArgs e)
 {
     setTaskBarState(e.state);
     if(e.max==0) {
         TaskbarItemInfo.ProgressValue = 0;
     } else {
         TaskbarItemInfo.ProgressValue = (double)e.value/(double)e.max;
     }
 }
示例#7
0
文件: AWindow.cs 项目: elkine/MASGAU
        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;
            }
        }
示例#8
0
文件: AWindow.cs 项目: elkine/MASGAU
 public virtual void updateProgress(ProgressUpdatedEventArgs e)
 {
 }