private void window_Loaded(object sender, RoutedEventArgs e) { DMCCLogin = new DMCCLogin { Hostname = "172.23.24.150", Port = 4721, Username = "******", Password = "******", }; DeviceLogin = new DeviceLogin { //Extension = "1025", SwitchName = "aes150" }; }
public void RetryAction(DeviceLogin deviceLogin) { Hide(); if (action == "Login") { deviceLogin.LoginToPlayFab(PlayerPrefsManager.GetPlayerCustomId()); } else if (action == "Create") { deviceLogin.CreatePlayFabAccount(PlayerPrefsManager.GetPlayerCustomId(), playerName); } else if (action == "Transfer") { deviceLogin.TransferPlayFabAccount(transferPasscode); } }
void ws_NewMessageReceived(WebSocketSession session, string value) { var msg = string.Format("{0:HH:MM:ss} {1}说: {2}", DateTime.Now, GetSessionName(session), value); //开始进行业务逻辑的判断,不同的业务,给它指定到不同的类中处理。首先要验证发送消息数据的完整性,看是否终结符存在 if (value.IndexOf(ConfigurationManager.AppSettings["CustomTerminatorSign"]) >= 0) { value = value.Replace(ConfigurationManager.AppSettings["CustomTerminatorSign"], ""); if (value.IndexOf("DeviceLogin:"******"DeviceLogin:"******"")); } } else { msg = string.Format("Unknown:{ \"status\":0, \"msg\": \"你发送的数据格式不符合约定。\""); ; SendToOneUser(session, msg + ConfigurationManager.AppSettings["CustomTerminatorSign"]);//只对当前登陆人发送消息 } }
public async Task <IActionResult> Login(DeviceLogin data) { return(Ok(await repo.FindDeviceByImei(data.Imei))); }