예제 #1
0
 private void compiler_Progress(object sender, Compiler.ProgressEventArgs e)
 {
     BeginInvoke(() =>
     {
         progress.Value = e.Progress;
         TaskbarItemInfo.ProgressValue = (double)e.Progress / 100;
     });
 }
예제 #2
0
 private void compiler_StatusUpdated(object sender, Compiler.StatusUpdate e)
 {
     BeginInvoke(() => txtOutput.Text += e.Message + Environment.NewLine);
 }
예제 #3
0
 private void compiler_CompileFinished(object sender, Compiler.CompilerResults result)
 {
     BeginInvoke(() =>
     {
         cmdCompile.IsEnabled = true;
         progress.Visibility = Visibility.Collapsed;
         TaskbarItemInfo.ProgressState = System.Windows.Shell.TaskbarItemProgressState.None;
         if (result.Success)
         {
             if (cmbProfile.Text == "Web")
             {
                 System.Diagnostics.Process.Start(result.IndexHtml);
             }
             if (result.Warnings.Any())
             {
                 txtOutput.Text += string.Join(Environment.NewLine, result.Warnings);
             }
         }
         else
         {
             txtOutput.Text += string.Join(Environment.NewLine, result.Errors);
         }
     });
 }