2023-03-04 01:33:21 +08:00

34 lines
1022 B
C#

using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Core.Library.Exception;
using Milimoe.FunGame.Desktop.Library;
namespace Milimoe.FunGame.Desktop.Model
{
public class RegisterModel
{
public static bool Reg(params object[]? objs)
{
try
{
Core.Library.Common.Network.Socket? Socket = RunTime.Socket;
if (Socket != null && objs != null)
{
string username = "";
string email = "";
if (objs.Length > 0) username = (string)objs[0];
if (objs.Length > 1) email = (string)objs[1];
if (Socket.Send(SocketMessageType.Reg, username, email) == SocketResult.Success)
{
return true;
}
}
}
catch (Exception e)
{
e.GetErrorInfo();
}
return false;
}
}
}