🧑‍💻 提升开发者体验

This commit is contained in:
liufei
2022-05-25 16:45:47 +08:00
parent e0824f3067
commit 28d6fe07d4
3 changed files with 10 additions and 4 deletions

View File

@@ -149,7 +149,7 @@
</CheckBox> </CheckBox>
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4"> <hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<TextBlock Text="新建待办:" Margin="0,5,0,0" Width="55"/> <TextBlock Text="待办任务:" Margin="0,5,0,0" Width="55"/>
<hc:TextBox HorizontalAlignment="Left" <hc:TextBox HorizontalAlignment="Left"
Tag="{x:Static cst:HotKeyType.ToDo}" Tag="{x:Static cst:HotKeyType.ToDo}"
VerticalAlignment="Top" VerticalAlignment="Top"

View File

@@ -27,7 +27,13 @@ namespace GeekDesk.MyThread
{ {
//等待1分钟后再检查更新 有的网络连接过慢 //等待1分钟后再检查更新 有的网络连接过慢
System.Threading.Thread.Sleep(60 * 1000); int sleepTime = 60 * 1000;
if (Constants.DEV)
{
sleepTime = 1;
}
System.Threading.Thread.Sleep(sleepTime);
string updateUrl; string updateUrl;
string nowVersion = ConfigurationManager.AppSettings["Version"]; string nowVersion = ConfigurationManager.AppSettings["Version"];

View File

@@ -12,10 +12,10 @@ namespace GeekDesk.Util
ServicePointManager.Expect100Continue = true; ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
//创建Web访问对 象 //创建Web访问对 象
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url); WebRequest myRequest = WebRequest.Create(url);
myRequest.ContentType = "text/plain; charset=utf-8"; myRequest.ContentType = "text/plain; charset=utf-8";
//通过Web访问对象获取响应内容 //通过Web访问对象获取响应内容
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); WebResponse myResponse = myRequest.GetResponse();
//通过响应内容流创建StreamReader对象因为StreamReader更高级更快 //通过响应内容流创建StreamReader对象因为StreamReader更高级更快
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.GetEncoding("utf-8")); StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.GetEncoding("utf-8"));