Example #1
0
        public void Present(ViewModel viewModel)
        {
            var dialog = new FolderBrowserDialog
            {
                SelectedPath = Properties.Settings.Default.InspectionPath,
                Description  = "Select folder to inspect"
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.InspectionPath = dialog.SelectedPath;
                Properties.Settings.Default.Save();
                viewModel.InspectionDirectory = Properties.Settings.Default.InspectionPath;
                viewModel.IsIdle = EnableDiagnosticsEvaluator.Evaluate();
                viewModel.IsValidInspectionDirectory = PathExistenceEvaluator.Evaluate(Properties.Settings.Default.ResultsPath);
                viewModel.ChildDirectoryCount        = ChildDirectoryCountEvaluator.Evaluate();
                viewModel.EnableGroupSelecting       = EnableGroupingEvaluator.Evaluate(viewModel);
            }
        }
Example #2
0
 private void ChangeNumberOfGroups(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     ((ViewModel)DataContext).FoldersPerGroup = FoldersPerGroupEvaluator.Evaluate(ChildDirectoryCountEvaluator.Evaluate(), ((ViewModel)DataContext).GroupCount);
 }