43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Threading;
|
|
using CityCraft;
|
|
namespace CTZLauncher.CTZAuth
|
|
{
|
|
class CTZAuth : ICTZAuth
|
|
{
|
|
HttpHelper http = new HttpHelper();
|
|
string address;
|
|
string port;
|
|
public bool isRegister(string username)
|
|
{
|
|
return getResult(address + ":" + port + "/isregister?username=" + username);
|
|
}
|
|
|
|
public bool Register(string username, string password)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public bool isLogin(string username)
|
|
{
|
|
return getResult(address + ":" + port + "/islogin?username=" + username);
|
|
}
|
|
|
|
public bool Login(string username, string password)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public bool getResult(string url)
|
|
{
|
|
string result = http.Send(HttpMethod.GET, url);
|
|
if (result == "true")
|
|
return true;
|
|
return false;
|
|
}
|
|
}
|
|
}
|