diff --git a/CTZLauncher/CTZAuth/CTZAuth.cs b/CTZLauncher/CTZAuth/CTZAuth.cs index fa316d2..11ff399 100644 --- a/CTZLauncher/CTZAuth/CTZAuth.cs +++ b/CTZLauncher/CTZAuth/CTZAuth.cs @@ -10,7 +10,14 @@ namespace CTZLauncher.CTZAuth { HttpHelper http = new HttpHelper(); string address; - string port; + int port; + + CTZAuth(string address,int port = 25565) + { + this.address = address; + this.port = port; + } + public bool isRegister(string username) { return getResult(address + ":" + port + "/isregister?username=" + username); @@ -18,7 +25,7 @@ namespace CTZLauncher.CTZAuth public bool Register(string username, string password) { - return false; + return getResult(address + ":" + port + "/register?username=" + username + "&password=" + password); } public bool isLogin(string username) @@ -28,7 +35,7 @@ namespace CTZLauncher.CTZAuth public bool Login(string username, string password) { - return false; + return getResult(address + ":" + port + "/login?username=" + username + "&password=" + password); } public bool getResult(string url) diff --git a/CTZLauncher/CTZAuth/ICTZAuth.cs b/CTZLauncher/CTZAuth/ICTZAuth.cs index a9487d8..29acb70 100644 --- a/CTZLauncher/CTZAuth/ICTZAuth.cs +++ b/CTZLauncher/CTZAuth/ICTZAuth.cs @@ -7,13 +7,13 @@ namespace CTZLauncher.CTZAuth { interface ICTZAuth { - public abstract bool isRegister(string username); + bool isRegister(string username); - public abstract bool Register(string username, string password); + bool Register(string username, string password); - public abstract bool isLogin(string username); + bool isLogin(string username); - public abstract bool Login(string username, string password); + bool Login(string username, string password); } } diff --git a/CTZLauncher/MainWindow.xaml b/CTZLauncher/MainWindow.xaml index ba49efb..acb055c 100644 --- a/CTZLauncher/MainWindow.xaml +++ b/CTZLauncher/MainWindow.xaml @@ -1,117 +1,108 @@ - - - - - - 32 - - - - - - - - - - - - - - - - - - - - - - - - - - - -