Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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();
        }