tcp连接逻辑

添加登录动画
This commit is contained in:
sc committed 2026-05-03 22:11:28 +08:00
commit 9abaeaf43b
6 files changed
+209 -7

No files matched your search

+11 -3
View File
@@ -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;
}