private void ProcessCheckNameResponse(RdlTagCollection tags) { RdlCommandResponse response = tags.GetTags <RdlCommandResponse>(RdlTagName.RESP.ToString(), "CHECKNAME").FirstOrDefault(); if (response != null) { this.IsNameAvailable = response.Result; this.NameCheckComplete(new NameCheckEventArgs { IsAvailable = response.Result, Message = response.Message }); } //else //{ // this.IsNameAvailable = false; // this.NameCheckComplete(new NameCheckEventArgs { IsAvailable = false, Message = "Name check failed, please try again." }); //} this.Cursor = Cursors.Arrow; }
private void ProcessCreateCharacterResponse(RdlTagCollection tags) { diagCreateCharacter.Close(); RdlCommandResponse response = tags.GetTags <RdlCommandResponse>(RdlTagName.RESP.ToString(), "CREATECHARACTER").FirstOrDefault(); if (response != null) { if (response.Result) { // Successful character creation, reload the home screen. ScreenManager.SetScreen(new HomeScreen()); } else { MessageBox.Show(String.Format("Character creation failed for the following reason:\n{0}", response.Message), "Character Creation Failed", MessageBoxButton.OK); } } else { MessageBox.Show("Character creation failed do to a network error. Please try again.", "Character Creation Failed", MessageBoxButton.OK); } }
private void ProcessResetCharacterResponse(RdlTagCollection tags) { diagAlert.Close(); RdlCommandResponse response = tags.GetTags <RdlCommandResponse>(RdlTagName.RESP.ToString(), "RESETCHARACTER").FirstOrDefault(); if (response != null) { if (response.Result) { // Successful character reset, reload the home screen. this.Completed(this, EventArgs.Empty); ScreenManager.SetScreen(new Perenthia.Screens.HomeScreen()); } else { MessageBox.Show(String.Format("Character reset failed for the following reason:\n{0}", response.Message), "Character Reset Failed", MessageBoxButton.OK); } } else { MessageBox.Show("Character reset failed do to a network error. Please try again.", "Character Reset Failed", MessageBoxButton.OK); } this.Close(); }