コード例 #1
0
 private void OnGenerate(ProgressEventArgs progressEventArgs)
 {
     if (Generation != null)
         Generation(this, progressEventArgs);
 }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: Tilps/LoopDeLoop
 void Display_Generation(object sender, ProgressEventArgs e)
 {
     this.Dispatcher.BeginInvoke(delegate()
     {
         GenerateProgress.Value = e.CurrentPruned;
         GenerateProgress.Maximum = e.TargetPruned;
         GenerateProgress.Minimum = 0;
         GenerateProgress.Visibility = e.CurrentPruned >= e.TargetPruned ? Visibility.Collapsed : Visibility.Visible;
         if (e.CurrentPruned < e.TargetPruned)
         {
             timer.Change(-1, -1);
         }
         else
         {
             TimerDisplay.Text = "0:00";
             secCount = 0;
             timer.Change(0, 1000);
         }
     });
 }