diff --git a/TextLocator/HelpWindow.xaml b/TextLocator/HelpWindow.xaml new file mode 100644 index 0000000000000000000000000000000000000000..c3c0e039fe0df244ca215a037e2b167c301686f4 --- /dev/null +++ b/TextLocator/HelpWindow.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TextLocator/HelpWindow.xaml.cs b/TextLocator/HelpWindow.xaml.cs new file mode 100644 index 0000000000000000000000000000000000000000..058348d4cd3c19e50c6c866e541f5e277d8ed98b --- /dev/null +++ b/TextLocator/HelpWindow.xaml.cs @@ -0,0 +1,48 @@ +using log4net; +using System; +using System.Text.RegularExpressions; +using System.Windows; +using System.Windows.Controls; +using TextLocator.Core; +using TextLocator.Message; +using TextLocator.Util; + +namespace TextLocator +{ + /// + /// HelpWindow.xaml 的交互逻辑 + /// + public partial class HelpWindow : Window + { + private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + /// + /// 单例 + /// + private static HelpWindow _instance; + + public HelpWindow() + { + InitializeComponent(); + } + + /// + /// 创建系统参数设置窗体实例 + /// + /// + public static HelpWindow CreateInstance() + { + return _instance ?? (_instance = new HelpWindow()); + } + + /// + /// 窗体关闭 + /// + /// + /// + private void Window_Closed(object sender, EventArgs e) + { + _instance.Topmost = false; + _instance = null; + } + } +} diff --git a/TextLocator/NotifyIcon/NotifyIconViewModel.cs b/TextLocator/NotifyIcon/NotifyIconViewModel.cs index 975fada6ae858b8ffee3f349e781becc6d73093a..cbc7a90b1114dca2ef2b71f379e92b7ebedf33da 100644 --- a/TextLocator/NotifyIcon/NotifyIconViewModel.cs +++ b/TextLocator/NotifyIcon/NotifyIconViewModel.cs @@ -100,6 +100,33 @@ namespace TextLocator.NotifyIcon } } + /// + /// 帮助窗口 + /// + public ICommand HelpWindowCommand + { + get + { + return new DelegateCommand + { + CommandAction = () => + { + var win = HelpWindow.CreateInstance(); + if (!win.IsVisible) + { + win.Topmost = true; + win.Owner = Application.Current.MainWindow; + win.ShowDialog(); + } + else + { + win.Activate(); + } + } + }; + } + } + /// /// 关闭软件 diff --git a/TextLocator/Properties/AssemblyInfo.cs b/TextLocator/Properties/AssemblyInfo.cs index 59b6bfda471c14d07262d7c35073c0830a82a0e0..5dd08b71154ba4054ee008a09a5071b5d1169c44 100644 --- a/TextLocator/Properties/AssemblyInfo.cs +++ b/TextLocator/Properties/AssemblyInfo.cs @@ -50,9 +50,9 @@ using System.Windows; //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] // 大版本,强制更新最小版本 -[assembly: AssemblyVersion("2.1.30.0")] +[assembly: AssemblyVersion("2.1.30.1")] // 小版本,选择更新版本 -[assembly: AssemblyFileVersion("2.1.30.0")] +[assembly: AssemblyFileVersion("2.1.30.1")] // Version minVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; // Version version = new Version(FileVersionInfo.GetVersionInfo(System.Windows.Forms.Application.ExecutablePath).ProductVersion); diff --git a/TextLocator/Properties/Resources.Designer.cs b/TextLocator/Properties/Resources.Designer.cs index 8929af4f2484a2e97097aadfad4fee9be5107b87..e3ae745fe391c9a80da89f393a0df1d3981c6169 100644 --- a/TextLocator/Properties/Resources.Designer.cs +++ b/TextLocator/Properties/Resources.Designer.cs @@ -140,6 +140,16 @@ namespace TextLocator.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap weixin { + get { + object obj = ResourceManager.GetObject("weixin", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -150,6 +160,16 @@ namespace TextLocator.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap zhifubao { + get { + object obj = ResourceManager.GetObject("zhifubao", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/TextLocator/Properties/Resources.resx b/TextLocator/Properties/Resources.resx index 4f7d1cee674ac4d9ba5747e051eb9fe8b0d23273..9ff28ea00d3c8cdca25695001a7801195cb631cb 100644 --- a/TextLocator/Properties/Resources.resx +++ b/TextLocator/Properties/Resources.resx @@ -142,9 +142,15 @@ ..\resource\ext\txt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resource\donate\weixin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\resource\ext\word.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resource\donate\zhifubao.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\resource\ext\zip.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/TextLocator/Resource/GenericDictionary.xaml b/TextLocator/Resource/GenericDictionary.xaml index 1fa8c07c566e5dd399cfb46e13e165023217b959..07dc58261da6168440b755f7a2a0762e79e6bda4 100644 --- a/TextLocator/Resource/GenericDictionary.xaml +++ b/TextLocator/Resource/GenericDictionary.xaml @@ -15,6 +15,7 @@ + diff --git a/TextLocator/Resource/donate/weixin.png b/TextLocator/Resource/donate/weixin.png new file mode 100644 index 0000000000000000000000000000000000000000..f455704ea1c6fc1785dbad5b04003111f7580c2d Binary files /dev/null and b/TextLocator/Resource/donate/weixin.png differ diff --git a/TextLocator/Resource/donate/zhifubao.png b/TextLocator/Resource/donate/zhifubao.png new file mode 100644 index 0000000000000000000000000000000000000000..643ea88079ba7bd34594878c724a151d5e84870c Binary files /dev/null and b/TextLocator/Resource/donate/zhifubao.png differ diff --git a/TextLocator/TextLocator.csproj b/TextLocator/TextLocator.csproj index 1c4e94bdd8e9282a1cfa0e2ff0e6455557535df7..52f8217787e731c562687d1b7af76129fc0ca930 100644 --- a/TextLocator/TextLocator.csproj +++ b/TextLocator/TextLocator.csproj @@ -282,6 +282,9 @@ + + HelpWindow.xaml + @@ -365,6 +368,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -493,6 +500,9 @@ - + + + + \ No newline at end of file