Add disable programs functionality

This commit is contained in:
Jeremy Wu
2019-09-07 15:58:13 +10:00
parent 9d3f0d45d5
commit bc202ecc98
3 changed files with 38 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Wox.Plugin.Program.Programs;
namespace Wox.Plugin.Program
@@ -151,5 +155,19 @@ namespace Wox.Plugin.Program
programSourceView.Items.Refresh();
}
private void btnDisableProgramSource_OnClick(object sender, RoutedEventArgs e)
{
Main.DisableProgramSources(programSourceView.SelectedItems.Cast<Settings.ProgramSource>().ToList());
programSourceView.SelectedItems.Clear();
programSourceView.Items.Refresh();
}
private void ProgramSourceView_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
{
programSourceView.SelectedItems.Clear();
}
}
}