public void Toggle(bool allow, ViewModel viewModel)
 {
     viewModel.AllowFolderChanges = allow;
     viewModel.IsIdle = allow;
     viewModel.EnableGroupSelecting = EnableGroupingEvaluator.Evaluate(viewModel);
     viewModel.HasFilesToInspectAndIsIdle = allow;
 }
        public void Present(ViewModel viewModel)
        {
            var dialog = new FolderBrowserDialog
            {
                SelectedPath = Properties.Settings.Default.SolutionPath,
                Description = "Select the route directory of the solution you are refactoring"
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.SolutionPath = dialog.SelectedPath;
                Properties.Settings.Default.Save();
                viewModel.SolutionDirectory = Properties.Settings.Default.SolutionPath;
                viewModel.HasCssRefactorPaths = HasRefactorPathsEvaluator.Evaluate();
                EnableDiagnosticsEvaluator.Evaluate();
            }
        }
        public void Present(ViewModel viewModel)
        {
            var dialog = new FolderBrowserDialog
            {
                SelectedPath = Properties.Settings.Default.GeneratedFilesPath,
                Description = "Select the folder you would to store  generated CSS files"
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.GeneratedFilesPath = dialog.SelectedPath;
                Properties.Settings.Default.Save();
                viewModel.GeneratedCssDirectory = Properties.Settings.Default.GeneratedFilesPath;
                viewModel.HasCssRefactorPaths = HasRefactorPathsEvaluator.Evaluate();
                EnableDiagnosticsEvaluator.Evaluate();
            }
        }
        public void Present(ViewModel viewModel)
        {
            var dialog = new FolderBrowserDialog
            {
                SelectedPath = Properties.Settings.Default.RefactorPath,
                Description = "Select the target CSS folder to refactor"
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.RefactorPath = dialog.SelectedPath;
                Properties.Settings.Default.Save();
                viewModel.RefactorCssDirectory = Properties.Settings.Default.RefactorPath;
                viewModel.HasCssRefactorPaths = HasRefactorPathsEvaluator.Evaluate();
                viewModel.IsIdle = EnableDiagnosticsEvaluator.Evaluate();
            }
        }
        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);
            }
        }
 public void DisplayOptions(object sender, string s, ViewModel dataContext)
 {
     MessageBox.Show("Display option now");
 }
 public void AddOptionWithHeadingSpace(object sender, AddOptionEventArgs addOptionEventArgs, ViewModel dataContext)
 {
     MessageBox.Show("Add option with heading space now");
 }
 public void AddOption(object sender, AddOptionEventArgs addOptionEventArgs, ViewModel dataContext)
 {
     MessageBox.Show("Add option now");
 }
 public void WriteLine(object sender, string e, ViewModel viewModel)
 {
     (viewModel).Output += string.Format("{0}{1}", e, Environment.NewLine);
 }
 public void Write(object sender, string e, ViewModel viewModel)
 {
     viewModel.Output += e;
 }
 public void Reset(object sender, EventArgs eventArgs, ViewModel viewModel)
 {
     viewModel.ProgressValue = 0;
 }
 public void Present(object sender, int e, ViewModel viewModel)
 {
     viewModel.ProgressValue = e;
 }
 public void Present(object sender, string s, ViewModel dataContext)
 {
     MessageBox.Show("Get input now");
 }
 public int Evaluate(ViewModel viewModel)
 {
     return viewModel.EnableSpecificGroup == true ? viewModel.SpecificGroupToInspect : 0;
 }
 public bool Evaluate(ViewModel viewModel)
 {
     return viewModel.IsValidResultsDirectory && viewModel.IsIdle;
 }