/// <summary>
        ///     Sets the current section and increments the progress bar
        /// </summary>
        private void InvokeCurrentSection(string sectionName)
        {
            if (Dispatcher.Thread != Thread.CurrentThread)
            {
                Dispatcher.BeginInvoke(new Action <string>(InvokeCurrentSection), sectionName);
                return;
            }

            if (_currentListViewIndex != -1)
            {
                // Update number of errors in case it wasn't updated yet
                CurrentListViewItem.Errors = $"{Wizard.BadRegKeyArray.Problems(CurrentListViewItem.Section)} Errors";

                CurrentListViewItem.Status = "Finished";
                CurrentListViewItem.UnloadGif();
            }

            ProgressBar.Value++;
            _currentListViewIndex++;

            Wizard.CurrentScannerName = sectionName;
            CurrentSection.Content    = "Section: " + sectionName;

            CurrentListViewItem.Status = "Scanning";
            CurrentListViewItem.LoadGif();

            CurrentListViewItem.Errors = "0 Errors";

            ListView.Items.Refresh();
        }
Example #2
0
        /// <summary>
        ///     Sets the current section and increments the progress bar
        /// </summary>
        private void InvokeCurrentSection(string sectionName, int parentSection)
        {
            if (Dispatcher.Thread != Thread.CurrentThread)
            {
                Dispatcher.Invoke(new Action <string, int>(InvokeCurrentSection), sectionName, parentSection);
                return;
            }

            _currentListViewParentIndex = parentSection;

            ProgressBar.Value++;
            _currentListViewIndex++;

            Wizard.CurrentSectionName   = sectionName;
            CurrentSectionLabel.Content = "Section: " + sectionName;

            CurrentListViewItem.Status = "Scanning " + sectionName;
            CurrentListViewItem.LoadGif();

            ListView.AutoResizeColumns();

            ListView.Items.Refresh();
        }