diff --git a/App.config b/App.config
index 2f5f506..66892cf 100644
--- a/App.config
+++ b/App.config
@@ -49,12 +49,13 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Control/UserControls/Config/AboutControl.xaml b/Control/UserControls/Config/AboutControl.xaml
index 2363722..a963f48 100644
--- a/Control/UserControls/Config/AboutControl.xaml
+++ b/Control/UserControls/Config/AboutControl.xaml
@@ -26,13 +26,13 @@
MouseEnter="SC_MouseEnter"
MouseLeave="SC_MouseLeave"
Command="hc:ControlCommands.OpenLink"
- CommandParameter="https://github.com/Demo-Liu/GeekDesk"
+ CommandParameter="https://github.com/BookerLiu/GeekDesk"
Margin="0,0,10,0" Color="#24292F"/>
diff --git a/Control/Windows/UpdateWindow.xaml b/Control/Windows/UpdateWindow.xaml
index 464cd39..0f599ce 100644
--- a/Control/Windows/UpdateWindow.xaml
+++ b/Control/Windows/UpdateWindow.xaml
@@ -22,16 +22,24 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
@@ -47,7 +55,7 @@
-
+
diff --git a/Control/Windows/UpdateWindow.xaml.cs b/Control/Windows/UpdateWindow.xaml.cs
index dde1981..c2ba19c 100644
--- a/Control/Windows/UpdateWindow.xaml.cs
+++ b/Control/Windows/UpdateWindow.xaml.cs
@@ -6,6 +6,7 @@ using Newtonsoft.Json.Linq;
using System;
using System.Configuration;
using System.Diagnostics;
+using System.Net;
using System.Windows;
using System.Windows.Input;
@@ -82,7 +83,11 @@ namespace GeekDesk.Control.Windows
packageUrl = giteeUrl;
break;
}
- Process.Start(packageUrl);
+ Process.Start(new ProcessStartInfo("cmd", $"/c start {packageUrl}")
+ {
+ UseShellExecute = false,
+ CreateNoWindow = true
+ });
this.Close();
}
@@ -94,6 +99,7 @@ namespace GeekDesk.Control.Windows
window = new UpdateWindow(jo);
}
window.Show();
+ window.Activate();
Keyboard.Focus(window);
}
@@ -105,5 +111,59 @@ namespace GeekDesk.Control.Windows
this.Close();
}
}
+
+ private void StarBtnClick(object sender, RoutedEventArgs e)
+ {
+
+ string githubUrl = ConfigurationManager.AppSettings["GitHubUrl"];
+ string giteeUrl = ConfigurationManager.AppSettings["GiteeUrl"];
+
+ if(!ReqGitUrl(githubUrl))
+ {
+ if (!ReqGitUrl(giteeUrl))
+ {
+ OpenLinkUrl(githubUrl);
+ } else
+ {
+ OpenLinkUrl(giteeUrl);
+ }
+ } else
+ {
+ OpenLinkUrl(githubUrl);
+ }
+ }
+
+
+ private bool ReqGitUrl(String url)
+ {
+ HttpWebResponse myResponse = null;
+ try
+ {
+ ServicePointManager.Expect100Continue = true;
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
+ //创建Web访问对 象
+ WebRequest myRequest = WebRequest.Create(url);
+
+ myRequest.ContentType = "text/plain; charset=utf-8";
+ //通过Web访问对象获取响应内容
+ myResponse = (HttpWebResponse)myRequest.GetResponse();
+ }
+ catch
+ {
+ return false;
+ }
+
+ return myResponse != null && myResponse.StatusCode == HttpStatusCode.OK;
+ }
+
+ private void OpenLinkUrl(String url)
+ {
+ Process.Start(new ProcessStartInfo("cmd", $"/c start {url}")
+ {
+ UseShellExecute = false,
+ CreateNoWindow = true
+ });
+ }
+
}
}
diff --git a/GeekDesk.csproj b/GeekDesk.csproj
index 6162e6b..f7e4628 100644
--- a/GeekDesk.csproj
+++ b/GeekDesk.csproj
@@ -473,4 +473,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index 4d07409..c6a79cd 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
[assembly: AssemblyTitle("GeekDesk")]
[assembly: AssemblyDescription("小巧、美观的桌面快速启动工具")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Demo-Liu")]
+[assembly: AssemblyCompany("BookerLiu")]
[assembly: AssemblyProduct("GeekDesk")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
diff --git a/Update.json b/Update.json
index e2fd3af..1bcf78b 100644
--- a/Update.json
+++ b/Update.json
@@ -1,9 +1,9 @@
{
"title": "GeekDesk版本更新",
- "subTitle": "V2.4.14",
+ "subTitle": "V2.4.15",
"msgTitle": "本次更新内容如下",
- "msg": "['这次更新间隔比较久, 一个是工作比较忙, 另一个是因为老毛病颈椎病犯了, 但新版本总归是来了','增加图标排序功能','增加鼠标悬停切换菜单','增加搜索功能,显示界面后按下Ctrl+F','其它已知问题修复','老规矩兄弟萌, 我用爱发电, 你们点免费Star']",
+ "msg": "['PS:又一次的更新, 虽然还有很多需求没有完成, 但仍然耗费了我大量的精力, 没有点Star的兄弟萌, 求个免费Star(GitHub国内某些用户可能进不去), 再给我一点更新的动力!','增加纯色/渐变色背景','增加/优化拾色器功能','增加主面板Logo开关','优化待办任务,现在待办任务快捷键不再是新建待办窗口','增加鼠标滚轮切换菜单功能(需要鼠标指针在菜单栏)','优化搜索功能,增加 快捷键搜索/按键即搜 可选操作','优化贴边隐藏动画, 纵享丝滑了属于是兄弟萌', '其它已知问题修复']",
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
- "giteeUrl": "https://gitee.com/demo_liu/GeekDesk/releases",
- "version": "2.4.14"
+ "giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases",
+ "version": "2.4.15"
}
\ No newline at end of file