diff --git a/App.config b/App.config
index 2a204ef..fd0f07f 100644
--- a/App.config
+++ b/App.config
@@ -54,7 +54,7 @@
-
+
@@ -62,6 +62,7 @@
+
diff --git a/Control/UserControls/Config/AboutControl.xaml b/Control/UserControls/Config/AboutControl.xaml
index 6bb384a..daf2a5f 100644
--- a/Control/UserControls/Config/AboutControl.xaml
+++ b/Control/UserControls/Config/AboutControl.xaml
@@ -32,18 +32,21 @@
MouseLeave="SC_MouseLeave"
Command="hc:ControlCommands.OpenLink"
CommandParameter="https://github.com/BookerLiu/GeekDesk"
- Margin="0,0,10,0" Color="#24292F"/>
+ Margin="0,0,10,0" Color="#24292F"
+ />
+
+ Margin="0,0,10,0" Color="#C71D23"
+ />
-
+
diff --git a/Control/UserControls/Config/AboutControl.xaml.cs b/Control/UserControls/Config/AboutControl.xaml.cs
index 40adfa4..78c86fb 100644
--- a/Control/UserControls/Config/AboutControl.xaml.cs
+++ b/Control/UserControls/Config/AboutControl.xaml.cs
@@ -16,6 +16,15 @@ namespace GeekDesk.Control.UserControls.Config
{
InitializeComponent();
AppInfo.Text += ConfigurationManager.AppSettings["Version"];
+ string showPublicWeChat = ConfigurationManager.AppSettings["ShowPublicWeChat"];
+ if ("Y".Equals(showPublicWeChat))
+ {
+ PublicWeChatPanel.Visibility = Visibility.Visible;
+ } else
+ {
+ PublicWeChatPanel.Visibility = Visibility.Collapsed;
+ }
+
PublicWeChat.Source = ImageUtil.Base64ToBitmapImage(Constants.PUBLIC_WE_CHAT_IMG_BASE64);
WeChatCode.Source = ImageUtil.Base64ToBitmapImage(Constants.WE_CHAT_CODE_IMG_BASE64);
ZFBCode.Source = ImageUtil.Base64ToBitmapImage(Constants.ZFB_CODE_IMG_BASE64);
diff --git a/GeekDesk.csproj b/GeekDesk.csproj
index 6721d3b..0652fd3 100644
--- a/GeekDesk.csproj
+++ b/GeekDesk.csproj
@@ -265,6 +265,7 @@
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 4b690e9..9d3ee6f 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -185,7 +185,7 @@ namespace GeekDesk
{
ShowApp();
}
-
+ //ShowSecondTask.SHowSecond();
//给任务栏图标一个名字
BarIcon.Text = Constants.MY_NAME;
@@ -426,17 +426,6 @@ namespace GeekDesk
// return;
//}
- MainWindow.mainWindow.Activate();
- mainWindow.Show();
- //mainWindow.Visibility = Visibility.Visible;
- if (appData.AppConfig.AppAnimation)
- {
- appData.AppConfig.IsShow = true;
- } else
- {
- appData.AppConfig.IsShow = null;
- }
-
if (MarginHide.ON_HIDE)
{
//修改贴边隐藏状态为未隐藏
@@ -452,7 +441,19 @@ namespace GeekDesk
{
ShowWindowFollowMouse.Show(mainWindow, MousePosition.CENTER, 0, 0);
}
-
+
+ MainWindow.mainWindow.Activate();
+ mainWindow.Show();
+ //mainWindow.Visibility = Visibility.Visible;
+ if (appData.AppConfig.AppAnimation)
+ {
+ appData.AppConfig.IsShow = true;
+ }
+ else
+ {
+ appData.AppConfig.IsShow = null;
+ }
+
//FadeStoryBoard(1, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Visible);
diff --git a/Task/ShowSecondTask.cs b/Task/ShowSecondTask.cs
new file mode 100644
index 0000000..8cd3186
--- /dev/null
+++ b/Task/ShowSecondTask.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace GeekDesk.Task
+{
+ internal class ShowSecondTask
+ {
+
+ public static void SHowSecond()
+ {
+ System.Timers.Timer timer = new System.Timers.Timer
+ {
+ Enabled = true,
+ Interval = 5000
+ };
+ timer.Start();
+ timer.Elapsed += Timer_Elapsed;
+ }
+
+ private static void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
+ {
+ Process[] pcArr = Process.GetProcessesByName("ShellExperienceHost.exe");
+ Thread.Sleep(1000);
+ }
+ }
+}
diff --git a/Update.json b/Update.json
index 93c4f2c..0630b4d 100644
--- a/Update.json
+++ b/Update.json
@@ -1,9 +1,9 @@
{
"title": "GeekDesk版本更新",
- "subTitle": "V2.5.10",
+ "subTitle": "V2.5.11",
"msgTitle": "本次更新内容如下",
- "msg": "['依旧耗费了我大量精力开发,希望大家去给我点个免费的Star', '这个版本有一些优化点, 大家可以自行探索, 另外征集新Logo的设计, 要求美观并能体现\\'极客\\'风格','本次重新打包了程序文件(文件目录更清爽了,注意,这次不要使用覆盖升级), 可以将旧版本根目录下的Data文件复制到新版本根目录, 然后使用新版本启动','增加可拖动图标到其它菜单的功能,取消了拖动时的动画','增加了列表展开动画的开关','增加了数据备份功能','优化大部分动画','优化搜索功能(达到了可只用键盘或只用鼠标启动所需目标)','增加了相对路径(实验性,可能有bug)','增加列表加密功能(实验性,可能有bug)','其它已知问题修复']",
+ "msg": "['依旧耗费了我大量精力开发,希望大家去给我点个免费的Star', '这个版本有一些优化点, 大家可以自行探索, 另外征集新Logo的设计, 要求美观并能体现\\'极客\\'风格','本次重新打包了程序文件(文件目录更清爽了,注意,这次不要使用覆盖升级(2.5.10可覆盖)), 可以将旧版本根目录下的Data文件复制到新版本根目录, 然后使用新版本启动','修复了2.5.10版本部分相对路径创建导致启动崩溃的bug','增加可拖动图标到其它菜单的功能,取消了拖动时的动画','增加了列表展开动画的开关','增加了数据备份功能','优化大部分动画','优化搜索功能(达到了可只用键盘或只用鼠标启动所需目标)','增加了相对路径(实验性,可能有bug)','增加列表加密功能(实验性,可能有bug)','其它已知问题修复']",
"githubUrl": "https://github.com/BookerLiu/GeekDesk/releases",
"giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases",
- "version": "2.5.10"
+ "version": "2.5.11"
}
\ No newline at end of file
diff --git a/Util/FileUtil.cs b/Util/FileUtil.cs
index cf05976..50f01c9 100644
--- a/Util/FileUtil.cs
+++ b/Util/FileUtil.cs
@@ -159,16 +159,23 @@ namespace GeekDesk.Util
public static string MakeRelativePath(string fromPath, string toPath)
{
- if (string.IsNullOrEmpty(toPath) || string.IsNullOrEmpty(fromPath)) return null;
- Uri file = new Uri(@toPath);
- // Must end in a slash to indicate folder
- Uri folder = new Uri(@fromPath);
- string relativePath =
- Uri.UnescapeDataString(
- folder.MakeRelativeUri(file)
- .ToString()
- .Replace('/', Path.DirectorySeparatorChar)
- );
+ string relativePath = null;
+ try
+ {
+ if (string.IsNullOrEmpty(toPath) || string.IsNullOrEmpty(fromPath)) return null;
+ Uri file = new Uri(@toPath);
+ // Must end in a slash to indicate folder
+ Uri folder = new Uri(@fromPath);
+ relativePath =
+ Uri.UnescapeDataString(
+ folder.MakeRelativeUri(file)
+ .ToString()
+ .Replace('/', Path.DirectorySeparatorChar)
+ );
+ } catch (Exception ex)
+ {
+ LogUtil.WriteErrorLog(ex, "建立相对路径出错:fromPath:" + fromPath + ",toPath:" + toPath);
+ }
return relativePath;
}
diff --git a/ViewModel/IconInfo.cs b/ViewModel/IconInfo.cs
index 6501010..c83ae52 100644
--- a/ViewModel/IconInfo.cs
+++ b/ViewModel/IconInfo.cs
@@ -205,6 +205,14 @@ namespace GeekDesk.ViewModel
set
{
name = value;
+ if (StringUtil.IsEmpty(Path))
+ {
+ content = Name + "\n使用次数: " + Count;
+ }
+ else
+ {
+ content = Path + "\n" + Name + "\n使用次数: " + Count;
+ }
}
}
@@ -238,6 +246,14 @@ namespace GeekDesk.ViewModel
set
{
path = value;
+ if (StringUtil.IsEmpty(Path))
+ {
+ content = Name + "\n使用次数: " + Count;
+ }
+ else
+ {
+ content = Path + "\n" + Name + "\n使用次数: " + Count;
+ }
}
}