Esempio n. 1
0
        public void ComposeMail(string recipientName)
        {
            if (string.IsNullOrEmpty(recipientName))
            {
                return;
            }

            RecipientNameLabel.Text = recipientName;
            MessageTextBox.Text     = string.Empty;
            MessageTextBox.SetFocus();

            UpdateParcel();

            //Disable last 4 item slots
            for (int i = 1; i < Cells.Length; i++)
            {
                Cells[i].Enabled = false;
            }

            ParcelCostLabel.Text = "0";
            GoldSendLabel.Text   = "0";

            ResetLockedCells();

            Visible = true;
        }
Esempio n. 2
0
        public void ComposeBoard(string recipientName)
        {
            bool flag = string.IsNullOrEmpty(recipientName);

            if (!flag)
            {
                RecipientNameLabel.Text = recipientName;
                MessageTextBox.Text     = string.Empty;
                MessageTextBox.SetFocus();
                Visible = true;
            }
        }
Esempio n. 3
0
        public void ComposeMail(string recipientName, string message = "")
        {
            if (string.IsNullOrEmpty(recipientName))
            {
                return;
            }

            RecipientNameLabel.Text = recipientName;
            MessageTextBox.Text     = message;

            MessageTextBox.SetFocus();

            Visible = true;
        }
Esempio n. 4
0
        public void ComposeMail(string recipientName)
        {
            if (string.IsNullOrEmpty(recipientName))
            {
                return;
            }

            RecipientNameLabel.Text = recipientName;
            MessageTextBox.Text     = string.Empty;
            MessageTextBox.SetFocus();

            GoldSendLabel.Text = string.Empty;

            ResetLockedCells();

            Visible = true;
        }
Esempio n. 5
0
        public void Show()
        {
            if (Visible)
            {
                return;
            }
            Visible = true;


            if (Friend == null)
            {
                Hide();
                return;
            }

            MemoTextBox.Text = Friend.Memo;
            MemoTextBox.SetFocus();
            MemoTextBox.TextBox.SelectionLength = 0;
            MemoTextBox.TextBox.SelectionStart  = MemoTextBox.Text.Length;
        }
