🍻 为改名做准备, 之后我叫BookerLiu 🍻

This commit is contained in:
liufei
2022-05-26 16:40:58 +08:00
parent 28d6fe07d4
commit cbffdada7a
7 changed files with 97 additions and 23 deletions

View File

@@ -50,10 +50,11 @@
</runtime> </runtime>
<appSettings> <appSettings>
<add key="Version" value="2.4.15" /> <add key="Version" value="2.4.15" />
<add key="GitHubUrl" value="https://github.com/Demo-Liu/GeekDesk" /> <add key="GitHubUrl" value="https://github.com/BookerLiu/GeekDesk" />
<add key="GiteeUrl" value="https://gitee.com/demo_liu/GeekDesk/tree/master" /> <add key="GiteeUrl" value="https://gitee.com/BookerLiu/GeekDesk/tree/master" />
<add key="GitHubUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" /> <add key="GitHubUpdateUrl" value="https://raw.githubusercontent.com/BookerLiu/GeekDesk/master/Update.json" />
<add key="GiteeUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" /> <add key="GiteeUpdateUrl" value="https://gitee.com/BookerLiu/GeekDesk/raw/master/Update.json" />
<!--<add key="GiteeUpdateUrl" value="file:///C:/Users/Fei/Desktop/GeekDesk/Update.json" />-->
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law" /> <add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law" />
</appSettings> </appSettings>

View File

@@ -26,13 +26,13 @@
MouseEnter="SC_MouseEnter" MouseEnter="SC_MouseEnter"
MouseLeave="SC_MouseLeave" MouseLeave="SC_MouseLeave"
Command="hc:ControlCommands.OpenLink" Command="hc:ControlCommands.OpenLink"
CommandParameter="https://github.com/Demo-Liu/GeekDesk" CommandParameter="https://github.com/BookerLiu/GeekDesk"
Margin="0,0,10,0" Color="#24292F"/> Margin="0,0,10,0" Color="#24292F"/>
<hc:Shield Subject="Gitee" Visibility="Visible" Status="Star" <hc:Shield Subject="Gitee" Visibility="Visible" Status="Star"
MouseEnter="SC_MouseEnter" MouseEnter="SC_MouseEnter"
MouseLeave="SC_MouseLeave" MouseLeave="SC_MouseLeave"
Command="hc:ControlCommands.OpenLink" Command="hc:ControlCommands.OpenLink"
CommandParameter="https://gitee.com/demo_liu/GeekDesk" CommandParameter="https://gitee.com/BookerLiu/GeekDesk"
Margin="0,0,10,0" Color="#C71D23"/> Margin="0,0,10,0" Color="#C71D23"/>

View File

@@ -22,14 +22,22 @@
<StackPanel HorizontalAlignment="Center"> <StackPanel HorizontalAlignment="Center">
<hc:Card BorderThickness="0" Effect="{DynamicResource EffectShadow2}" Margin="20,20,20,0"> <hc:Card BorderThickness="0" Effect="{DynamicResource EffectShadow2}" Margin="20,20,20,0">
<!--Card 的内容部分--> <!--Card 的内容部分-->
<Border CornerRadius="4,4,0,0" Height="260"> <Border CornerRadius="4,4,0,0">
<StackPanel> <StackPanel>
<hc:SimplePanel VerticalAlignment="Center">
<TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/> <TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/>
<Button HorizontalAlignment="Right" Margin="0,0,10,0"
Content="去点个Star" Click="StarBtnClick"
Style="{StaticResource Btn1}"
hc:IconElement.Geometry="M718.565517 863.126069c-7.344552 0-15.077517-2.189241-22.987034-6.285241L512 760.337655l-183.613793 96.503173c-18.785103 9.851586-37.499586 7.521103-48.16331-5.12-5.12-6.10869-10.557793-17.125517-7.485794-35.345656l35.063173-204.411586L159.249655 467.155862c-12.747034-12.393931-17.584552-27.153655-13.241379-40.430345 4.343172-13.312 16.913655-22.386759 34.568827-24.929103l205.223725-29.837242 91.806896-185.979586c7.874207-15.995586 20.409379-25.140966 34.392276-25.140965 13.947586 0 26.482759 9.145379 34.392276 25.140965l91.771586 185.979586 205.259035 29.837242c17.619862 2.577655 30.190345 11.652414 34.498206 24.964414 4.378483 13.27669-0.529655 28.001103-13.241379 40.430344l-148.51531 144.807725 35.063172 204.411586c3.10731 18.149517-2.365793 29.272276-7.485793 35.345655a32.273655 32.273655 0 0 1-25.176276 11.369931z"
/>
</hc:SimplePanel>
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black" Margin="20,0,20,0"/>
<hc:ScrollViewer BorderThickness="0" Margin="0,5,1,5" Height="225">
<StackPanel x:Name="MsgPanel"> <StackPanel x:Name="MsgPanel">
<hc:ScrollViewer x:Name="MsgBar" HorizontalScrollBarVisibility="Visible" IsInertiaEnabled="True" Margin="10" Width="430"> <TextBlock Width="430" FontSize="15" LineHeight="25" x:Name="Msg" TextWrapping="Wrap" VerticalAlignment="Center" Text="测试"/>
<TextBlock Width="430" FontSize="15" LineHeight="22" x:Name="Msg" TextWrapping="Wrap" VerticalAlignment="Center" Text="测试"/>
</hc:ScrollViewer>
</StackPanel> </StackPanel>
</hc:ScrollViewer>
</StackPanel> </StackPanel>
</Border> </Border>
<!--Card 的尾部部分--> <!--Card 的尾部部分-->
@@ -47,7 +55,7 @@
</hc:Card.Footer> </hc:Card.Footer>
</hc:Card> </hc:Card>
<hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0"> <hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0">
<Button Content="暂不更新" Click="Close_Click" /> <Button Content="暂不更新" Click="Close_Click" Style="{StaticResource Btn1}"/>
<Button Content="前往更新" Click="Confirm_Click" Style="{StaticResource Btn1}"/> <Button Content="前往更新" Click="Confirm_Click" Style="{StaticResource Btn1}"/>
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
</StackPanel> </StackPanel>

