mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Add disable programs functionality
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user