Esempio n. 6
0
            public NewCharacterDialog()
            {
                Index    = 73;
                Library  = Libraries.Prguse;
                Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
                Modal    = true;

                TitleLabel = new MirImageControl
                {
                    Index    = 20,
                    Library  = Libraries.Title,
                    Location = new Point(206, 11),
                    Parent   = this,
                };

                CancelButton = new MirButton
                {
                    HoverIndex   = 281,
                    Index        = 280,
                    Library      = Libraries.Title,
                    Location     = new Point(425, 425),
                    Parent       = this,
                    PressedIndex = 282
                };
                CancelButton.Click += (o, e) => Dispose();


                OKButton = new MirButton
                {
                    Enabled      = false,
                    HoverIndex   = 361,
                    Index        = 360,
                    Library      = Libraries.Title,
                    Location     = new Point(160, 425),
                    Parent       = this,
                    PressedIndex = 362,
                };
                OKButton.Click += (o, e) => CreateCharacter();

                NameTextBox = new MirTextBox
                {
                    Location  = new Point(325, 268),
                    Parent    = this,
                    Size      = new Size(240, 20),
                    MaxLength = Globals.MaxCharacterNameLength
                };
                NameTextBox.TextBox.KeyPress    += TextBox_KeyPress;
                NameTextBox.TextBox.TextChanged += CharacterNameTextBox_TextChanged;
                NameTextBox.SetFocus();

                CharacterDisplay = new MirAnimatedControl
                {
                    Animated       = true,
                    AnimationCount = 16,
                    AnimationDelay = 250,
                    Index          = 20,
                    Library        = Libraries.ChrSel,
                    Location       = new Point(120, 250),
                    Parent         = this,
                    UseOffSet      = true,
                };
                CharacterDisplay.AfterDraw += (o, e) =>
                {
                    if (_class == MirClass.Wizard)
                    {
                        Libraries.ChrSel.DrawBlend(CharacterDisplay.Index + 560, CharacterDisplay.DisplayLocationWithoutOffSet, Color.White, true);
                    }
                };


                WarriorButton = new MirButton
                {
                    HoverIndex   = 2427,
                    Index        = 2427,
                    Library      = Libraries.Prguse,
                    Location     = new Point(323, 296),
                    Parent       = this,
                    PressedIndex = 2428,
                    Sound        = SoundList.ButtonA,
                };
                WarriorButton.Click += (o, e) =>
                {
                    _class = MirClass.Warrior;
                    UpdateInterface();
                };


                WizardButton = new MirButton
                {
                    HoverIndex   = 2430,
                    Index        = 2429,
                    Library      = Libraries.Prguse,
                    Location     = new Point(373, 296),
                    Parent       = this,
                    PressedIndex = 2431,
                    Sound        = SoundList.ButtonA,
                };
                WizardButton.Click += (o, e) =>
                {
                    _class = MirClass.Wizard;
                    UpdateInterface();
                };


                TaoistButton = new MirButton
                {
                    HoverIndex   = 2433,
                    Index        = 2432,
                    Library      = Libraries.Prguse,
                    Location     = new Point(423, 296),
                    Parent       = this,
                    PressedIndex = 2434,
                    Sound        = SoundList.ButtonA,
                };
                TaoistButton.Click += (o, e) =>
                {
                    _class = MirClass.Taoist;
                    UpdateInterface();
                };

                AssassinButton = new MirButton
                {
                    HoverIndex   = 2436,
                    Index        = 2435,
                    Library      = Libraries.Prguse,
                    Location     = new Point(473, 296),
                    Parent       = this,
                    PressedIndex = 2437,
                    Sound        = SoundList.ButtonA,
                };
                AssassinButton.Click += (o, e) =>
                {
                    _class = MirClass.Assassin;
                    UpdateInterface();
                };

                ArcherButton = new MirButton
                {
                    HoverIndex   = 2439,
                    Index        = 2438,
                    Library      = Libraries.Prguse,
                    Location     = new Point(523, 296),
                    Parent       = this,
                    PressedIndex = 2440,
                    Sound        = SoundList.ButtonA,
                };
                ArcherButton.Click += (o, e) =>
                {
                    _class = MirClass.Archer;
                    UpdateInterface();
                };


                MaleButton = new MirButton
                {
                    HoverIndex   = 2421,
                    Index        = 2421,
                    Library      = Libraries.Prguse,
                    Location     = new Point(323, 343),
                    Parent       = this,
                    PressedIndex = 2422,
                    Sound        = SoundList.ButtonA,
                };
                MaleButton.Click += (o, e) =>
                {
                    _gender = MirGender.Male;
                    UpdateInterface();
                };

                FemaleButton = new MirButton
                {
                    HoverIndex   = 2424,
                    Index        = 2423,
                    Library      = Libraries.Prguse,
                    Location     = new Point(373, 343),
                    Parent       = this,
                    PressedIndex = 2425,
                    Sound        = SoundList.ButtonA,
                };
                FemaleButton.Click += (o, e) =>
                {
                    _gender = MirGender.Female;
                    UpdateInterface();
                };

                Description = new MirLabel
                {
                    Border   = true,
                    Location = new Point(279, 70),
                    Parent   = this,
                    Size     = new Size(278, 170),
                    Text     = WarriorDescription,
                };
            }
