public Results(Wizard scanBase) { InitializeComponent(); // Insert code required on object creation below this point. _scanWiz = scanBase; Tree.Model = ResultModel.CreateResultModel(); Tree.ExpandAll(); var resultModel = Tree.Model as ResultModel; if (resultModel != null && resultModel.Root.Children.Count == 0) { MessageBox.Show(Application.Current.MainWindow, "There were no errors found!", Utils.ProductName, MessageBoxButton.OK, MessageBoxImage.Information); } else { Wizard.Report.DisplayLogFile(Settings.Default.registryCleanerOptionsShowLog && !Settings.Default.registryCleanerOptionsAutoRepair); if (Settings.Default.registryCleanerOptionsAutoRepair) { FixProblems(); } } }
public Results(Wizard sb) { InitializeComponent(); _scanBase = sb; Tree.Model = ResultModel.CreateResultModel(); Tree.ExpandAll(); }
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { Model = ResultModel.CreateResultModel((Wizard)e.Argument); Dispatcher.Invoke(new Action(() => _tree.Model = Model)); _tree.ExpandAll(); e.Result = true; }