Add browser selection to WebSearch plugin

This commit is contained in:
Jeremy Wu
2019-11-11 22:04:01 +11:00
parent d7e6f97d9c
commit 11948c1cce
4 changed files with 28 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
using Microsoft.Win32;
using System.Windows;
using System.Windows.Controls;
using Wox.Core.Plugin;
@@ -68,5 +69,18 @@ namespace Wox.Plugin.WebSearch
{
_settings.OpenInNewBrowser = false;
}
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;
_settings.BrowserPath = fileBrowserDialog.FileName;
}
}
}
}