コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
        public Results(Wizard sb)
        {
            InitializeComponent();

            _scanBase = sb;

            Tree.Model = ResultModel.CreateResultModel();
            Tree.ExpandAll();
        }
コード例 #3
0
        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;
        }