mirror of
https://e.coding.net/circlecloud/CTZLauncher.git
synced 2024-11-22 02:08:49 +00:00
修复HttpHelper...
This commit is contained in:
parent
757daff238
commit
40549f65af
@ -42,13 +42,13 @@ namespace CityCraft
|
|||||||
}
|
}
|
||||||
public class HttpHelper
|
public class HttpHelper
|
||||||
{
|
{
|
||||||
public static HttpReadyState readyState = HttpReadyState.未初始化;
|
public HttpReadyState readyState = HttpReadyState.未初始化;
|
||||||
public static int Status = 0;
|
public int Status = 0;
|
||||||
public static string responseBody = "";
|
public string responseBody = "";
|
||||||
public static string responseText = "";
|
public string responseText = "";
|
||||||
public static byte[] responseByte = null;
|
public byte[] responseByte = null;
|
||||||
public static HttpArgs args = new HttpArgs();
|
public HttpArgs args = new HttpArgs();
|
||||||
public static string ErrMsg = string.Empty;
|
public string ErrMsg = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交方法
|
/// 提交方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -104,8 +104,9 @@ namespace CTZLauncher
|
|||||||
private void Login_Click(object sender, RoutedEventArgs e)
|
private void Login_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
HttpHelper http = new HttpHelper();
|
HttpHelper http = new HttpHelper();
|
||||||
http.Send(HttpMethod.GET,"http://127.0.0.1:2000/isregistered?username=" + username.Text);
|
http.Send(HttpMethod.GET, "http://127.0.0.1:2000/isregistered?username=" + username.Text);
|
||||||
while(http.readyState!=HttpReadyState.完成){
|
while (http.readyState != HttpReadyState.完成)
|
||||||
|
{
|
||||||
DoEvent();
|
DoEvent();
|
||||||
}
|
}
|
||||||
String result = http.responseBody;
|
String result = http.responseBody;
|
||||||
@ -159,7 +160,7 @@ namespace CTZLauncher
|
|||||||
|
|
||||||
private void maxmem_TextChanged(object sender, TextChangedEventArgs e)
|
private void maxmem_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
//屏蔽中文输入和非法字符粘贴输入
|
//屏蔽中文输入和非法字符粘贴输入
|
||||||
TextBox textBox = sender as TextBox;
|
TextBox textBox = sender as TextBox;
|
||||||
TextChange[] change = new TextChange[e.Changes.Count];
|
TextChange[] change = new TextChange[e.Changes.Count];
|
||||||
|
Loading…
Reference in New Issue
Block a user