2014-08-13 23:16:45 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
using System.Windows.Shapes;
|
2014-08-14 19:45:48 +08:00
|
|
|
|
using Wox.Infrastructure.Storage.UserSettings;
|
2014-08-13 23:16:45 +08:00
|
|
|
|
|
|
|
|
|
namespace Wox.Plugin.SystemPlugins.Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ProgramSuffixes.xaml 的交互逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ProgramSuffixes
|
|
|
|
|
{
|
|
|
|
|
public ProgramSuffixes()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2014-08-14 19:45:48 +08:00
|
|
|
|
tbSuffixes.Text = UserSettingStorage.Instance.ProgramSuffixes;
|
2014-08-13 23:16:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
2014-08-14 19:45:48 +08:00
|
|
|
|
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
2014-08-13 23:16:45 +08:00
|
|
|
|
{
|
2014-08-14 19:45:48 +08:00
|
|
|
|
if (string.IsNullOrEmpty(tbSuffixes.Text))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("File suffixes can't be empty");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2014-08-13 23:16:45 +08:00
|
|
|
|
|
2014-08-14 19:45:48 +08:00
|
|
|
|
UserSettingStorage.Instance.ProgramSuffixes = tbSuffixes.Text;
|
|
|
|
|
MessageBox.Show("Sucessfully update file suffixes");
|
2014-08-13 23:16:45 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|