Fix bugs and proxy issues
This commit is contained in:
parent
99d247c06f
commit
75f9ec61eb
@ -219,26 +219,30 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
//检查
|
//检查
|
||||||
new Thread(new ThreadStart(() => {
|
new Thread(new ThreadStart(() => {
|
||||||
string response = GetWebClient("http://e.wxriw.cn:1957");
|
try
|
||||||
if (response.Contains("Special Version"))
|
|
||||||
{
|
{
|
||||||
if (response.Contains("<notice>"))
|
string response = GetWebClient("http://e.wxriw.cn:1957");
|
||||||
|
if (response.Contains("Special Version"))
|
||||||
{
|
{
|
||||||
string str = Strings.Mid(response, response.IndexOf("<notice>") + 9);
|
if (response.Contains("<notice>"))
|
||||||
if (str.Contains("<notice>"))
|
|
||||||
{
|
{
|
||||||
str = Strings.Left(str, str.IndexOf("<notice>")).Trim();
|
string str = Strings.Mid(response, response.IndexOf("<notice>") + 9);
|
||||||
if (str.Length > 0)
|
if (str.Contains("<notice>"))
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
str = Strings.Left(str, str.IndexOf("<notice>")).Trim();
|
||||||
|
if (str.Length > 0)
|
||||||
{
|
{
|
||||||
GroupBoxMASEZVersion.Visibility = Visibility.Visible;
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
TextBlockMASEZNotice.Text = str;
|
{
|
||||||
});
|
GroupBoxMASEZVersion.Visibility = Visibility.Visible;
|
||||||
|
TextBlockMASEZNotice.Text = str;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
})).Start();
|
})).Start();
|
||||||
|
|
||||||
//加载设置
|
//加载设置
|
||||||
@ -411,13 +415,13 @@ namespace Ink_Canvas
|
|||||||
if (Main_Grid.Background == Brushes.Transparent)
|
if (Main_Grid.Background == Brushes.Transparent)
|
||||||
{
|
{
|
||||||
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
|
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
|
||||||
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
|
||||||
if (currentMode == 1)
|
if (currentMode == 1)
|
||||||
{
|
{
|
||||||
currentMode = 0;
|
currentMode = 0;
|
||||||
GridBackgroundCover.Visibility = Visibility.Hidden;
|
GridBackgroundCover.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnColorBlack_Click(object sender, RoutedEventArgs e)
|
private void BtnColorBlack_Click(object sender, RoutedEventArgs e)
|
||||||
@ -1040,6 +1044,7 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
HttpWebRequest myrq = (HttpWebRequest)WebRequest.Create(url);
|
HttpWebRequest myrq = (HttpWebRequest)WebRequest.Create(url);
|
||||||
|
|
||||||
|
myrq.Proxy = null;
|
||||||
myrq.KeepAlive = false;
|
myrq.KeepAlive = false;
|
||||||
myrq.Timeout = 30 * 1000;
|
myrq.Timeout = 30 * 1000;
|
||||||
myrq.Method = "Get";
|
myrq.Method = "Get";
|
||||||
|
Loading…
Reference in New Issue
Block a user