From 22dabdb0bdf7b6769e676b372b6d3384bba6afa9 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Sun, 2 Aug 2015 21:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E9=87=8D=E6=96=B0=E8=B0=83=E6=95=B4=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CTZLauncher/CTZAuth/CTZAuth.cs | 13 +- CTZLauncher/CTZAuth/ICTZAuth.cs | 8 +- CTZLauncher/MainWindow.xaml | 225 +++++++++++++++----------------- 3 files changed, 122 insertions(+), 124 deletions(-) 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - -