tcp连接逻辑
添加登录动画
This commit is contained in:
commit
9abaeaf43b
6 files changed
+209
-7
No files matched your search
+11
-3
@@ -70,10 +70,12 @@ public partial class LogPage : ContentPage
|
||||
|
||||
private async void Log_Clicked(object sender, EventArgs e)//登录
|
||||
{
|
||||
TcpServer.Configuration(SERVERIP.Text, UsernameEntry.Text, PasswordEntry.Text,
|
||||
TcpServer.Configuration(SERVERIP.Text, UsernameEntry.Text, PasswordEntry.Text,
|
||||
Models.AppModels.GetAppUniqueId());
|
||||
|
||||
if (await AppModels.LogIn())
|
||||
LoadingIndicator.IsVisible = true;
|
||||
|
||||
if (await AppModels.LogIn())
|
||||
{
|
||||
var temp_name = AppModels.Select("SELECT * FROM Users WHERE User='" + UsernameEntry.Text + "' LIMIT 1;")!.Tables[0];
|
||||
if (temp_name != null)
|
||||
@@ -104,8 +106,14 @@ public partial class LogPage : ContentPage
|
||||
App.GlobalData.ServerID + "');";
|
||||
AppModels.INSERT(sql);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
await Navigation.PopModalAsync();
|
||||
else
|
||||
{
|
||||
await DisplayAlertAsync("未登录", "服务器不存在或拒绝访问", "是");
|
||||
}
|
||||
LoadingIndicator.IsVisible = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user