From b317584153911d2c7b3bb5ed55703fa36d42b7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Sat, 6 Nov 2021 10:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8F=9C=E5=8D=95=E6=A0=87?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.UI/MainWindow.xaml.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/FastGithub.UI/MainWindow.xaml.cs b/FastGithub.UI/MainWindow.xaml.cs index ef6ddee..1af7b47 100644 --- a/FastGithub.UI/MainWindow.xaml.cs +++ b/FastGithub.UI/MainWindow.xaml.cs @@ -13,26 +13,25 @@ namespace FastGithub.UI { private readonly System.Windows.Forms.NotifyIcon notifyIcon; private const string FASTGITHUB_UI = "FastGithub.UI"; - private const string PROJECT_URI = "https://github.com/dotnetcore/FastGithub"; + private const string RELEASES_URI = "https://github.com/dotnetcore/FastGithub/releases"; public MainWindow() { InitializeComponent(); - var about = new System.Windows.Forms.MenuItem("关于(&A)"); - about.Click += (s, e) => Process.Start(PROJECT_URI); + var upgrade = new System.Windows.Forms.MenuItem("检测更新(&U)"); + upgrade.Click += (s, e) => Process.Start(RELEASES_URI); - var exit = new System.Windows.Forms.MenuItem("退出(&C)"); + var exit = new System.Windows.Forms.MenuItem("关闭应用(&C)"); exit.Click += (s, e) => this.Close(); var version = this.GetType().Assembly.GetCustomAttribute()?.InformationalVersion; - this.Title = $"{FASTGITHUB_UI} v{version}"; this.notifyIcon = new System.Windows.Forms.NotifyIcon { Visible = true, Text = FASTGITHUB_UI, - ContextMenu = new System.Windows.Forms.ContextMenu(new[] { about, exit }), + ContextMenu = new System.Windows.Forms.ContextMenu(new[] { upgrade, exit }), Icon = System.Drawing.Icon.ExtractAssociatedIcon(System.Windows.Forms.Application.ExecutablePath) };