PowerToys/Plugins/Wox.Plugin.Program/ProgramSuffixes.xaml.cs

35 lines
1010 B
C#
Raw Normal View History

using System.Windows;
namespace Wox.Plugin.Program
{
/// <summary>
/// ProgramSuffixes.xaml 的交互逻辑
/// </summary>
public partial class ProgramSuffixes
{
2015-01-06 23:24:11 +08:00
private PluginInitContext context;
public ProgramSuffixes(PluginInitContext context)
{
2015-01-06 23:24:11 +08:00
this.context = context;
InitializeComponent();
tbSuffixes.Text = ProgramStorage.Instance.ProgramSuffixes;
}
2014-08-14 19:45:48 +08:00
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
2014-08-14 19:45:48 +08:00
if (string.IsNullOrEmpty(tbSuffixes.Text))
{
2015-01-06 23:24:11 +08:00
string warning = context.API.GetTranslation("wox_plugin_program_suffixes_cannot_empty");
MessageBox.Show(warning);
2014-08-14 19:45:48 +08:00
return;
}
ProgramStorage.Instance.ProgramSuffixes = tbSuffixes.Text;
2015-01-06 23:24:11 +08:00
string msg = context.API.GetTranslation("wox_plugin_program_update_file_suffixes");
MessageBox.Show(msg);
}
}
}