mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Add browser path selection for browserbookmark plugin
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Microsoft.Win32;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Wox.Plugin.BrowserBookmark.Models;
|
||||
@@ -28,5 +29,22 @@ namespace Wox.Plugin.BrowserBookmark.Views
|
||||
{
|
||||
_settings.OpenInNewBrowserWindow = false;
|
||||
}
|
||||
|
||||
private void OnApplyBTClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_settings.BrowserPath = browserPathBox.Text;
|
||||
}
|
||||
|
||||
private void OnChooseClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var fileBrowserDialog = new OpenFileDialog();
|
||||
fileBrowserDialog.Filter = "Application(*.exe)|*.exe|All files|*.*";
|
||||
fileBrowserDialog.CheckFileExists = true;
|
||||
fileBrowserDialog.CheckPathExists = true;
|
||||
if (fileBrowserDialog.ShowDialog() == true)
|
||||
{
|
||||
browserPathBox.Text = fileBrowserDialog.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user