public void ChangeMachineName(string newName, string oldName) { if (newName == oldName) { return; } /// if (string.IsNullOrEmpty(newName)) { ErrorDialogCon errorcon = new ErrorDialogCon(); errorcon.ErrorMsg = "名称不能为空"; errorcon.PopupDialog(); return; } /// if (MachineLogic.ChangeMachineName(MachineLogic.localMachine().machineId, newName) == false) { ErrorDialogCon errorcon = new ErrorDialogCon(); errorcon.ErrorMsg = "更新名称错误"; errorcon.PopupDialog(); return; } /// foreach (var m in myMachines) { WebSocketClient.SendMessage(m.machineId, newName, msgType.client_onNameChange); } }
protected void showInfo(string info) { ErrorDialogCon con = new ErrorDialogCon(); con.ErrorMsg = info; con.PopupDialog(); }
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { e.Handled = true; ErrorDialogCon con = new ErrorDialogCon(); con.ErrorMsg = e.Exception.Message; //show the dialog con.PopupDialog(); }
public void checkMethod(object param) { if (UserLogic.checkRegisterUser(checkId, checkCode) == true) { ErrorDialogCon con = new ErrorDialogCon(); con.ErrorMsg = "注册成功,请登录"; //show the dialog con.PopupDialog(); NavigationHelper.NavigatedToView("用户登录"); } }
public void loginMethod(object param) { if (UserLogic.Login(this.userName, pwd, Environment.MachineName)) { var machineInfo = MachineLogic.localMachine(); ErrorDialogCon con = new ErrorDialogCon(); con.ErrorMsg = "登录成功,机器ID:" + machineInfo.machineId + ",机器密码:" + machineInfo.machinepwd; //show the dialog con.PopupDialog(); NavigationHelper.NavigatedToView("主界面"); } }