diff --git a/CTZLauncher/Authentication/CTZAuthenticator.cs b/CTZLauncher/Authentication/CTZAuthenticator.cs
index 9c02b95..a09f7f3 100644
--- a/CTZLauncher/Authentication/CTZAuthenticator.cs
+++ b/CTZLauncher/Authentication/CTZAuthenticator.cs
@@ -68,7 +68,7 @@ namespace KMCCC.Authentication
public bool getResult(string url)
{
- return http.Send(HttpMethod.GET, url) == "true" ? true : false;
+ return http.Send(HttpMethod.GET, url).Contains("true") ? true : false;
}
}
}
diff --git a/CTZLauncher/MainWindow.xaml b/CTZLauncher/MainWindow.xaml
index ffe8d19..0862a0b 100644
--- a/CTZLauncher/MainWindow.xaml
+++ b/CTZLauncher/MainWindow.xaml
@@ -110,7 +110,7 @@
-
+
@@ -149,7 +149,7 @@
-
+
diff --git a/CTZLauncher/MainWindow.xaml.cs b/CTZLauncher/MainWindow.xaml.cs
index 06e41cb..97785bf 100644
--- a/CTZLauncher/MainWindow.xaml.cs
+++ b/CTZLauncher/MainWindow.xaml.cs
@@ -27,7 +27,7 @@ namespace CTZLauncher
///
public partial class MainWindow : Window
{
- LauncherCore launcher;
+ LauncherCore launcher = null;
public MainWindow()
{
InitializeComponent();
@@ -39,7 +39,7 @@ namespace CTZLauncher
{
Directory.CreateDirectory(".minecraft");
}
- LauncherCore launcher = LauncherCore.Create(".minecraft");
+ launcher = LauncherCore.Create(".minecraft");
}
private void Window_Loaded(object sender, RoutedEventArgs e)
@@ -84,20 +84,19 @@ namespace CTZLauncher
if (auth.isLogin())
{
MessageBox.Show("当前玩家已登录!");
- Login.IsEnabled = true;
- return;
- }
- if (!auth.Login())
- {
- MessageBox.Show("登录失败 账号不存在 或 密码错误 !");
- Login.IsEnabled = true;
- return;
}
else
{
- ServerWindow.Visibility = System.Windows.Visibility.Visible;
- return;
+ if (!auth.Login())
+ {
+ MessageBox.Show("登录失败 账号不存在 或 密码错误 !");
+ }
+ else
+ {
+ ServerWindow.Visibility = System.Windows.Visibility.Visible;
+ }
}
+ Login.IsEnabled = true;
}
///