diff --git a/CTZLauncher/Authentication/CTZAuthenticator.cs b/CTZLauncher/Authentication/CTZAuthenticator.cs
index 831e86c..c93c7e0 100644
--- a/CTZLauncher/Authentication/CTZAuthenticator.cs
+++ b/CTZLauncher/Authentication/CTZAuthenticator.cs
@@ -68,7 +68,8 @@ namespace KMCCC.Authentication
public string getServerList()
{
- return http.Send(HttpMethod.GET, Address + ":" + Port + "/serverlist");
+ string sl = http.Send(HttpMethod.GET, Address + ":" + Port + "/serverlist");
+ return sl.Replace("\0","");
}
public bool getResult(string url)
diff --git a/CTZLauncher/HttpHelper.cs b/CTZLauncher/HttpHelper.cs
index b91bc06..8ab0c22 100644
--- a/CTZLauncher/HttpHelper.cs
+++ b/CTZLauncher/HttpHelper.cs
@@ -206,7 +206,7 @@ namespace CityCraft
private string ParseResponse(byte[] responseBytes)
{
- string responseStr = Encoding.UTF8.GetString(responseBytes);
+ string responseStr = Encoding.Default.GetString(responseBytes);
int splitindex = responseStr.IndexOf("\r\n\r\n");
if (splitindex > 0)
{
diff --git a/CTZLauncher/MainWindow.xaml b/CTZLauncher/MainWindow.xaml
index a524838..7360dc3 100644
--- a/CTZLauncher/MainWindow.xaml
+++ b/CTZLauncher/MainWindow.xaml
@@ -57,7 +57,7 @@
-
+
@@ -116,36 +116,36 @@
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -155,7 +155,7 @@
-
+
diff --git a/CTZLauncher/MainWindow.xaml.cs b/CTZLauncher/MainWindow.xaml.cs
index a900021..b8b3d45 100644
--- a/CTZLauncher/MainWindow.xaml.cs
+++ b/CTZLauncher/MainWindow.xaml.cs
@@ -32,7 +32,7 @@ namespace CTZLauncher
{
LauncherCore launcher = null;
LaunchOptions option = new LaunchOptions();
- string serveraddress = "";
+ string serveraddress = "CityCraft.cn";
int serverport = 25580;
#region 初始化部分
@@ -108,7 +108,7 @@ namespace CTZLauncher
DoubleAnimation dbAscending = new DoubleAnimation(0, 360, new Duration(TimeSpan.FromSeconds(0.75)));
dbAscending.RepeatBehavior = new RepeatBehavior(1);
rtf.BeginAnimation(RotateTransform.AngleProperty, dbAscending);
- CTZServer areas = JsonMapper.ToObject(auth.getServerList());
+ CTZServer areas = JsonMapper.ToObject(auth.getServerList().ToLower());
LoadAreas(areas);
}
}
@@ -167,17 +167,12 @@ namespace CTZLauncher
else
MessageBox.Show("注册失败!");
}
-
- private void forget_Click(object sender, RoutedEventArgs e)
- {
-
- }
#endregion
#region 服务器选择与启动
private void LoadAreas(CTZServer areas)
{
- for (int i = 1; i <= areas.Areas.Count; i++)
+ for (int i = 0; i < areas.Areas.Count; i++)
{
Area area = areas.Areas[i];
RadioButton arearb = GameArea.FindName("a" + i) as RadioButton;
@@ -189,7 +184,7 @@ namespace CTZLauncher
private void LoadServers(List servers)
{
- for (int i = 1; i <= servers.Count; i++)
+ for (int i = 0; i < servers.Count; i++)
{
Server server = servers[i];
RadioButton serverrb = GameArea.FindName("s" + i) as RadioButton;