Example #1
0
        private void excluded_add_Click(object sender, RoutedEventArgs e)
        {
            Window_ProcessSelection dialog = new Window_ProcessSelection();

            if (dialog.ShowDialog() == true && !String.IsNullOrWhiteSpace(dialog.ChosenExecutable)) // do not need to check if dialog is already in excluded_programs since it is a Set and only contains unique items by definition
            {
                Global.Configuration.excluded_programs.Add(dialog.ChosenExecutable);
            }

            load_excluded_listbox();
        }
Example #2
0
        private void ExcludedAdd_Click(object sender, RoutedEventArgs e)
        {
            Window_ProcessSelection dialog = new Window_ProcessSelection {
                ButtonLabel = "Exclude Process"
            };

            if (dialog.ShowDialog() == true && !string.IsNullOrWhiteSpace(dialog.ChosenExecutableName) && !Global.Configuration.ExcludedPrograms.Contains(dialog.ChosenExecutableName))
            {
                Global.Configuration.ExcludedPrograms.Add(dialog.ChosenExecutableName);
            }
        }