Esempio n. 7
0
        static LoginDialog()
        {
            LoginWindow = new MirImageControl
            {
                Index   = 1084,
                Library = Libraries.Prguse,
                Parent  = LoginScene.Background,
            };
            LoginWindow.Location = new Point((Settings.ScreenSize.Width - LoginWindow.Size.Width) / 2,
                                             (Settings.ScreenSize.Height - LoginWindow.Size.Height) / 2);

            Title = new MirImageControl
            {
                Index   = 30,
                Library = Libraries.Title,
                Parent  = LoginWindow,
            };
            Title.Location = new Point((LoginWindow.Size.Width - Title.Size.Width) / 2, 5);

            NewAccountButton = new MirButton
            {
                HoverIndex   = 324,
                Index        = 323,
                Library      = Libraries.Title,
                Location     = new Point(60, 163),
                Parent       = LoginWindow,
                PressedIndex = 325
            };
            NewAccountButton.Click += NewAccountButton_Click;

            LoginButton = new MirButton
            {
                Enabled      = false,
                HoverIndex   = 321,
                Index        = 320,
                Library      = Libraries.Title,
                Location     = new Point(227, 83),
                Parent       = LoginWindow,
                PressedIndex = 322,
            };
            LoginButton.Click += new EventHandler(LoginButton_Click);

            ChangePasswordButton = new MirButton
            {
                HoverIndex   = 327,
                Index        = 326,
                Library      = Libraries.Title,
                Location     = new Point(166, 163),
                Parent       = LoginWindow,
                PressedIndex = 328
            };
            ChangePasswordButton.Click += ChangePasswordButton_Click;

            CloseButton = new MirButton
            {
                HoverIndex   = 330,
                Index        = 329,
                Library      = Libraries.Title,
                Location     = new Point(166, 189),
                Parent       = LoginWindow,
                PressedIndex = 331,
                Size         = new Size(100, 24)
            };
            CloseButton.Click += (o, e) => SceneFunctions.QuitGame();

            AccountIDTextBox = new MirTextBox
            {
                Location = new Point(85, 85),
                Parent   = LoginWindow,
                Size     = new Size(136, 15)
            };
            AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
            AccountIDTextBox.TextBox.KeyPress    += TextBox_KeyPress;
            AccountIDTextBox.SetFocus();

            PasswordTextBox = new MirTextBox
            {
                Location = new Point(85, 108),
                Parent   = LoginWindow,
                Password = true,
                Size     = new Size(136, 15)
            };
            PasswordTextBox.TextBox.TextChanged += PasswordTextBox_TextChanged;
            PasswordTextBox.TextBox.KeyPress    += TextBox_KeyPress;
        }
Esempio n. 8
0
 public static void Show()
 {
     LoginWindow.Visible = true;
     AccountIDTextBox.SetFocus();
 }
