Esempio n. 1
0
        private void InspectGroupJavaScript(object sender, RoutedEventArgs e)
        {
            InteractionPermissionToggler.Toggle(false, (ViewModel)DataContext);
            var groupCount    = ((ViewModel)DataContext).GroupCount;
            var specificGroup = SpecificGroupEvaluator.Evaluate((ViewModel)DataContext);

            Task.Run(() =>
            {
                var path = Properties.Settings.Default.InspectionPath;
                if (PathExistenceEvaluator.Evaluate(path))
                {
                    GroupedJavaScriptEvaluator.Evaluate(groupCount, Directory.GetDirectories(path), specificGroup);
                }
                Application.Current.Dispatcher.BeginInvoke(new Action(() => { InteractionPermissionToggler.Toggle(true, (ViewModel)DataContext); TxtOutput.ScrollToEnd(); }));
            });
        }
Esempio n. 2
0
        public void View(List <string> files)
        {
            if (PathExistenceEvaluator.Evaluate(Properties.Settings.Default.InspectionPath))
            {
                var results = CssStatsPresenter.Present(FilteredFilesEvaluator.Evaluate(files));
                Ux.DisplayBoolOption("Store detailed CSS results to disk?", () =>
                {
                    var filename = CssStatsStorageService.Store(results, string.Empty);
                    //FilePresenter.Present(filename);
                }, null);

                Ux.WriteLine("");
            }
            else
            {
                MessageBox.Show("Please specify the results folder first.", "Invalid Directory");
            }
        }
Esempio n. 3
0
        public void Present(ViewModel viewModel)
        {
            var dialog = new FolderBrowserDialog
            {
                SelectedPath = Properties.Settings.Default.ResultsPath,
                Description  = "Select results directory"
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.ResultsPath = dialog.SelectedPath;
                Properties.Settings.Default.Save();
                viewModel.ResultsDirectory        = Properties.Settings.Default.ResultsPath;
                viewModel.IsIdle                  = EnableDiagnosticsEvaluator.Evaluate();
                viewModel.IsValidResultsDirectory = PathExistenceEvaluator.Evaluate(Properties.Settings.Default.ResultsPath);
                viewModel.EnableGroupSelecting    = EnableGroupingEvaluator.Evaluate(viewModel);
            }
        }