mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
Add browse more plugin and theme link to setting dialog.
This commit is contained in:
@@ -22,6 +22,7 @@ using Application = System.Windows.Forms.Application;
|
||||
using File = System.IO.File;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using System.Windows.Data;
|
||||
using Label = System.Windows.Forms.Label;
|
||||
|
||||
namespace Wox
|
||||
{
|
||||
@@ -32,11 +33,6 @@ namespace Wox
|
||||
bool settingsLoaded = false;
|
||||
private Dictionary<ISettingProvider, Control> featureControls = new Dictionary<ISettingProvider, Control>();
|
||||
|
||||
public SettingWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public SettingWindow(MainWindow mainWindow)
|
||||
{
|
||||
this.MainWindow = mainWindow;
|
||||
@@ -419,14 +415,7 @@ namespace Wox
|
||||
pluginSubTitle.Text = pair.Metadata.Description;
|
||||
pluginId = pair.Metadata.ID;
|
||||
SyntaxSugars.CallOrRescueDefault(
|
||||
() =>
|
||||
pluginIcon.Source = (ImageSource)new ImagePathConverter().Convert(
|
||||
new object[]
|
||||
{
|
||||
pair.Metadata.IcoPath,
|
||||
pair.Metadata.PluginDirecotry
|
||||
}, null, null,
|
||||
null));
|
||||
() => pluginIcon.Source = ImageLoader.Load(pair.Metadata.FullIcoPath));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -443,13 +432,7 @@ namespace Wox
|
||||
tbOpenPluginDirecoty.Visibility = Visibility.Collapsed;
|
||||
pluginActionKeywordTitle.Visibility = Visibility.Collapsed;
|
||||
pluginTitle.Cursor = Cursors.Arrow;
|
||||
SyntaxSugars.CallOrRescueDefault(
|
||||
() =>
|
||||
pluginIcon.Source = (ImageSource)new ImagePathConverter().Convert(new object[]
|
||||
{
|
||||
sys.IcoPath,
|
||||
sys.PluginDirectory
|
||||
}, null, null, null));
|
||||
SyntaxSugars.CallOrRescueDefault(() => pluginIcon.Source = ImageLoader.Load(sys.FullIcoPath));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +548,7 @@ namespace Wox
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(pair.Metadata.PluginDirecotry);
|
||||
Process.Start(pair.Metadata.PluginDirectory);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -573,5 +556,15 @@ namespace Wox
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tbMorePlugins_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start("http://www.getwox.com/plugin");
|
||||
}
|
||||
|
||||
private void tbMoreThemes_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start("http://www.getwox.com/theme");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user