Esempio n. 9
0
        static NewCharacterDialog()
        {
            Reg = new Regex(@"^[A-Za-z0-9]{" + Globals.MinCharacterNameLength + "," + Globals.MaxCharacterNameLength + "}$");
            NewCharacterWindow = new MirImageControl
            {
                Index   = 73,
                Library = Libraries.Prguse,
                Parent  = SelectScene.Background,
                Visible = false,
            };
            NewCharacterWindow.Location = new Point((Settings.ScreenSize.Width - NewCharacterWindow.Size.Width) / 2,
                                                    (Settings.ScreenSize.Height - NewCharacterWindow.Size.Height) / 2);

            NewCharacterTitle = new MirImageControl
            {
                Index    = 20,
                Library  = Libraries.Title,
                Location = new Point(193, 7),
                Parent   = NewCharacterWindow,
            };

            CancelButton = new MirButton
            {
                HoverIndex   = 364,
                Index        = 363,
                Library      = Libraries.Title,
                Location     = new Point(425, 425),
                Parent       = NewCharacterWindow,
                PressedIndex = 365
            };
            CancelButton.Click += CancelButton_Click;

            ConfirmButton = new MirButton
            {
                Enabled      = false,
                HoverIndex   = 361,
                Index        = 360,
                Library      = Libraries.Title,
                Location     = new Point(160, 425),
                Parent       = NewCharacterWindow,
                PressedIndex = 362,
            };
            ConfirmButton.Click += new EventHandler(ConfirmButton_Click);

            CharacterNameTextBox = new MirTextBox
            {
                Location  = new Point(357, 269),
                Parent    = NewCharacterWindow,
                Size      = new Size(190, 15),
                MaxLength = Globals.MaxCharacterNameLength
            };
            CharacterNameTextBox.TextBox.KeyPress    += TextBox_KeyPress;
            CharacterNameTextBox.TextBox.TextChanged += CharacterNameTextBox_TextChanged;
            CharacterNameTextBox.SetFocus();

            CharacterDisplay = new MirAnimatedControl
            {
                Animated       = true,
                AnimationCount = 16,
                AnimationDelay = 250,
                Index          = 20,
                Library        = Libraries.ChrSel,
                Location       = new Point(120, 250),
                Parent         = NewCharacterWindow,
                UseOffSet      = true,
            };
            CharacterDisplay.AfterDraw += SelectScene.CharacterDisplay_GlowEffect;

            WarriorButton = new MirButton
            {
                HoverIndex   = 2427,
                Index        = 2427,
                Library      = Libraries.Prguse,
                Location     = new Point(355, 296),
                Parent       = NewCharacterWindow,
                PressedIndex = 2428,
                Sound        = SoundList.ClickA,
            };
            WarriorButton.Click += new EventHandler(WarriorButton_Click);
            WizardButton         = new MirButton
            {
                HoverIndex   = 2430,
                Index        = 2429,
                Library      = Libraries.Prguse,
                Location     = new Point(405, 296),
                Parent       = NewCharacterWindow,
                PressedIndex = 2431,
                Sound        = SoundList.ClickA,
            };
            WizardButton.Click += new EventHandler(WizardButton_Click);
            TaoistButton        = new MirButton
            {
                HoverIndex   = 2433,
                Index        = 2432,
                Library      = Libraries.Prguse,
                Location     = new Point(455, 296),
                Parent       = NewCharacterWindow,
                PressedIndex = 2434,
                Sound        = SoundList.ClickA,
            };
            TaoistButton.Click += new EventHandler(TaoistButton_Click);
            AssassinButton      = new MirButton
            {
                HoverIndex   = 2436,
                Index        = 2435,
                Library      = Libraries.Prguse,
                Location     = new Point(505, 296),
                Parent       = NewCharacterWindow,
                PressedIndex = 2437,
                Sound        = SoundList.ClickA,
            };
            AssassinButton.Click += new EventHandler(AssassinButton_Click);

            MaleButton = new MirButton
            {
                HoverIndex   = 2421,
                Index        = 2421,
                Library      = Libraries.Prguse,
                Location     = new Point(355, 343),
                Parent       = NewCharacterWindow,
                PressedIndex = 2422,
                Sound        = SoundList.ClickA,
            };
            MaleButton.Click += new EventHandler(MaleButton_Click);
            FemaleButton      = new MirButton
            {
                HoverIndex   = 2424,
                Index        = 2423,
                Library      = Libraries.Prguse,
                Location     = new Point(405, 343),
                Parent       = NewCharacterWindow,
                PressedIndex = 2425,
                Sound        = SoundList.ClickA,
            };
            FemaleButton.Click += new EventHandler(FemaleButton_Click);
            Description         = new MirLabel
            {
                Border      = true,
                BorderColor = Color.FromArgb(53, 49, 41),
                DrawFormat  = DrawTextFormat.WordBreak,
                Location    = new Point(279, 70),
                Parent      = NewCharacterWindow,
                Size        = new Size(278, 170),
                Text        = Settings.WarriorDescription,
            };
        }
Esempio n. 10
0
 public static void Show()
 {
     ChangePasswordWindow.Visible = true;
     AccountIDTextBox.SetFocus();
 }