添加记录游戏时间,修改聊天字符串

This commit is contained in:
Mili 2023-03-13 23:58:04 +08:00
parent 62193971b4
commit 70036f2f3d
2 changed files with 11 additions and 6 deletions

View File

@ -41,19 +41,24 @@
return $"{Select_Users} {Constant.Command_Where} {Where}'";
}
public static string Select_CheckAutoKey(string Username, string AutoKey)
{
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_AutoKey} = '{AutoKey}'";
}
public static string Update_CheckLogin(string Username, string IP)
{
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_LastTime} = '{DateTime.Now}', {Column_LastIP} = '{IP}' {Constant.Command_Where} {Column_Username} = '{Username}'";
}
public static string Update_GameTime(string Username, int GameTimeMinutes)
{
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_GameTime} = {Column_GameTime} + {GameTimeMinutes} {Constant.Command_Where} {Column_Username} = '{Username}'";
}
public static string Insert_Register(string Username, string Password, string Email)
{
return $"{Constant.Command_Insert} {Constant.Command_Into} {TableName} ({Column_Username}, {Column_Password}, {Column_Email}, {Column_RegTime}) {Constant.Command_Values} ('{Username}', '{Password}', '{Email}', '{DateTime.Now}')";
}
public static string Select_CheckAutoKey(string Username, string AutoKey)
{
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_AutoKey} = '{AutoKey}'";
}
}
}

View File

@ -675,7 +675,7 @@ namespace Milimoe.FunGame.Desktop.UI
WritelnGameInfo(msg);
if (Usercfg.LoginUser != null && !SwitchTalkMessage(text))
{
MainController?.Chat(msg);
MainController?.Chat(" [ " + Usercfg.LoginUserName + " ] 说: " + text);
}
TalkText.Text = "";
if (isLeave) TalkText_Leave(); // 回车不离开焦点