Пример #1
0
        }     // Unused

        protected override void Run()
        {
            AddResult(Severity.Info, "Get list of files");
            var files = ConsistencyCheckMissingLogoFiles.GetLogosFiles();

            AddResult(Severity.Info, "Get mappings");
            var mappings = GetMappings();

            AddResult(Severity.Info, "Finding unused files");
            var unused = FindUnusedFiles(files, mappings);

            ListUnusedFiles(unused);

            AddResult(Severity.Info, "Check ended");
        } // Run
Пример #2
0
        } // comboCheck_SelectedIndexChanged

        private void buttonRun_Click(object sender, EventArgs e)
        {
            ConsistencyCheck check;

            // init list
            var maxColumns = 3;

            listViewResults.Items.Clear();
            var width = (listViewResults.Width - SystemInformation.VerticalScrollBarWidth - 4) / maxColumns;

            listViewResults.Columns.Add("Activity").Width = width;
            for (int i = 1; i < maxColumns; i++)
            {
                listViewResults.Columns.Add("Details").AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
            } // for i

            var test = int.Parse(comboCheck.SelectedItem.ToString().Substring(0, 2));

            switch (test)
            {
            case 1: check = new ConsistencyCheckMissingServiceLogos(); break;

            case 2: check = new ConsistencyCheckUnusedServiceMappingEntries(); break;

            case 3: check = new ConsistencyCheckMissingLogoFiles(); break;

            case 4: check = new ConsistencyCheckUnusedLogoFiles(); break;

            default:
                return;
            } // switch

            check.ProgressChanged += Check_ProgressChanged;
            check.Execute(this);
            ShowResults(check);
        } // buttonRun_Click