View File

@@ -6,6 +6,7 @@ using Newtonsoft.Json.Linq;
using System; using System;
using System.Configuration; using System.Configuration;
using System.Diagnostics; using System.Diagnostics;
using System.Net;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
@@ -82,7 +83,11 @@ namespace GeekDesk.Control.Windows
packageUrl = giteeUrl; packageUrl = giteeUrl;
break; break;
} }
Process.Start(packageUrl); Process.Start(new ProcessStartInfo("cmd", $"/c start {packageUrl}")
{
UseShellExecute = false,
CreateNoWindow = true
});
this.Close(); this.Close();
} }
@@ -94,6 +99,7 @@ namespace GeekDesk.Control.Windows
window = new UpdateWindow(jo); window = new UpdateWindow(jo);
} }
window.Show(); window.Show();
window.Activate();
Keyboard.Focus(window); Keyboard.Focus(window);
} }
@@ -105,5 +111,59 @@ namespace GeekDesk.Control.Windows
this.Close(); 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
});
}
} }
} }

View File

@@ -473,4 +473,9 @@
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties update_1json__JsonSchema="https://typedoc.org/schema.json" />
</VisualStudio>
</ProjectExtensions>
</Project> </Project>

View File

@@ -8,7 +8,7 @@ using System.Windows;
[assembly: AssemblyTitle("GeekDesk")] [assembly: AssemblyTitle("GeekDesk")]
[assembly: AssemblyDescription("小巧、美观的桌面快速启动工具")] [assembly: AssemblyDescription("小巧、美观的桌面快速启动工具")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Demo-Liu")] [assembly: AssemblyCompany("BookerLiu")]
[assembly: AssemblyProduct("GeekDesk")] [assembly: AssemblyProduct("GeekDesk")]
[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@@ -1,9 +1,9 @@
{ {
"title": "GeekDesk版本更新", "title": "GeekDesk版本更新",
"subTitle": "V2.4.14", "subTitle": "V2.4.15",
"msgTitle": "本次更新内容如下", "msgTitle": "本次更新内容如下",
"msg": "['这次更新间隔比较久, 一个是工作比较忙, 另一个是因为老毛病颈椎病犯了, 但新版本总归是来了','增加图标排序功能','增加鼠标悬停切换菜单','增加搜索功能,显示界面后按下Ctrl+F','其它已知问题修复','老规矩兄弟萌, 我用爱发电, 你们点免费Star']", "msg": "['PS:又一次的更新, 虽然还有很多需求没有完成, 但仍然耗费了我大量的精力, 没有点Star的兄弟萌, 求个免费Star(GitHub国内某些用户可能进不去), 再给我一点更新的动力!','增加纯色/渐变色背景','增加/优化拾色器功能','增加主面板Logo开关','优化待办任务,现在待办任务快捷键不再是新建待办窗口','增加鼠标滚轮切换菜单功能(需要鼠标指针在菜单栏)','优化搜索功能,增加 快捷键搜索/按键即搜 可选操作','优化贴边隐藏动画, 纵享丝滑了属于是兄弟萌', '其它已知问题修复']",
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases", "githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
"giteeUrl": "https://gitee.com/demo_liu/GeekDesk/releases", "giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases",
"version": "2.4.14" "version": "2.4.15"
} }