void OnInstallationCompleted(Task <bool> task) { Installing = false; bool success = false; Dispatcher.Invoke(delegate { try { success = task.Result; var exception = task.Exception; var errors = Installation.Errors.ToList(); if (exception != null) { PushError(exception.Message); } } catch (Exception e) { PushError(e.Message); } PreferencesGrid.IsEnabled = true; if (success) { InstallationGrid.Visibility = Visibility.Hidden; } //foreach (var error in Installation.Errors) // PushError(error); var textBlock2 = new TextBlock() { Text = $"\n=== FILES INSTALLED ======== \n{Installation.Manifest}", Foreground = Brushes.Orange, FontWeight = FontWeights.Bold, TextWrapping = TextWrapping.NoWrap }; ErrorStack.Children.Add(textBlock2); var textBlock1 = new TextBlock() { Text = $"Installation completed {(!success ? "un" : "")}successfully in " + Installation.ElapsedTime.ToString(), Foreground = Brushes.DarkCyan, FontWeight = FontWeights.Bold, TextWrapping = TextWrapping.Wrap }; ErrorStack.Children.Add(textBlock1); DumpLog(success); if (!success) { ; // TODO: Non-successful installation help } ErrorScroller.ScrollToBottom(); LoadUserPrefs(); if (success) { ShowSuccessMessage(); } }); }
public Plc(ErrorScroller errorScroller) : this() { this.errorScroller = errorScroller; }
public AsutpServer(ErrorScroller errorScroller) : this() { this.errorScroller = errorScroller; }