示例#1
0
        public ReportDialog()
        {
            Index = 1633;
            Library = Libraries.Prguse;
            Movable = true;
            Sort = true;
            Location = Center;

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(336, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            ReportType = new MirDropDownBox()
            {
                Parent = this,
                Location = new Point(12, 35),
                Size = new Size(170, 14),
                ForeColour = Color.White,
                Visible = true,
                Enabled = true,
            };
            ReportType.Items.Add("Select Report Type.");
            ReportType.Items.Add("Submit Bug");
            ReportType.Items.Add("Report Player");

            MessageArea = new MirTextBox
            {
                Parent = this,
                Location = new Point(12, 57),
                Size = new Size(330, 150),
                Font = new Font(Settings.FontName, 8F),
            };

            MessageArea.MultiLine();

            SendButton = new MirButton
            {
                Parent = this,
                Library = Libraries.Title,
                Index = 607,
                HoverIndex = 608,
                PressedIndex = 609,
                Sound = SoundList.ButtonA,
                Location = new Point(260, 219)
            };
            SendButton.Click += SendButton_Click;

        }
示例#2
0
        public MirInputBox(string Message)
        {
            Modal   = true;
            Movable = false;
            Window  = new MirImageControl
            {
                Index   = 660,
                Library = Libraries.Prguse,
                Parent  = this
            };

            Location = new Point((Settings.ScreenSize.Width - Window.Size.Width) / 2,
                                 (Settings.ScreenSize.Height - Window.Size.Height) / 2);

            new MirLabel
            {
                DrawFormat = DrawTextFormat.WordBreak,
                Location   = new Point(25, 25),
                Size       = new Size(235, 40),
                Parent     = Window,
                Text       = Message,
            };

            InputTextBox = new MirTextBox
            {
                Parent      = Window,
                Border      = true,
                BorderColor = Color.Lime,
                Location    = new Point(23, 86),
                Size        = new Size(240, 19),
            };
            InputTextBox.SetFocus();
            InputTextBox.TextBox.KeyPress += new KeyPressEventHandler(MirInputBox_KeyPress);

            OKButton = new MirButton
            {
                HoverIndex   = 201,
                Index        = 200,
                Library      = Libraries.Title,
                Location     = new Point(60, 123),
                Parent       = Window,
                PressedIndex = 202,
            };

            CancelButton = new MirButton
            {
                HoverIndex   = 204,
                Index        = 203,
                Library      = Libraries.Title,
                Location     = new Point(160, 123),
                Parent       = Window,
                PressedIndex = 205,
            };
            CancelButton.Click += new EventHandler(DisposeDialog);
        }
示例#3
0
        public MirInputBox(string message)
        {
            Modal   = true;
            Movable = false;

            Index   = 660;
            Library = Libraries.CustomPrguse;

            Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

            CaptionLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.WordBreak,
                Location   = new Point(25, 25),
                Size       = new Size(235, 40),
                Parent     = this,
                Text       = message,
            };

            InputTextBox = new MirTextBox
            {
                Parent       = this,
                Border       = true,
                BorderColour = Color.Lime,
                Location     = new Point(23, 86),
                Size         = new Size(240, 19),
                MaxLength    = 50,
            };
            InputTextBox.SetFocus();
            InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress;

            OKButton = new MirButton
            {
                HoverIndex   = 201,
                Index        = 200,
                Library      = Libraries.CustomTitle,
                Location     = new Point(60, 123),
                Parent       = this,
                PressedIndex = 202,
            };

            CancelButton = new MirButton
            {
                HoverIndex   = 204,
                Index        = 203,
                Library      = Libraries.CustomTitle,
                Location     = new Point(160, 123),
                Parent       = this,
                PressedIndex = 205,
            };
            CancelButton.Click += DisposeDialog;
        }
示例#4
0
        public MirInputBox(string message)
        {
            Modal = true;
            Movable = false;

            Index = 660;
            Library = Libraries.Prguse;

            Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

            CaptionLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.WordBreak,
                Location = new Point(25, 25),
                Size = new Size(235, 40),
                Parent = this,
                Text = message,
            };

            InputTextBox = new MirTextBox
            {
                Parent = this,
                Border = true,
                BorderColour = Color.Lime,
                Location = new Point(23, 86),
                Size = new Size(240, 19),
                MaxLength = 50,
            };
            InputTextBox.SetFocus();
            InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress;

            OKButton = new MirButton
            {
                HoverIndex = 201,
                Index = 200,
                Library = Libraries.Title,
                Location = new Point(60, 123),
                Parent = this,
                PressedIndex = 202,
            };

            CancelButton = new MirButton
            {
                HoverIndex = 204,
                Index = 203,
                Library = Libraries.Title,
                Location = new Point(160, 123),
                Parent = this,
                PressedIndex = 205,
            };
            CancelButton.Click += DisposeDialog;
        }
示例#5
0
            protected override void Dispose(bool disposing)
            {
                if (disposing)
                {
                    TitleLabel = null;
                    AccountIDLabel = null;
                    PassLabel = null;
                    AccountButton = null;
                    CloseButton = null;
                    OKButton = null;
                    PassButton = null;
                    AccountIDTextBox = null;
                    PasswordTextBox = null;

                }

                base.Dispose(disposing);
            }
示例#6
0
            public LoginDialog()
            {
                Index = 1084;
                Library = Libraries.Prguse;
                Location = new Point((Settings.ScreenWidth - Size.Width)/2, (Settings.ScreenHeight - Size.Height)/2);

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

                AccountIDLabel = new MirImageControl
                    {
                        Index = 31,
                        Library = Libraries.Title,
                        Parent = this,
                        Location = new Point(51, 82),
                    };

                PassLabel = new MirImageControl
                    {
                        Index = 32,
                        Library = Libraries.Title,
                        Parent = this,
                        Location = new Point(46, 109)
                    };

                OKButton = new MirButton
                    {
                        Enabled = false,
                        HoverIndex = 321,
                        Index = 320,
                        Library = Libraries.Title,
                        Location = new Point(227, 83),
                        Parent = this,
                        PressedIndex = 322
                    };
                OKButton.Click += (o, e) => Login();

                AccountButton = new MirButton
                    {
                        HoverIndex = 324,
                        Index = 323,
                        Library = Libraries.Title,
                        Location = new Point(60, 163),
                        Parent = this,
                        PressedIndex = 325,
                    };

                PassButton = new MirButton
                    {
                        HoverIndex = 327,
                        Index = 326,
                        Library = Libraries.Title,
                        Location = new Point(166, 163),
                        Parent = this,
                        PressedIndex = 328,
                    };

                ViewKeyButton = new MirButton
                {
                    HoverIndex = 333,
                    Index = 332,
                    Library = Libraries.Title,
                    Location = new Point(60, 189),
                    Parent = this,
                    PressedIndex = 334,
                };

                CloseButton = new MirButton
                    {
                        HoverIndex = 330,
                        Index = 329,
                        Library = Libraries.Title,
                        Location = new Point(166, 189),
                        Parent = this,
                        PressedIndex = 331,
                    };
                CloseButton.Click += (o, e) => Program.Form.Close();

                AccountIDTextBox = new MirTextBox
                    {
                        Location = new Point(85, 85),
                        Parent = this,
                        Size = new Size(136, 15),
                        MaxLength = Globals.MaxAccountIDLength
                    };
                AccountIDTextBox.SetFocus();
                AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
                AccountIDTextBox.TextBox.KeyPress += TextBox_KeyPress;
                AccountIDTextBox.Text = Settings.AccountID;

                PasswordTextBox = new MirTextBox
                    {
                        Location = new Point(85, 108),
                        Parent = this,
                        Password = true,
                        Size = new Size(136, 15),
                        MaxLength = Globals.MaxPasswordLength
                    };

                PasswordTextBox.TextBox.TextChanged += PasswordTextBox_TextChanged;
                PasswordTextBox.TextBox.KeyPress += TextBox_KeyPress;
                PasswordTextBox.Text = Settings.Password;
            }
示例#7
0
            public ChangePasswordDialog()
            {
                Index = 50;
                Library = Libraries.Prguse;
                Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

                CancelButton = new MirButton
                {
                    HoverIndex = 111,
                    Index = 110,
                    Library = Libraries.Title,
                    Location = new Point(222, 236),
                    Parent = this,
                    PressedIndex = 112
                };
                CancelButton.Click += (o, e) => Dispose();

                OKButton = new MirButton
                {
                    Enabled = false,
                    HoverIndex = 108,
                    Index = 107,
                    Library = Libraries.Title,
                    Location = new Point(80, 236),
                    Parent = this,
                    PressedIndex = 109,
                };
                OKButton.Click += (o, e) => ChangePassword();

                AccountIDTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(178, 76),
                    MaxLength = Globals.MaxAccountIDLength,
                    Parent = this,
                    Size = new Size(136, 18),
                };
                AccountIDTextBox.SetFocus();
                AccountIDTextBox.TextBox.MaxLength = Globals.MaxAccountIDLength;
                AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;

                CurrentPasswordTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(178, 114),
                    MaxLength = Globals.MaxPasswordLength,
                    Parent = this,
                    Password = true,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = Globals.MaxPasswordLength },
                };
                CurrentPasswordTextBox.TextBox.TextChanged += CurrentPasswordTextBox_TextChanged;

                NewPassword1TextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(178, 152),
                    MaxLength = Globals.MaxPasswordLength,
                    Parent = this,
                    Password = true,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = Globals.MaxPasswordLength },
                };
                NewPassword1TextBox.TextBox.TextChanged += NewPassword1TextBox_TextChanged;

                NewPassword2TextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(178, 189),
                    MaxLength = Globals.MaxPasswordLength,
                    Parent = this,
                    Password = true,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = Globals.MaxPasswordLength },
                };
                NewPassword2TextBox.TextBox.TextChanged += NewPassword2TextBox_TextChanged;
            }
示例#8
0
        public ChatDialog()
        {
            Index = Settings.HighResolution ? 2221 : 2201;
            Library = Libraries.Prguse;
            Location = new Point(230, Settings.ScreenHeight - 97);
            PixelDetect = true;

            KeyPress += ChatPanel_KeyPress;
            KeyDown += ChatPanel_KeyDown;
            MouseWheel += ChatPanel_MouseWheel;

            ChatTextBox = new MirTextBox
                {
                    BackColour = Color.DarkGray,
                    ForeColour = Color.Black,
                    Parent = this,
                    Size = new Size(Settings.HighResolution ? 627 : 403, 13),
                    Location = new Point(1, 54),
                    MaxLength = Globals.MaxChatLength,
                    Visible = false,
                    Font = ChatFont,
                };
            ChatTextBox.TextBox.KeyPress += ChatTextBox_KeyPress;
            ChatTextBox.TextBox.KeyDown += ChatTextBox_KeyDown;
            ChatTextBox.TextBox.KeyUp += ChatTextBox_KeyUp;
            var source = new AutoCompleteStringCollection();
            source.AddRange(new string[]
            {
                      "#Gamemaster",
                "#Observer",
                "#GMRevive",
                "#GmMove",
                "#Superman ",
                "#GMKill",
                "#GMRestore",
                "#GMChangeGender",
                "#GMLevel",
                "#GMRecall",
                "#GMGo",
                "#GMMob",
                "#GMRecallMob",
                "#GMReloadDrops",
                "#GMGiveGold",
                "#GMClearBag",
                "#GMKick",
                "#GMTing",
                "#GMHair",
                "#GMChangeGender",
                "@Date",
                "@Move",
            });

            //            @GAMEMASTER OR @GM = GM MODE.
            //@SUPERMAN OR @GMSUPERMAN
            //@OBSERVER OR @OBS = GM OBSERVER MODE
            //@GMREVIVE= Revives character if supplied with name else revives wots infront of you.
            //@GMMove=Move
            //@GMKILL= Kill player if supplied with name else kills wots infront of you
            //@GMRESTORE = Restore Deleted Characters
            //@GMCHANGEGENDER = Change character gender
            //@GMLEVEL OR @GMLVL = Change characters level
            //@GMRECALL = Recall character
            //@GMGO = Teleport to character destination
            //@GMMOB = Summon monster
            //@GMRECALLMOB= Summon Pet
            //@GMRELOADDROPS= Reload drop files
            //@GMGIVEGOLD = Give Gold
            //@GMMAKE = Make items
            //@GMCLEARBAG = Clear bag
            //@GMMOVE = GM Map teleports.
            //@GMADDSKILL = Addskill ( [Player] [ Skill ] [ Skill Lvl] )
            //@GMCLASS = ChangeJob
            //@GMKICK = Kicks player out
            //@GMTING = Random Teleports player on the current map.
            //@GMHAIR = Changes player hair
            //@GMCHANGEGENDER = Changes player gender

            ChatTextBox.autoCompleteCustomSource = source;
            ChatTextBox.autoCompleteMode =
            AutoCompleteMode.Append;
            ChatTextBox.autoCompleteSource =
            AutoCompleteSource.CustomSource;
            HomeButton = new MirButton
                {
                    Index = 2018,
                    HoverIndex = 2019,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 618 : 394, 1),
                    Parent = this,
                    PressedIndex = 2020,
                    Sound = SoundList.ButtonA
                };
            HomeButton.Click += (o, e) =>
            {
                if (StartIndex == 0) return;
                StartIndex = 0;
                Update();
            };

            UpButton = new MirButton
                {
                    Index = 2021,
                    HoverIndex = 2022,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 618 : 394, 9),
                    Parent = this,
                    PressedIndex = 2023,
                    Sound = SoundList.ButtonA
                };
            UpButton.Click += (o, e) =>
            {
                if (StartIndex == 0) return;
                StartIndex--;
                Update();
            };

            EndButton = new MirButton
                {
                    Index = 2027,
                    HoverIndex = 2028,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 618 : 394, 45),
                    Parent = this,
                    PressedIndex = 2029,
                    Sound = SoundList.ButtonA
                };
            EndButton.Click += (o, e) =>
            {
                if (StartIndex == History.Count - 1) return;
                StartIndex = History.Count - 1;
                Update();
            };

            DownButton = new MirButton
                {
                    Index = 2024,
                    HoverIndex = 2025,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 618 : 394, 39),
                    Parent = this,
                    PressedIndex = 2026,
                    Sound = SoundList.ButtonA
                };
            DownButton.Click += (o, e) =>
            {
                if (StartIndex == History.Count - 1) return;
                StartIndex++;
                Update();
            };

            CountBar = new MirImageControl
                {
                    Index = 2012,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 622 : 398, 16),
                    Parent = this,
                };

            PositionBar = new MirButton
                {
                    Index = 2015,
                    HoverIndex = 2016,
                    Library = Libraries.Prguse,
                    Location = new Point(Settings.HighResolution ? 619 : 395, 16),
                    Parent = this,
                    PressedIndex = 2017,
                    Movable = true,
                    Sound = SoundList.None,
                };
            PositionBar.OnMoving += PositionBar_OnMoving;
        }
示例#9
0
        public ChatDialog()
        {
            Index = Settings.Resolution != 800 ? 2221 : 2201;
            Library = Libraries.Prguse;
            Location = new Point(GameScene.Scene.MainDialog.Location.X + 230, Settings.ScreenHeight - 97);
            PixelDetect = true;

            KeyPress += ChatPanel_KeyPress;
            KeyDown += ChatPanel_KeyDown;
            MouseWheel += ChatPanel_MouseWheel;

            ChatTextBox = new MirTextBox
            {
                BackColour = Color.DarkGray,
                ForeColour = Color.Black,
                Parent = this,
                Size = new Size(Settings.Resolution != 800 ? 627 : 403, 13),
                Location = new Point(1, 54),
                MaxLength = Globals.MaxChatLength,
                Visible = false,
                Font = ChatFont,             
            };
            ChatTextBox.TextBox.KeyPress += ChatTextBox_KeyPress;
            ChatTextBox.TextBox.KeyDown += ChatTextBox_KeyDown;
            ChatTextBox.TextBox.KeyUp += ChatTextBox_KeyUp;

            HomeButton = new MirButton
            {
                Index = 2018,
                HoverIndex = 2019,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 618 : 394, 1),
                Parent = this,
                PressedIndex = 2020,
                Sound = SoundList.ButtonA,
            };
            HomeButton.Click += (o, e) =>
            {
                if (StartIndex == 0) return;
                StartIndex = 0;
                Update();
            };


            UpButton = new MirButton
            {
                Index = 2021,
                HoverIndex = 2022,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 618 : 394, 9),
                Parent = this,
                PressedIndex = 2023,
                Sound = SoundList.ButtonA,
            };
            UpButton.Click += (o, e) =>
            {
                if (StartIndex == 0) return;
                StartIndex--;
                Update();
            };


            EndButton = new MirButton
            {
                Index = 2027,
                HoverIndex = 2028,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 618 : 394, 45),
                Parent = this,
                PressedIndex = 2029,
                Sound = SoundList.ButtonA,
            };
            EndButton.Click += (o, e) =>
            {
                if (StartIndex == History.Count - 1) return;
                StartIndex = History.Count - 1;
                Update();
            };

            DownButton = new MirButton
            {
                Index = 2024,
                HoverIndex = 2025,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 618 : 394, 39),
                Parent = this,
                PressedIndex = 2026,
                Sound = SoundList.ButtonA,
            };
            DownButton.Click += (o, e) =>
            {
                if (StartIndex == History.Count - 1) return;
                StartIndex++;
                Update();
            };



            CountBar = new MirImageControl
            {
                Index = 2012,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 622 : 398, 16),
                Parent = this,
            };

            PositionBar = new MirButton
            {
                Index = 2015,
                HoverIndex = 2016,
                Library = Libraries.Prguse,
                Location = new Point(Settings.Resolution != 800 ? 619 : 395, 16),
                Parent = this,
                PressedIndex = 2017,
                Movable = true,
                Sound = SoundList.None,
            };
            PositionBar.OnMoving += PositionBar_OnMoving;
        }
示例#10
0
        public GameShopDialog()
        {
            GameScene.GameShopInfoList.Clear();
            Index = 749;
            Library = Libraries.Title;
            Movable = true;
            Location = Center;
            Sort = true;

            Grid = new GameShopCell[4 * 2];
            for (int x = 0; x < 4; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    int idx = 4 * y + x;
                    Grid[idx] = new GameShopCell
                    {
                        Size = new Size(125, 146),
                        Visible = true,
                        Parent = this,
                    };
                }
            }

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(671, 4),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            totalGold = new MirLabel
            {
                Size = new Size(100, 20),
                DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right,
                
                Location = new Point(123, 449),
                Parent = this,
                NotControl = true,
                Font = new Font(Settings.FontName, 8F),
            };
            totalCredits = new MirLabel
            {
                Size = new Size(100, 20),
                DrawFormat = TextFormatFlags.RightToLeft | TextFormatFlags.Right,
                Location = new Point(5, 449),
                Parent = this,
                NotControl = true,
                Font = new Font(Settings.FontName, 8F)
            };

            UpButton = new MirButton
            {
                Index = 197,
                HoverIndex = 198,
                PressedIndex = 199,
                Library = Libraries.Prguse2,
                Parent = this,
                Size = new Size(16, 14),
                Location = new Point(120, 103),
                Sound = SoundList.ButtonA,
                Visible = true
            };
            UpButton.Click += (o, e) =>
            {
                if (CStartIndex <= 0) return;

                CStartIndex--;

                SetCategories();
                UpdatePositionBar();
            };

            DownButton = new MirButton
            {
                Index = 207,
                HoverIndex = 208,
                Library = Libraries.Prguse2,
                PressedIndex = 209,
                Parent = this,
                Size = new Size(16, 14),
                Location = new Point(120, 421),
                Sound = SoundList.ButtonA,
                Visible = true
            };
            DownButton.Click += (o, e) =>
            {
                if (CStartIndex + 22 >= CategoryList.Count) return;

                CStartIndex++;

                SetCategories();
                UpdatePositionBar();
            };

            PositionBar = new MirButton
            {
                Index = 205,
                HoverIndex = 206,
                PressedIndex = 206,
                Library = Libraries.Prguse2,
                Location = new Point(120, 117),
                Parent = this,
                Movable = true,
                Sound = SoundList.None,
                Visible = true
            };
            PositionBar.OnMoving += PositionBar_OnMoving;




            FilterBackground = new MirImageControl
            {
                Index = 769,
                Library = Libraries.Title,
                Location = new Point(11, 102),
                Parent = this,
            };
            FilterBackground.MouseWheel += FilterScrolling;

            Search = new MirTextBox
            {
                BackColour = Color.FromArgb(4, 4, 4),
                ForeColour = Color.White,
                Parent = this,
                Size = new Size(140, 16),
                Location = new Point(540, 69),
                Font = new Font(Settings.FontName, 9F),
                MaxLength = 23,
                CanLoseFocus = true,
            };
            Search.TextBox.KeyUp += (o, e) =>
            {
                GetCategories();
            };

            allItems = new MirButton
            {
                Index = 770,
                Library = Libraries.Title,
                Location = new Point(138, 68),
                Visible = true,
                Parent = this,
                Sound = SoundList.ButtonA,

            };
            allItems.Click += (o, e) =>
            {
                SectionFilter = "Show All";
                ResetTabs();
                GetCategories();
            };
            topItems = new MirButton
            {
                Index = 776,
                Library = Libraries.Title,
                Location = new Point(209, 68),
                Visible = true,
                Parent = this,
                Sound = SoundList.ButtonA,
            };
            topItems.Click += (o, e) =>
            {
                SectionFilter = "TopItems";
                ResetTabs();
                GetCategories();
            };
            Deals = new MirButton
            {
                Index = 772,
                Library = Libraries.Title,
                Location = new Point(280, 68),
                Visible = true,
                Parent = this,
                Sound = SoundList.ButtonA,
            };
            Deals.Click += (o, e) =>
            {
                SectionFilter = "DealItems";
                ResetTabs();
                GetCategories();
            };
            New = new MirButton
            {
                Index = 774,
                Library = Libraries.Title,
                Location = new Point(351, 68),
                Visible = false,
                Parent = this,
                Sound = SoundList.ButtonA,
            };
            New.Click += (o, e) =>
            {
                SectionFilter = "NewItems";
                ResetTabs();
                New.Index = 775;
                GetCategories();
            };


            ALL = new MirButton
            {
                Index = 751,
                HoverIndex = 752,
                PressedIndex = 753,
                Library = Libraries.Title,
                Location = new Point(539, 37),
                Visible = true,
                Parent = this,
            };
            ALL.Click += (o, e) =>
            {
                ClassFilter = "Show All";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };
            War = new MirButton
            {
                Index = 754,
                HoverIndex = 755,
                PressedIndex = 756,
                Library = Libraries.Title,
                Location = new Point(568, 38),
                Visible = true,
                Parent = this,
            };
            War.Click += (o, e) =>
            {
                ClassFilter = "Warrior";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };
            Sin = new MirButton
            {
                Index = 757,
                HoverIndex = 758,
                PressedIndex = 759,
                Library = Libraries.Title,
                Location = new Point(591, 38),
                Visible = true,
                Parent = this,
            };
            Sin.Click += (o, e) =>
            {
                ClassFilter = "Assassin";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };
            Tao = new MirButton
            {
                Index = 760,
                HoverIndex = 761,
                PressedIndex = 762,
                Library = Libraries.Title,
                Location = new Point(614, 38),
                Visible = true,
                Parent = this,
            };
            Tao.Click += (o, e) =>
            {
                ClassFilter = "Taoist";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };
            Wiz = new MirButton
            {
                Index = 763,
                HoverIndex = 764,
                PressedIndex = 765,
                Library = Libraries.Title,
                Location = new Point(637, 38),
                Visible = true,
                Parent = this,
            };
            Wiz.Click += (o, e) =>
            {
                ClassFilter = "Wizard";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };
            Arch = new MirButton
            {
                Index = 766,
                HoverIndex = 767,
                PressedIndex = 768,
                Library = Libraries.Title,
                Location = new Point(660, 38),
                Visible = true,
                Parent = this,
            };
            Arch.Click += (o, e) =>
            {
                ClassFilter = "Archer";
                TypeFilter = "Show All";
                GetCategories();
                ResetClass();
            };

            PageNumberLabel = new MirLabel
            {
                Text = "",
                Parent = this,
                Size = new Size(83, 17),
                Location = new Point(597, 446),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                Font = new Font(Settings.FontName, 7F),
            };

            PreviousButton = new MirButton
            {
                Index = 240,
                HoverIndex = 241,
                PressedIndex = 242,
                Library = Libraries.Prguse2,
                Parent = this,
                Location = new Point(600, 448),
                Sound = SoundList.ButtonA,
            };
            PreviousButton.Click += (o, e) =>
            {
                Page--;
                if (Page < 0) Page = 0;
                StartIndex = Grid.Length * Page;

                UpdateShop();
            };

            NextButton = new MirButton
            {
                Index = 243,
                HoverIndex = 244,
                PressedIndex = 245,
                Library = Libraries.Prguse2,
                Parent = this,
                Location = new Point(660, 448),
                Sound = SoundList.ButtonA,
            };
            NextButton.Click += (o, e) =>
            {
                Page++;
                if ((Page + 1) > maxPage) Page --;
                StartIndex = Grid.Length * Page;
                UpdateShop();
            };

            for (int i = 0; i < Filters.Length; i++)
            {
                Filters[i] = new MirLabel
                {
                    Parent = this,
                    Size = new Size(90, 20),
                    Location = new Point(15, 103 + (15 * i)),
                    Text = "Testing - " + i.ToString(),
                    ForeColour = Color.Gray,
                    Font = new Font(Settings.FontName, 7F),
                };
                Filters[i].Click += (o, e) =>
                {
                    MirLabel lab = (MirLabel)o;
                    TypeFilter = lab.Text;
                    Page = 0;
                    StartIndex = 0;
                    UpdateShop();
                    for (int p = 0; p < Filters.Length; p++)
                    {
                        if (Filters[p].Text == lab.Text) Filters[p].ForeColour = Color.FromArgb(230, 200, 160);
                        else Filters[p].ForeColour = Color.Gray;
                    }

                };
                Filters[i].MouseEnter += (o, e) =>
                {
                    MirLabel lab = (MirLabel)o;
                    for (int p = 0; p < Filters.Length; p++)
                    {
                        if (Filters[p].Text == lab.Text && Filters[p].ForeColour != Color.FromArgb(230, 200, 160)) Filters[p].ForeColour = Color.FromArgb(160, 140, 110);
                    }
                };
                Filters[i].MouseLeave += (o, e) =>
                {
                    MirLabel lab = (MirLabel)o;
                    for (int p = 0; p < Filters.Length; p++)
                    {
                        if (Filters[p].Text == lab.Text && Filters[p].ForeColour != Color.FromArgb(230, 200, 160)) Filters[p].ForeColour = Color.Gray;
                    }
                };
                Filters[i].MouseWheel += FilterScrolling;
            }

            Viewer = new GameShopViewer();

        }
示例#11
0
        public TrustMerchantDialog()
        {
            Index = 670;
            Library = Libraries.Prguse;
            Sort = true;

            SearchTextBox = new MirTextBox
            {
                Location = new Point(19, 329),
                Parent = this,
                Size = new Size(104, 15),
                MaxLength = 20,
                CanLoseFocus = true
            };
            SearchTextBox.TextBox.KeyPress += SearchTextBox_KeyPress;
            SearchTextBox.TextBox.KeyUp += SearchTextBox_KeyUp;
            SearchTextBox.TextBox.KeyDown += SearchTextBox_KeyDown;

            FindButton = new MirButton
            {
                HoverIndex = 481,
                Index = 480,
                Location = new Point(130, 325),
                Library = Libraries.Title,
                Parent = this,
                PressedIndex = 482,
                Sound = SoundList.ButtonA,
            };
            FindButton.Click += (o, e) =>
            {
                if (string.IsNullOrEmpty(SearchTextBox.Text)) return;
                if (CMain.Time < SearchTime)
                {
                    GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System);
                    return;
                }

                SearchTime = CMain.Time + Globals.SearchDelay;
                Network.Enqueue(new C.MarketSearch
                {
                    Match = SearchTextBox.Text,
                });
            };

            RefreshButton = new MirButton
            {
                HoverIndex = 664,
                Index = 663,
                Location = new Point(190, 325),
                Library = Libraries.Prguse,
                Parent = this,
                PressedIndex = 665,
                Sound = SoundList.ButtonA,
            };
            RefreshButton.Click += (o, e) =>
            {
                if (CMain.Time < SearchTime)
                {
                    GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System);
                    return;
                }
                SearchTime = CMain.Time + Globals.SearchDelay;
                SearchTextBox.Text = string.Empty;
                Network.Enqueue(new C.MarketRefresh());
            };


            MailButton = new MirButton
            {
                HoverIndex = 667,
                Index = 666,
                Location = new Point(225, 325),
                Library = Libraries.Prguse,
                Parent = this,
                PressedIndex = 668,
                Sound = SoundList.ButtonA,
                Visible = false
            };

            BuyButton = new MirButton
            {
                HoverIndex = 484,
                Index = 483,
                Location = new Point(400, 325),
                Library = Libraries.Title,
                Parent = this,
                PressedIndex = 485,
                Sound = SoundList.ButtonA,
            };
            BuyButton.Click += (o, e) =>
            {
                if (Selected == null || CMain.Time < MarketTime) return;

                if (UserMode)
                {
                    if (Selected.Listing.Seller == "For Sale")
                    {
                        MirMessageBox box = new MirMessageBox(string.Format("{0} has not sold, Are you sure you want to get it back?", Selected.Listing.Item.Name), MirMessageBoxButtons.YesNo);
                        box.YesButton.Click += (o1, e2) =>
                        {
                            MarketTime = CMain.Time + 3000;
                            Network.Enqueue(new C.MarketGetBack { AuctionID = Selected.Listing.AuctionID });
                        };
                        box.Show();
                    }
                    else
                    {
                        MarketTime = CMain.Time + 3000;
                        Network.Enqueue(new C.MarketGetBack { AuctionID = Selected.Listing.AuctionID });
                    }

                }
                else
                {
                    MirMessageBox box = new MirMessageBox(string.Format("Are you sure you want to buy {0} for {1}?", Selected.Listing.Item.Name, Selected.Listing.Price), MirMessageBoxButtons.YesNo);
                    box.YesButton.Click += (o1, e2) =>
                    {
                        MarketTime = CMain.Time + 3000;
                        Network.Enqueue(new C.MarketBuy { AuctionID = Selected.Listing.AuctionID });
                    };
                    box.Show();
                }
            };


            BackButton = new MirButton
            {
                Index = 398,
                Location = new Point(189, 298),
                Library = Libraries.Prguse,
                Parent = this,
                PressedIndex = 399,
                Sound = SoundList.ButtonA,
            };
            BackButton.Click += (o, e) =>
            {
                if (Page <= 0) return;

                Page--;
                UpdateInterface();
            };

            NextButton = new MirButton
            {
                Index = 396,
                Location = new Point(283, 298),
                Library = Libraries.Prguse,
                Parent = this,
                PressedIndex = 397,
                Sound = SoundList.ButtonA,
            };
            NextButton.Click += (o, e) =>
            {
                if (Page >= PageCount - 1) return;
                if (Page < (Listings.Count - 1) / 10)
                {
                    Page++;
                    UpdateInterface();
                    return;
                }

                Network.Enqueue(new C.MarketPage { Page = Page + 1 });

            };

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(462, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            PageLabel = new MirLabel
            {
                Location = new Point(207, 298),
                Size = new Size(70, 18),
                DrawFormat = TextFormatFlags.HorizontalCenter,
                Parent = this,
                NotControl = true,
                Text = "0/0",
            };


            NameLabel = new MirLabel
            {
                AutoSize = true,
                ForeColour = Color.Yellow,
                Location = new Point(20, 240),
                Parent = this,
                NotControl = true,
            };
            TotalPriceLabel = new MirLabel
            {
                AutoSize = true,
                Location = new Point(20, 256),
                Parent = this,
                NotControl = true,
            };
            SplitPriceLabel = new MirLabel
            {
                AutoSize = true,
                Location = new Point(20, 272),
                Parent = this,
                NotControl = true,
            };

            DateLabel = new MirLabel
            {
                AutoSize = true,
                Location = new Point(250, 245),
                Parent = this,
                NotControl = true,
                Text = "Start Date:"
            };

            ExpireLabel = new MirLabel
            {
                AutoSize = true,
                Location = new Point(250, 265),
                Parent = this,
                NotControl = true,
                Text = "Expire Date:"
            };

            ItemLabel = new MirLabel
            {
                Location = new Point(7, 32),
                Size = new Size(142, 22),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                Parent = this,
                NotControl = true,
                Text = "Item",
            };

            PriceLabel = new MirLabel
            {
                Location = new Point(148, 32),
                Size = new Size(180, 22),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                Parent = this,
                NotControl = true,
                Text = "Price",
            };

            SellerLabel = new MirLabel
            {
                Location = new Point(327, 32),
                Size = new Size(150, 22),
                DrawFormat = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter,
                Parent = this,
                NotControl = true,
                Text = "Seller",
            };

            for (int i = 0; i < Rows.Length; i++)
            {
                Rows[i] = new AuctionRow
                {
                    Location = new Point(8, 54 + i * 18),
                    Parent = this
                };
                Rows[i].Click += (o, e) =>
                {
                    Selected = (AuctionRow)o;
                    UpdateInterface();
                };
            }


            ItemCell = new MirItemCell
            {
                ItemSlot = 0,
                GridType = MirGridType.TrustMerchant,
                Library = Libraries.Items,
                Parent = this,
                Location = new Point(195, 248),
            };
        }
示例#12
0
        public MailComposeLetterDialog()
        {
            Index = 671;
            Library = Libraries.Title;
            Size = new Size(236, 300);
            Movable = true;
            Sort = true;
            Location = new Point(100, 100);

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(Size.Width - 27, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            RecipientNameLabel = new MirLabel
            {
                Text = "",
                Parent = this,
                Font = new Font(Settings.FontName, 8F),
                ForeColour = Color.White,
                Location = new Point(70, 35),
                Size = new Size(150, 15),
                NotControl = true,
            };

            MessageTextBox = new MirTextBox
            {
                ForeColour = Color.White,
                Parent = this,
                Font = new Font(Settings.FontName, 8F),
                Location = new Point(15, 92),
                Size = new Size(202, 165),
            };

            MessageTextBox.MultiLine();

            SendButton = new MirButton
            {
                Index = 607,
                HoverIndex = 608,
                PressedIndex = 609,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(30, 265)
            };
            SendButton.Click += (o, e) =>
            {
                Network.Enqueue(new C.SendMail { Name = RecipientNameLabel.Text, Message = MessageTextBox.Text });
                Hide();
            };

            CancelButton = new MirButton
            {
                Index = 193,
                HoverIndex = 194,
                PressedIndex = 195,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(135, 265)
            };
            CancelButton.Click += (o, e) => Hide();
        }
示例#13
0
        public MailComposeParcelDialog()
        {
            Index = 674;
            Library = Libraries.Title;
            Size = new Size(236, 384);
            Movable = true;
            Sort = true;
            Location = new Point(GameScene.Scene.InventoryDialog.Size.Width + 10, 0);

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(Size.Width - 27, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) =>
            {
                ResetLockedCells();
                Hide();
            };

            RecipientNameLabel = new MirLabel
            {
                Text = "",
                Parent = this,
                Font = new Font(Settings.FontName, 8F),
                ForeColour = Color.White,
                Location = new Point(70, 35),
                Size = new Size(150, 15),
                NotControl = true,
            };

            MessageTextBox = new MirTextBox
            {
                ForeColour = Color.White,
                Parent = this,
                Font = new Font(Settings.FontName, 8F),
                Location = new Point(15, 98),
                Size = new Size(202, 165),
            };

            MessageTextBox.MultiLine();

            StampButton = new MirButton
            {
                Index = 203,
                HoverIndex = 203,
                PressedIndex = 203,
                Location = new Point(73, 56),
                Size = new Size(20,20),
                Library = Libraries.Prguse2,
                Parent = this,
                Sound = SoundList.ButtonA,
            };
            StampButton.Click += (o, e) =>
            {
                StampParcel();
            };

            ItemCover = new MirImageControl
            {
                Index = 676,
                Location = new Point(63, 310),
                Size = new Size(144, 33),
                Library = Libraries.Title,
                Parent = this
            };

            for (int i = 0; i < Cells.Length; i++)
            {
                Cells[i] = new MirItemCell
                {
                    BorderColour = Color.Lime,
                    Size = new Size(35, 31),
                    GridType = MirGridType.Mail,
                    Library = Libraries.Items,
                    Parent = this,
                    Location = new Point(27 + (i * 36), 311),
                    ItemSlot = i
                };
            }

            ParcelCostLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.VerticalCenter,
                Font = new Font(Settings.FontName, 8F),
                Location = new Point(63, 269),
                Parent = this,
                Size = new Size(143, 15),
            };

            GoldSendLabel = new MirLabel
            {
                DrawFormat = TextFormatFlags.VerticalCenter,
                Font = new Font(Settings.FontName, 8F),
                Location = new Point(63, 290),
                Parent = this,
                Size = new Size(143, 15),
                Sound = SoundList.Gold,
            };
            GoldSendLabel.Click += (o, e) =>
            {
                if (GameScene.SelectedCell == null && GameScene.Gold > 0)
                {
                    MirAmountBox amountBox = new MirAmountBox("Send Amount:", 116, GameScene.Gold);

                    amountBox.OKButton.Click += (c, a) =>
                    {
                        if (amountBox.Amount > 0)
                        {
                            GiftGoldAmount += amountBox.Amount;
                            GameScene.Gold -= amountBox.Amount;
                        }

                        GoldSendLabel.Text = GiftGoldAmount.ToString("###,###,##0");

                        CalculatePostage();
                    };

                    amountBox.Show();
                    GameScene.PickedUpGold = false;
                }
            };

            SendButton = new MirButton
            {
                Index = 607,
                HoverIndex = 608,
                PressedIndex = 609,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(30, 350)
            };
            SendButton.Click += (o, e) =>
            {
                Network.Enqueue(new C.SendMail { Name = RecipientNameLabel.Text, Message = MessageTextBox.Text, Gold = GiftGoldAmount, ItemsIdx = ItemsIdx, Stamped = Stamped });
            };

            CancelButton = new MirButton
            {
                Index = 193,
                HoverIndex = 194,
                PressedIndex = 195,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(135, 350)
            };
            CancelButton.Click += (o, e) =>
            {
                ResetLockedCells();
                Hide();
            };
        }
示例#14
0
文件: GameScene.cs 项目: ufaith/cmir2
        public GuildDialog()
        {
            Index = 180;
            Library = Libraries.Prguse;
            Movable = true;
            Sort = true;
            Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2);

            #region tab buttons
            NoticeButton = new MirButton // Notice
            {
                Library = Libraries.Title,
                Index = 88,
                HoverIndex = 87,
                PressedIndex = 89,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(210, 400)
            };
            NoticeButton.Click += (o, e) => ChangePage(0);
            MembersButton = new MirButton // Members
            {
                Library = Libraries.Title,
                Index = 76,
                HoverIndex = 77,
                PressedIndex = 75,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(125, 400),
            };
            MembersButton.Click += (o, e) => ChangePage(1);
            StatusButton = new MirButton // Guild Stats
            {
                Library = Libraries.Title,
                Index = 67,
                HoverIndex = 68,
                PressedIndex = 66,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(40, 400)
            };
            StatusButton.Click += (o, e) => ChangePage(2);
            StorageButton = new MirButton // Storage
            {
                Library = Libraries.Title,
                Index = 79,
                HoverIndex = 80,
                PressedIndex = 78,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(295, 400),
                Visible = false
            };
            StorageButton.Click += (o, e) => ChangePage(3);
            BuffsButton = new MirButton // Buffs
            {
                Library = Libraries.Title,
                Index = 70,
                HoverIndex = 71,
                PressedIndex = 69,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(465, 400),
                Visible = false,
            };
            BuffsButton.Click += (o, e) => ChangePage(4);
            RankButton = new MirButton // Ranks
            {
                Library = Libraries.Title,
                Index = 73,
                HoverIndex = 74,
                PressedIndex = 72,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(380, 400),
                Visible = false,
            };
            RankButton.Click += (o, e) => ChangePage(5);
            GuildName = new MirLabel
            {
                Location = new Point(302, 9),
                Parent = this,
                Size = new Size(144, 16),
                Font = new Font(Settings.FontName, 8F),
                Text = "",
                Visible = true,
            };
            GuildName.BeforeDraw += (o, e) =>
            {
                if (MapControl.User.GuildName != "")
                    GuildName.Text = MapControl.User.GuildName;
                else
                    GuildName.Text = "None";
            };
            #endregion

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(563, 6),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA
            };
            CloseButton.Click += (o, e) => Hide();

            #region "notice tab"
            NoticePage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = true
            };
            Notice = new MirTextBox()
            {
                ForeColour = Color.White,
                Font = new Font(Settings.FontName, 8F),
                Enabled = false,
                Visible = true,
                Parent = NoticePage,
                Size = new Size(550, 325),
                Location = new Point(0, 0)
            };
            Notice.MultiLine();

            NoticeEditButton = new MirButton
            {
                Visible = false,
                Index = 85,
                HoverIndex = 86,
                PressedIndex = 84,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Parent = NoticePage,
                Location = new Point(27, 337)
            };
            NoticeEditButton.Click += (o, e) => EditNotice();

            NoticeSaveButton = new MirButton
            {
                Visible = false,
                Index = 82,
                HoverIndex = 83,
                PressedIndex = 84,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Parent = NoticePage,
                Location = new Point(27, 337)
            };
            NoticeSaveButton.Click += (o, e) => EditNotice();

            NoticeUpButton = new MirButton
            {
                HoverIndex = 312,
                Library = Libraries.Prguse,
                Location = new Point(551, 0),
                Size = new Size(16, 14),
                Parent = NoticePage,
                PressedIndex = 313,
                Sound = SoundList.ButtonA
            };
            NoticeUpButton.Click += (o, e) =>
            {
                if (NoticeScrollIndex == 0) return;
                if (NoticeScrollIndex >= 25) NoticeScrollIndex -= 24;
                NoticeScrollIndex--;
                UpdateNotice();
            };

            NoticeDownButton = new MirButton
            {
                HoverIndex = 314,
                Library = Libraries.Prguse,
                Location = new Point(551, 316),
                Size = new Size(16, 14),
                Parent = NoticePage,
                PressedIndex = 315,
                Sound = SoundList.ButtonA
            };
            NoticeDownButton.Click += (o, e) =>
            {
                if (NoticeScrollIndex == Notice.MultiText.Length - 1) return;
                if (NoticeScrollIndex < 25) NoticeScrollIndex = 24;
                NoticeScrollIndex++;
                UpdateNotice();
            };

            NoticePositionBar = new MirButton
            {
                Index = 955,
                Library = Libraries.Prguse,
                Location = new Point(551, 15),
                Parent = NoticePage,
                Movable = true,
                Sound = SoundList.None
            };
            NoticePositionBar.OnMoving += NoticePositionBar_OnMoving;

            NoticePage.KeyDown += NoticePanel_KeyDown;
            NoticePage.MouseWheel += NoticePanel_MouseWheel;
            #endregion

            #region "members tab"
            MembersPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = false
            };
            MembersPage.BeforeDraw += (o, e) => RequestUpdateMembers();

            MembersHeaderRank = new MirLabel
            {
                Parent = MembersPage,
                BackColour = Color.FromArgb(0x00, 0x00, 0x33),
                ForeColour = Color.White,
                Text = "Rank:",
                Location = new Point(10, 10),
                Size = new Size(180, 14),
                Font = new Font(Settings.FontName, 7F),
                Visible = true
            };
            MembersHeaderName = new MirLabel
            {
                Parent = MembersPage,
                BackColour = Color.FromArgb(0x00, 0x00, 0x33),
                ForeColour = Color.White,
                Text = "Name:",
                Location = new Point(190, 10),
                Size = new Size(180, 14),
                Font = new Font(Settings.FontName, 7F),
                Visible = true
            };
            MembersHeaderStatus = new MirLabel
            {
                Parent = MembersPage,
                BackColour = Color.FromArgb(0x00, 0x00, 0x33),
                ForeColour = Color.White,
                Text = "Status:",
                Location = new Point(370, 10),
                Size = new Size(170, 14),
                Font = new Font(Settings.FontName, 7F),
                Visible = true
            };

            MembersRanks = new MirDropDownBox[MemberPageRows];
            MembersName = new MirLabel[MemberPageRows];
            MembersStatus = new MirLabel[MemberPageRows];
            MembersDelete = new MirButton[MemberPageRows];

            for (int i = MembersRanks.Length - 1; i >= 0; i--)
            {
                int index = i;
                MembersRanks[i] = new MirDropDownBox()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(0x0F, 0x0F, 0x42) : Color.FromArgb(0x00, 0x00, 0x66),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(180, 14),
                    Location = new Point(10, 24 + (i * 15)),
                    Visible = false,
                    Enabled = false
                };
                MembersRanks[index].ValueChanged += (o, e) => OnNewRank(index, MembersRanks[index]._WantedIndex);
            }
            for (int i = 0; i < MembersName.Length; i++)
            {
                MembersName[i] = new MirLabel()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(0x0F, 0x0F, 0x42) : Color.FromArgb(0x00, 0x00, 0x66),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(180, 14),
                    Location = new Point(190, 24 + (i * 15)),
                    Visible = false,
                    Enabled = false,
                    Font = new Font(Settings.FontName, 7F)
                };

            }
            for (int i = 0; i < MembersStatus.Length; i++)
            {
                MembersStatus[i] = new MirLabel()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(0x0F, 0x0F, 0x42) : Color.FromArgb(0x00, 0x00, 0x66),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(170, 14),
                    Location = new Point(370, 24 + (i * 15)),
                    Visible = false,
                    Enabled = false,
                    Font = new Font(Settings.FontName, 7F)
                };
            }
            for (int i = 0; i < MembersDelete.Length; i++)
            {
                int index = i;
                MembersDelete[i] = new MirButton()
                {
                    Enabled = true,
                    Visible = false,
                    Location = new Point(525, 24 + (i * 15)),
                    Library = Libraries.Prguse,
                    Index = 917,
                    Parent = MembersPage
                };
                MembersDelete[index].Click += (o, e) => DeleteMember(index);
            }

            MembersAddMember = new MirButton
            {
                Parent = MembersPage,
                Enabled = true,
                Visible = false,
                Location = new Point(27, 337),
                Library = Libraries.Title,
                Index = 64,
                HoverIndex = 65,
                PressedIndex = 63
            };
            MembersAddMember.Click += (o, e) => AddMember();

            MembersUpButton = new MirButton
            {
                HoverIndex = 312,
                Library = Libraries.Prguse,
                Location = new Point(551, 0),
                Size = new Size(16, 14),
                Parent = MembersPage,
                PressedIndex = 313,
                Sound = SoundList.ButtonA
            };
            MembersUpButton.Click += (o, e) =>
            {
                if (MemberScrollIndex == 0) return;
                MemberScrollIndex--;
                UpdateMembers();
                UpdateMembersScrollPosition();
            };

            MembersDownButton = new MirButton
            {
                HoverIndex = 314,
                Library = Libraries.Prguse,
                Location = new Point(551, 316),
                Size = new Size(16, 14),
                Parent = MembersPage,
                PressedIndex = 315,
                Sound = SoundList.ButtonA
            };
            MembersDownButton.Click += (o, e) =>
            {
                if (MemberScrollIndex == MembersShowCount - MemberPageRows) return;
                MemberScrollIndex++;
                UpdateMembers();
                UpdateMembersScrollPosition();
            };

            MembersPositionBar = new MirButton
            {
                Index = 955,
                Library = Libraries.Prguse,
                Location = new Point(551, 15),
                Parent = MembersPage,
                Movable = true,
                Sound = SoundList.None
            };
            MembersPositionBar.OnMoving += MembersPositionBar_OnMoving;

            MembersShowOfflineButton = new MirButton
            {
                Visible = true,
                Index = 1346,
                Library = Libraries.Prguse,
                Sound = SoundList.ButtonA,
                Parent = MembersPage,
                Location = new Point(432, 340)
            };
            MembersShowOfflineButton.Click += (o, e) => MembersShowOfflineSwitch();

            MembersShowOfflineStatus = new MirImageControl
            {
                Visible = true,
                Index = 1347,
                Library = Libraries.Prguse,
                Parent = MembersPage,
                Location = new Point(432, 340)
            };
            MembersShowOfflineStatus.Click += (o, e) => MembersShowOfflineSwitch();

            MembersShowOffline = new MirLabel
            {
                Visible = true,
                Text = "Show Offline Members",
                Location = new Point(449, 340),
                Parent = MembersPage,
                Size = new Size(150, 12),
                Font = new Font(Settings.FontName, 7F),
                ForeColour = Color.White
            };
            MembersPage.KeyDown += MembersPanel_KeyDown;
            MembersPage.MouseWheel += MembersPanel_MouseWheel;
            #endregion

            #region "status tab"
            StatusPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = false
            };
            StatusPage.BeforeDraw += (o, e) =>
            {
                if (MapControl.User.GuildName == "")
                    StatusData.Text = "";
                else
                    StatusData.Text = string.Format("{0}\n{1}\n{2}\n{3}", MapObject.User.GuildName, Level, MemberCount, MaxMembers == 0 ? "Unlimited" : MaxMembers.ToString());
            };
            StatusHeaders = new MirLabel()
            {
                Location = new Point(10, 25),
                Size = new Size(100, 300),
                NotControl = true,
                Text = "Guild Name:\nLevel:\nMembers:\nMaximum Members:\n",
                Visible = true,
                Parent = StatusPage
            };
            StatusData = new MirLabel()
            {
                Location = new Point(120, 25),
                Size = new Size(100, 300),
                NotControl = true,
                Text = "",
                Visible = true,
                Parent = StatusPage
            };
            StatusExpBar = new MirImageControl()
            {
                Index = 7,
                Library = Libraries.Prguse,
                Location = new Point(0, 0),
                DrawImage = false,
                NotControl = true,
                Parent = StatusPage,
                Size = new Size(550, 7)
            };
            StatusExpBar.BeforeDraw += StatusExpBar_BeforeDraw;
            StatusExpLabel = new MirLabel()
            {
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Location = new Point(0, 0),
                NotControl = true,
                Parent = StatusPage,
                Size = new Size(550, 12)
            };
            #endregion

            #region "storage tab"
            StoragePage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = false
            };
            StoragePage.BeforeDraw += (o, e) =>
            {
                StorageGoldText.Text = Gold > 0 ? string.Format("{0:###,###,###} Gold", Gold) : "0 Gold";
                if (MyRankId == 0)
                    StorageGoldRemove.Visible = true;
                else
                    StorageGoldRemove.Visible = false;

            };
            StorageGoldIcon = new MirButton()
            {
                Parent = StoragePage,
                Size = new Size(32, 17),
                Location = new Point(10, 9),
                Visible = true,
                Library = Libraries.Prguse,
                Index = 28,
                NotControl = true,
            };
            StorageGoldText = new MirLabel()
            {
                Parent = StoragePage,
                Size = new Size(150, 15),
                Location = new Point(47, 10),
                Visible = true,
                Text = "0",
                NotControl = true,
                BackColour = Color.FromArgb(0x0F, 0x0F, 0x42),
                Border = true,
                BorderColour = Color.FromArgb(0x54, 0x4F, 0x36)
            };
            StorageGoldAdd = new MirButton()
            {
                Parent = StoragePage,
                Library = Libraries.Prguse,
                Index = 918,
                Visible = true,
                Enabled = true,
                Location = new Point(202, 10)
            };
            StorageGoldAdd.Click += (o, e) => StorageAddGold();
            StorageGoldRemove = new MirButton()
            {
                Parent = StoragePage,
                Library = Libraries.Prguse,
                Index = 917,
                Visible = false,
                Enabled = true,
                Location = new Point(218, 10)
            };
            StorageGoldRemove.Click += (o, e) => StorageRemoveGold();

            for (int i = 0; i < 9; i++)
                new MirLabel()
                {
                    Parent = StoragePage,
                    BackColour = Color.FromArgb(0x54, 0x4F, 0x36),
                    Location = new Point(15, (i * 32) + 41 + i),
                    Size = new Size(518, 1),
                    Text = " "
                };

            for (int i = 0; i < 15; i++)
                new MirLabel()
                {
                    Parent = StoragePage,
                    BackColour = Color.FromArgb(0x54, 0x4F, 0x36),
                    Location = new Point((i * 36) + 14 + i, 41),
                    Size = new Size(1, 265),
                    Text = " "
                };

            StorageGrid = new MirItemCell[112];
            for (int i = 0; i < StorageGrid.Length; i++)
            {
                StorageGrid[i] = new MirItemCell()
                {
                    BorderColour = Color.Lime,
                    ItemSlot = i,
                    GridType = MirGridType.GuildStorage,
                    Library = Libraries.Items,
                    Parent = StoragePage,
                    Location = new Point((i % 14) * 36 + 15 + (i % 14), (i / 14) * 32 + 42 + (i / 14))
                };
            }

            #endregion

            #region "buffs tab"
            BuffsPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = false
            };
            #endregion

            #region "Ranks tab"
            RankPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(567, 368),
                Location = new Point(13, 37),
                Visible = false
            };
            RankPage.BeforeDraw += (o, e) => RequestUpdateMembers();
            RanksSelectText = new MirLabel()
            {
                Text = "Select a rank:",
                Location = new Point(50, 10),
                Size = new Size(120, 20),
                ForeColour = Color.White,
                Parent = RankPage,
                NotControl = true
            };
            RanksName = new MirTextBox()
            {
                Location = new Point(300, 10),
                Size = new Size(150, 20),
                MaxLength = 20,
                Parent = RankPage,
                Visible = true,
                Enabled = false,
                Text = "",
                BackColour = Color.FromArgb(0x0F, 0x0F, 0x42),
                Border = true,
                BorderColour = Color.FromArgb(0x54, 0x4F, 0x36)
            };
            RanksName.BeforeDraw += (o, e) => RanksName_BeforeDraw();
            RanksName.TextBox.KeyPress += RanksName_KeyPress;
            RanksSaveName = new MirButton()
            {
                Location = new Point(455, 8),
                Enabled = false,
                Visible = true,
                Parent = RankPage,
                Index = 90,
                HoverIndex = 91,
                PressedIndex = 92,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA
            };
            RanksSaveName.Click += (o, e) =>
            {
                RanksChangeName();
            };

            String[] Options = { "Edit ranks", "Recruit member", "Kick member", "Store item", "Retrieve item", "Alter alliance", "Change notice", "Activate Buff" };
            RanksOptionsButtons = new MirButton[8];
            RanksOptionsStatus = new MirImageControl[8];
            RanksOptionsTexts = new MirLabel[8];
            for (int i = 0; i < RanksOptionsButtons.Length; i++)
            {
                RanksOptionsButtons[i] = new MirButton()
                {
                    Visible = true,
                    Enabled = false,
                    Index = 1346,
                    Library = Libraries.Prguse,
                    Sound = SoundList.ButtonA,
                    Parent = RankPage,
                    Location = new Point(i % 2 == 0 ? 140 : 310, i % 2 == 0 ? 100 + (i * 20) : 100 + ((i - 1) * 20))
                };
                int index = i;
                RanksOptionsButtons[i].Click += (o, e) => SwitchRankOption(index);
            }

            for (int i = 0; i < RanksOptionsStatus.Length; i++)
            {
                RanksOptionsStatus[i] = new MirImageControl()
                {
                    Visible = false,
                    Index = 1347,
                    Library = Libraries.Prguse,
                    Parent = RankPage,
                    NotControl = true,
                    Location = new Point(i % 2 == 0 ? 140 : 310, i % 2 == 0 ? 100 + (i * 20) : 100 + ((i - 1) * 20))
                };
                int index = i;
                RanksOptionsStatus[i].Click += (o, e) => SwitchRankOption(index);
            }
            for (int i = 0; i < RanksOptionsTexts.Length; i++)
            {
                RanksOptionsTexts[i] = new MirLabel()
                {
                    Visible = true,
                    NotControl = true,
                    Parent = RankPage,
                    Location = new Point(17 + (i % 2 == 0 ? 140 : 310), i % 2 == 0 ? 100 + (i * 20) : 100 + ((i - 1) * 20)),
                    AutoSize = true,
                    Text = Options[i]
                };
            }

            RanksSelectBox = new MirDropDownBox()
            {
                Parent = RankPage,
                Location = new Point(130, 11),
                Size = new Size(150, 20),
                ForeColour = Color.White,
                Visible = true,
                Enabled = true
            };
            RanksSelectBox.ValueChanged += (o, e) => OnRankSelect(RanksSelectBox._WantedIndex);

            #endregion
        }
示例#15
0
        public MirAmountBox(string title, int image, uint max, uint min = 0, uint defaultAmount = 0)
        {
            ImageIndex = image;
            MaxAmount = max;
            MinAmount = min;
            Amount = max;
            Modal = true;
            Movable = false;

            Index = 238;
            Library = Libraries.Prguse;

            Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

            TitleLabel = new MirLabel
            {
                AutoSize = true,
                Location = new Point(19, 8),
                Parent = this,
                NotControl = true,
                Text = title
            };

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(180, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Dispose();

            ItemImage = new MirControl
            {
                Location = new Point(15, 34),
                Size = new Size(38, 34),
                Parent = this,
            };
            ItemImage.AfterDraw += (o, e) => DrawItem();

            OKButton = new MirButton
            {
                HoverIndex = 201,
                Index = 200,
                Library = Libraries.Title,
                Location = new Point(23, 76),
                Parent = this,
                PressedIndex = 202,
            };
            OKButton.Click += (o, e) => Dispose();

            CancelButton = new MirButton
            {
                HoverIndex = 204,
                Index = 203,
                Library = Libraries.Title,
                Location = new Point(110, 76),
                Parent = this,
                PressedIndex = 205,
            };
            CancelButton.Click += (o, e) => Dispose();

            InputTextBox = new MirTextBox
            {
                Parent = this,
                Border = true,
                BorderColour = Color.Lime,
                Location = new Point(58, 43),
                Size = new Size(132, 19),
            };
            InputTextBox.SetFocus();
            InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress;
            InputTextBox.TextBox.TextChanged += TextBox_TextChanged;
            InputTextBox.Text = (defaultAmount > 0 && defaultAmount <= MaxAmount) ? defaultAmount.ToString() : MaxAmount.ToString();
            InputTextBox.TextBox.SelectionStart = 0;
            InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length;

        }
示例#16
0
        public GuildDialog()
        {
            Index = 180;
            Library = Libraries.Prguse;
            Movable = true;
            Sort = true;
            Location = Center;

            #region TabUI
            NoticeButton = new MirButton
            {
                Library = Libraries.Title,
                Index = 93,
                PressedIndex = 94,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(20, 38)
            };
            NoticeButton.Click += (o, e) => LeftDialog(0);
            MembersButton = new MirButton
            {
                Library = Libraries.Title,
                Index = 99,
                PressedIndex = 100,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(91, 38),
            };
            MembersButton.Click += (o, e) => LeftDialog(1);
            StorageButton = new MirButton
            {
                Library = Libraries.Title,
                Index = 105,
                PressedIndex = 106,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(162, 38),
                Visible = false
            };
            StorageButton.Click += (o, e) => LeftDialog(2);

            BuffsButton = new MirButton
            {
                Library = Libraries.Title,
                Index = 526,
                HoverIndex = 527,
                PressedIndex = 528,
                Sound = SoundList.ButtonA,
                Parent = StatusPage,
                Location = new Point(124, 63),
                Visible = false,
            };
            BuffsButton.Click += (o, e) =>
            {
                GameScene.Scene.GuildBuffDialog.Show();
                Hide();
            };
            RankButton = new MirButton // Ranks
            {
                Library = Libraries.Title,
                Index = 101,
                HoverIndex = 102,
                Sound = SoundList.ButtonA,
                Parent = this,
                Location = new Point(233, 38),
                Visible = false,
            };
            RankButton.Click += (o, e) => LeftDialog(3);

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(565, 4),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA
            };
            CloseButton.Click += (o, e) => Hide();
            #endregion

            #endregion

            #region NoticePageUI
            NoticePage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(352, 372),
                Location = new Point(0, 60),
                Visible = true
            };
            Notice = new MirTextBox()
            {
                ForeColour = Color.White,
                Font = new Font(Settings.FontName, 8F),
                Enabled = false,
                Visible = true,
                Parent = NoticePage,
                Size = new Size(322, 330),
                Location = new Point(13, 1)
                //sorting = true
            };
            Notice.MultiLine();

            NoticeEditButton = new MirButton
            {
                Visible = false,
                Index = 560,
                HoverIndex = 561,
                PressedIndex = 562,
                Library = Libraries.Prguse,
                Sound = SoundList.ButtonA,
                Parent = NoticePage,
                Location = new Point(20, 342)
            };
            NoticeEditButton.Click += (o, e) => EditNotice();

            NoticeSaveButton = new MirButton
            {
                Visible = false,
                Index = 554,
                HoverIndex = 555,
                PressedIndex = 556,
                Library = Libraries.Prguse,
                Sound = SoundList.ButtonA,
                Parent = NoticePage,
                Location = new Point(20, 342)
            };
            NoticeSaveButton.Click += (o, e) => EditNotice();

            NoticeUpButton = new MirButton
            {
                HoverIndex = 198,
                Index = 197,
                Visible = true,
                Library = Libraries.Prguse2,
                Location = new Point(337, 1),
                Size = new Size(16, 14),
                Parent = NoticePage,
                PressedIndex = 199,
                Sound = SoundList.ButtonA
            };
            NoticeUpButton.Click += (o, e) =>
            {
                if (NoticeScrollIndex == 0) return;
                if (NoticeScrollIndex >= 25) NoticeScrollIndex -= 24;
                NoticeScrollIndex--;
                UpdateNotice();
            };

            NoticeDownButton = new MirButton
            {
                HoverIndex = 208,
                Index = 207,
                Visible = true,
                Library = Libraries.Prguse2,
                Location = new Point(337, 318),
                Size = new Size(16, 14),
                Parent = NoticePage,
                PressedIndex = 209,
                Sound = SoundList.ButtonA
            };
            NoticeDownButton.Click += (o, e) =>
            {
                if (NoticeScrollIndex == Notice.MultiText.Length - 1) return;
                if (NoticeScrollIndex < 25) NoticeScrollIndex = 24;
                NoticeScrollIndex++;
                UpdateNotice();
            };

            NoticePositionBar = new MirButton
            {
                Index = 206,
                Library = Libraries.Prguse2,
                Location = new Point(336, 15),
                Parent = NoticePage,
                Movable = true,
                Visible = true,
                Sound = SoundList.None
            };
            NoticePositionBar.OnMoving += NoticePositionBar_OnMoving;

            NoticePage.KeyDown += NoticePanel_KeyDown;
            NoticePage.MouseWheel += NoticePanel_MouseWheel;
            #endregion

            #region MembersPageUI
            MembersPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(330, 372),
                Location = new Point(0, 60),
                Visible = false
            };
            MembersPageBase = new MirImageControl()
            {
                Library = Libraries.Prguse,
                Index = 1852,
                Parent = MembersPage,
                Location = new Point(13, 1),
                Visible = true
            };
            MembersPage.BeforeDraw += (o, e) => RequestUpdateMembers();
            MembersRanks = new MirDropDownBox[MemberPageRows];
            MembersName = new MirLabel[MemberPageRows];
            MembersStatus = new MirLabel[MemberPageRows];
            MembersDelete = new MirButton[MemberPageRows];

            for (int i = MembersRanks.Length - 1; i >= 0; i--)
            {
                int index = i;
                MembersRanks[i] = new MirDropDownBox()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(255, 10, 10, 10) : Color.FromArgb(255, 15, 15, 15),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(100, 14),
                    Location = new Point(24, 30 + (i * 15)),
                    Visible = false,
                    Enabled = false
                };
                MembersRanks[index].ValueChanged += (o, e) => OnNewRank(index, MembersRanks[index]._WantedIndex);
            }
            for (int i = 0; i < MembersName.Length; i++)
            {
                MembersName[i] = new MirLabel()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(255, 05, 05, 05) : Color.FromArgb(255, 07, 07, 07),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(100, 14),
                    Location = new Point(125, 30 + (i * 15)),
                    Visible = false,
                    Enabled = false,
                    Font = new Font(Settings.FontName, 7F)
                };

            }
            for (int i = 0; i < MembersStatus.Length; i++)
            {
                MembersStatus[i] = new MirLabel()
                {
                    BackColour = i % 2 == 0 ? Color.FromArgb(255, 10, 10, 10) : Color.FromArgb(255, 15, 15, 15),
                    ForeColour = Color.White,
                    Parent = MembersPage,
                    Size = new Size(100, 14),
                    Location = new Point(225, 30 + (i * 15)),
                    Visible = false,
                    Enabled = false,
                    Font = new Font(Settings.FontName, 7F)
                };
            }
            for (int i = 0; i < MembersDelete.Length; i++)
            {
                int index = i;
                MembersDelete[i] = new MirButton()
                {
                    Enabled = true,
                    Visible = true,
                    Location = new Point(210, 30 + (i * 15)),
                    Library = Libraries.Prguse,
                    Index = 917,
                    Parent = MembersPage
                };
                MembersDelete[index].Click += (o, e) => DeleteMember(index);
            }
            MembersUpButton = new MirButton
            {
                HoverIndex = 198,
                Index = 197,
                Visible = true,
                Library = Libraries.Prguse2,
                Location = new Point(315, 0),
                Size = new Size(16, 14),
                Parent = MembersPage,
                PressedIndex = 199,
                Sound = SoundList.ButtonA
            };
            MembersUpButton.Click += (o, e) =>
            {
                if (MemberScrollIndex == 0) return;
                MemberScrollIndex--;
                UpdateMembers();
                UpdateMembersScrollPosition();
            };
            MembersDownButton = new MirButton
            {
                HoverIndex = 208,
                Index = 207,
                Visible = true,
                Library = Libraries.Prguse2,
                Location = new Point(315, 316),
                Size = new Size(16, 14),
                Parent = MembersPage,
                PressedIndex = 209,
                Sound = SoundList.ButtonA
            };
            MembersDownButton.Click += (o, e) =>
            {
                if (MemberScrollIndex == MembersShowCount - MemberPageRows) return;
                MemberScrollIndex++;
                UpdateMembers();
                UpdateMembersScrollPosition();
            };

            MembersPositionBar = new MirButton
            {
                Index = 955,
                Library = Libraries.Prguse,
                Location = new Point(315, 15),
                Parent = MembersPage,
                Movable = true,
                Sound = SoundList.None
            };
            MembersPositionBar.OnMoving += MembersPositionBar_OnMoving;

            MembersShowOfflineButton = new MirButton
            {
                Visible = true,
                Index = 1346,
                Library = Libraries.Prguse,
                Sound = SoundList.ButtonA,
                Parent = MembersPage,
                Location = new Point(230, 310)
            };
            MembersShowOfflineButton.Click += (o, e) => MembersShowOfflineSwitch();

            MembersShowOfflineStatus = new MirImageControl
            {
                Visible = true,
                Index = 1347,
                Library = Libraries.Prguse,
                Parent = MembersPage,
                Location = new Point(230, 310)
            };
            MembersShowOfflineStatus.Click += (o, e) => MembersShowOfflineSwitch();

            MembersShowOffline = new MirLabel
            {
                Visible = true,
                Text = "Show Offline",
                Location = new Point(245, 309),
                Parent = MembersPage,
                Size = new Size(150, 12),
                Font = new Font(Settings.FontName, 7F),
                ForeColour = Color.White
            };
            MembersPage.KeyDown += MembersPanel_KeyDown;
            MembersPage.MouseWheel += MembersPanel_MouseWheel;
            #endregion

            #region StatusDialogUI 
            StatusPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(230, 372),
                Location = new Point(355, 60),
                Visible = true
            };
            StatusPageBase = new MirImageControl()
            {
                Parent = StatusPage,
                Library = Libraries.Prguse,
                Index = 1850,
                Visible = true,
                Location = new Point(10, 2)
            };
            StatusPage.BeforeDraw += (o, e) =>
            {
                if (MapControl.User.GuildName == "")
                    StatusData.Text = "";
                else
                    StatusData.Text = string.Format("{0}\n\n{1}\n\n{2}/{3}", MapObject.User.GuildName, Level, MemberCount, MaxMembers == 0 ? "Unlimited" : MaxMembers.ToString());
            };
            StatusHeaders = new MirLabel()
            {
                Location = new Point(46, 49),
                Size = new Size(100, 300),
                NotControl = true,
                Text = "Guild Name\n\nLevel\n\nMembers",
                Visible = true,
                Parent = StatusPage
            };
            StatusData = new MirLabel()
            {
                Location = new Point(122, 49),
                Size = new Size(100, 300),
                NotControl = true,
                Text = "",
                Visible = true,
                Parent = StatusPage
            };
            StatusExpBar = new MirImageControl()
            {
                //Index = 7,
                Library = Libraries.Prguse,
                Location = new Point(0, 0),
                DrawImage = false,
                NotControl = true,
                Parent = StatusPage,
                Size = new Size(550, 7)
            };
            StatusExpBar.BeforeDraw += StatusExpBar_BeforeDraw;
            StatusExpLabel = new MirLabel()
            {
                DrawFormat = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter,
                Location = new Point(0, 0),
                NotControl = true,
                Parent = StatusPage,
                Size = new Size(550, 12)
            };
            MembersRecruitName = new MirTextBox()
            {
                Location = new Point(40, 300),
                Size = new Size(130, 21),
                MaxLength = 20,
                Parent = StatusPage,
                Visible = true,
                Text = "",
                BackColour = Color.FromArgb(255, 6, 6, 6),
                Border = true,
                BorderColour = Color.FromArgb(255, 20, 20, 20),
                CanLoseFocus = true
                //sorting = true
            };
            RecruitMemberButton = new MirButton()
            {
                Parent = StatusPage,
                Enabled = true,
                Visible = true,
                Location = new Point(170, 299),
                Library = Libraries.Title,
                Index = 356,
                HoverIndex = 357,
                PressedIndex = 358
            };
            RecruitMemberButton.Click += (o, e) => AddMember();
            #endregion

            #region StorageDialogUI 
            StoragePage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(352, 372),
                Location = new Point(0, 60),
                Visible = false
            };
            StoragePageBase = new MirImageControl()
            {
                Visible = true,
                Parent = StoragePage,
                Library = Libraries.Prguse,
                Index = 1851,
                Location = new Point(30, 19)
            };
            StoragePage.BeforeDraw += (o, e) =>
            {
                StorageGoldText.Text = Gold > 0 ? string.Format("{0:###,###,###}", Gold) : "0";
                if (MyRankId == 0)
                    StorageGoldRemove.Visible = true;
                else
                    StorageGoldRemove.Visible = false;

            };
            StorageGoldText = new MirLabel()
            {
                Parent = StoragePage,
                Size = new Size(125, 12),
                Location = new Point(194, 312),
                Visible = true,
                Text = "0",
                NotControl = true,
            };
            StorageGoldAdd = new MirButton()
            {
                Parent = StoragePage,
                Library = Libraries.Prguse,
                Index = 918,
                Visible = true,
                Enabled = true,
                Location = new Point(306, 313)
            };
            StorageGoldAdd.Click += (o, e) => StorageAddGold();
            StorageGoldRemove = new MirButton()
            {
                Visible = false,
                Enabled = true,
                Location = new Point(218, 10)
            };
            StorageGoldRemove.Click += (o, e) => StorageRemoveGold();

            StorageGrid = new MirItemCell[8 * 8];
            {
                for (int x = 0; x < 8; x++)
                {
                    for (int y = 0; y < 8; y++)
                    {
                        int idx = 8 * y + x;
                        StorageGrid[idx] = new MirItemCell
                        {
                            ItemSlot = idx,
                            GridType = MirGridType.GuildStorage,
                            Library = Libraries.Items,
                            Parent = StoragePage,
                            Size = new Size(35, 35),
                            Location = new Point(x * 35 + 31 + x, y * 35 + 20 + y),
                        };
                    }
                }
            }

            #endregion

            #region RankDialogUI
            RankPage = new MirImageControl()
            {
                Parent = this,
                Size = new Size(352, 372),
                Location = new Point(0, 60),
                Visible = false
            };
            RankPage.BeforeDraw += (o, e) => RequestUpdateMembers();
            RanksSelectTextL = new MirLabel()
            {
                Text = "Edit Rank",
                Location = new Point(42,36),
                Size = new Size(150, 20),
                ForeColour = Color.White,
                Parent = RankPage,
                NotControl = true,
                
            };
            RanksSelectTextR = new MirLabel()
            {
                Text = "Select Rank",
                Location = new Point(198, 36),
                Size = new Size(150, 20),
                ForeColour = Color.White,
                Parent = RankPage,
                NotControl = true,

            };
            RanksSelectBox = new MirDropDownBox()
            {
                Parent = RankPage,
                Location = new Point(198, 36),
                Size = new Size(130, 16),
                ForeColour = Color.White,
                Visible = true,
                Enabled = true
            };
            RanksSelectBox.ValueChanged += (o, e) => OnRankSelect(RanksSelectBox._WantedIndex);

            RanksName = new MirTextBox()
            {
                Location = new Point(42, 36),
                Size = new Size(130, 16),
                MaxLength = 20,
                Parent = RankPage,
                Visible = true,
                Enabled = false,
                Text = "",
                BackColour = Color.FromArgb(255, 6, 6, 6),
                Border = true,
                BorderColour = Color.FromArgb(255, 20, 20, 20)
            };
            RanksName.BeforeDraw += (o, e) => RanksName_BeforeDraw();
            RanksName.TextBox.KeyPress += RanksName_KeyPress;
            RanksSaveName = new MirButton()
            {
                Location = new Point(155, 290),
                Enabled = false,
                Visible = true,
                Parent = RankPage,
                Index = 90,
                HoverIndex = 91,
                PressedIndex = 92,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA
            };
            RanksSaveName.Click += (o, e) =>
            {
                RanksChangeName();
            };
            String[] Options = { "Edit ranks", "Recruit member", "Kick member", "Store item", "Retrieve item", "Alter alliance", "Change notice", "Activate Buff" };
            RanksOptionsButtons = new MirButton[8];
            RanksOptionsStatus = new MirImageControl[8];
            RanksOptionsTexts = new MirLabel[8];
            for (int i = 0; i < RanksOptionsButtons.Length; i++)
            {
                RanksOptionsButtons[i] = new MirButton()
                {
                    Visible = true,
                    Enabled = false,
                    Index = 1346,
                    Library = Libraries.Prguse,
                    Sound = SoundList.ButtonA,
                    Parent = RankPage,
                    Location = new Point(i % 2 == 0 ? 32 : 202, i % 2 == 0 ? 120 + (i * 20) : 120 + ((i - 1) * 20))
                };
                int index = i;
                RanksOptionsButtons[i].Click += (o, e) => SwitchRankOption(index);
            }
            for (int i = 0; i < RanksOptionsStatus.Length; i++)
            {
                RanksOptionsStatus[i] = new MirImageControl()
                {
                    Visible = false,
                    Index = 1347,
                    Library = Libraries.Prguse,
                    Parent = RankPage,
                    NotControl = true,
                    Location = new Point(i % 2 == 0 ? 32 : 202, i % 2 == 0 ? 120 + (i * 20) : 120 + ((i - 1) * 20))
                };
                int index = i;
                RanksOptionsStatus[i].Click += (o, e) => SwitchRankOption(index);
            }
            for (int i = 0; i < RanksOptionsTexts.Length; i++)
            {
                RanksOptionsTexts[i] = new MirLabel()
                {
                    Visible = true,
                    NotControl = true,
                    Parent = RankPage,
                    Location = new Point(17 + (i % 2 == 0 ? 32 : 202), i % 2 == 0 ? 118 + (i * 20) : 118 + ((i - 1) * 20)),
                    AutoSize = true,
                    Text = Options[i]
                };
            }
}
示例#17
0
        public MirAmountBox(string title, int image, uint max, uint min = 0, uint defaultAmount = 0)
        {
            ImageIndex = image;
            MaxAmount  = max;
            MinAmount  = min;
            Amount     = max;
            Modal      = true;
            Movable    = false;

            Index   = 238;
            Library = Libraries.CustomPrguse;

            Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

            TitleLabel = new MirLabel
            {
                AutoSize   = true,
                Location   = new Point(19, 8),
                Parent     = this,
                NotControl = true,
                Text       = title
            };

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(180, 3),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Dispose();

            ItemImage = new MirControl
            {
                Location = new Point(15, 34),
                Size     = new Size(38, 34),
                Parent   = this,
            };
            ItemImage.AfterDraw += (o, e) => DrawItem();

            OKButton = new MirButton
            {
                HoverIndex   = 201,
                Index        = 200,
                Library      = Libraries.CustomTitle,
                Location     = new Point(23, 76),
                Parent       = this,
                PressedIndex = 202,
            };
            OKButton.Click += (o, e) => Dispose();

            CancelButton = new MirButton
            {
                HoverIndex   = 204,
                Index        = 203,
                Library      = Libraries.CustomTitle,
                Location     = new Point(110, 76),
                Parent       = this,
                PressedIndex = 205,
            };
            CancelButton.Click += (o, e) => Dispose();

            InputTextBox = new MirTextBox
            {
                Parent       = this,
                Border       = true,
                BorderColour = Color.Lime,
                Location     = new Point(58, 43),
                Size         = new Size(132, 19),
            };
            InputTextBox.SetFocus();
            InputTextBox.TextBox.KeyPress    += MirInputBox_KeyPress;
            InputTextBox.TextBox.TextChanged += TextBox_TextChanged;
            InputTextBox.Text = (defaultAmount > 0 && defaultAmount <= MaxAmount) ? defaultAmount.ToString() : MaxAmount.ToString();
            InputTextBox.TextBox.SelectionStart  = 0;
            InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length;
        }
示例#18
0
        public MemoDialog()
        {
            Index = 209;
            Library = Libraries.Title;
            Movable = true;
            Sort = true;
            Location = Center;

            MemoTextBox = new MirTextBox
            {
                ForeColour = Color.White,
                Parent = this,
                Font = new Font(Settings.FontName, 8F),
                Location = new Point(15, 30),
                Size = new Size(165, 100),
            };
            MemoTextBox.MultiLine();

            OKButton = new MirButton
            {
                Index = 382,
                HoverIndex = 383,
                PressedIndex = 384,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(30, 133)
            };
            OKButton.Click += (o, e) =>
            {
                Network.Enqueue(new C.AddMemo { CharacterIndex = Friend.Index, Memo = MemoTextBox.Text });
                Hide();
            };

            CancelButton = new MirButton
            {
                Index = 385,
                HoverIndex = 386,
                PressedIndex = 387,
                Parent = this,
                Library = Libraries.Title,
                Sound = SoundList.ButtonA,
                Location = new Point(115, 133)
            };
            CancelButton.Click += (o, e) => Hide();

            #region Buttons

            CloseButton = new MirButton
            {
                HoverIndex = 361,
                Index = 360,
                Location = new Point(168, 3),
                Library = Libraries.Prguse2,
                Parent = this,
                PressedIndex = 362,
                Sound = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            #endregion
        }
示例#19
0
            public NewAccountDialog()
            {
                Index = 63;
                Library = Libraries.Prguse;
                Size = new Size();
                Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);

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

                OKButton = new MirButton
                {
                    Enabled = false,
                    HoverIndex = 201,
                    Index = 200,
                    Library = Libraries.Title,
                    Location = new Point(135, 425),
                    Parent = this,
                    PressedIndex = 202,
                };
                OKButton.Click += (o, e) => CreateAccount();

                AccountIDTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 104),
                    MaxLength = Globals.MaxAccountIDLength,
                    Parent = this,
                    Size = new Size(136, 18),
                };
                AccountIDTextBox.SetFocus();
                AccountIDTextBox.TextBox.MaxLength = Globals.MaxAccountIDLength;
                AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
                AccountIDTextBox.TextBox.GotFocus += AccountIDTextBox_GotFocus;

                Password1TextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 130),
                    MaxLength = Globals.MaxPasswordLength,
                    Parent = this,
                    Password = true,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = Globals.MaxPasswordLength },
                };
                Password1TextBox.TextBox.TextChanged += Password1TextBox_TextChanged;
                Password1TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus;

                Password2TextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 156),
                    MaxLength = Globals.MaxPasswordLength,
                    Parent = this,
                    Password = true,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = Globals.MaxPasswordLength },
                };
                Password2TextBox.TextBox.TextChanged += Password2TextBox_TextChanged;
                Password2TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus;

                UserNameTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 190),
                    MaxLength = 20,
                    Parent = this,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = 20 },
                };
                UserNameTextBox.TextBox.TextChanged += UserNameTextBox_TextChanged;
                UserNameTextBox.TextBox.GotFocus += UserNameTextBox_GotFocus;

                BirthDateTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 216),
                    MaxLength = 10,
                    Parent = this,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = 10 },
                };
                BirthDateTextBox.TextBox.TextChanged += BirthDateTextBox_TextChanged;
                BirthDateTextBox.TextBox.GotFocus += BirthDateTextBox_GotFocus;

                QuestionTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 251),
                    MaxLength = 30,
                    Parent = this,
                    Size = new Size(190, 18),
                    TextBox = { MaxLength = 30 },
                };
                QuestionTextBox.TextBox.TextChanged += QuestionTextBox_TextChanged;
                QuestionTextBox.TextBox.GotFocus += QuestionTextBox_GotFocus;

                AnswerTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 277),
                    MaxLength = 30,
                    Parent = this,
                    Size = new Size(190, 18),
                    TextBox = { MaxLength = 30 },
                };
                AnswerTextBox.TextBox.TextChanged += AnswerTextBox_TextChanged;
                AnswerTextBox.TextBox.GotFocus += AnswerTextBox_GotFocus;

                EMailTextBox = new MirTextBox
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(226, 312),
                    MaxLength = 50,
                    Parent = this,
                    Size = new Size(136, 18),
                    TextBox = { MaxLength = 50 },
                };
                EMailTextBox.TextBox.TextChanged += EMailTextBox_TextChanged;
                EMailTextBox.TextBox.GotFocus += EMailTextBox_GotFocus;

                Description = new MirLabel
                {
                    Border = true,
                    BorderColour = Color.Gray,
                    Location = new Point(15, 340),
                    Parent = this,
                    Size = new Size(300, 70),
                    Visible = false
                };
            }
示例#20
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            Search.Dispose();
            Search = null;

            PageNumberLabel = null;
            totalGold = null;
            totalCredits = null;
            ALL = null;
            War = null;
            Sin = null;
            Tao = null;
            Wiz = null;
            Arch = null;
            allItems = null;
            topItems = null;
            Deals = null;
            New = null;

            CloseButton = null;
            PreviousButton = null;
            NextButton = null;

            UpButton = null;
            DownButton = null;
            PositionBar = null;

            Grid = null;
            Filters = null;
            FilterBackground = null;

            Viewer.Dispose();

            CategoryList.Clear();
            filteredShop.Clear();
            SearchResult.Clear();
        }
示例#21
0
            protected override void Dispose(bool disposing)
            {
                if (disposing)
                {
                    OKButton = null;
                    CancelButton = null;

                    AccountIDTextBox = null;
                    Password1TextBox = null;
                    Password2TextBox = null;
                    EMailTextBox = null;
                    UserNameTextBox = null;
                    BirthDateTextBox = null;
                    QuestionTextBox = null;
                    AnswerTextBox = null;

                    Description = null;

                }

                base.Dispose(disposing);
            }
示例#22
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,
                    };
            }
示例#23
0
        public MirAmountBox(string title, int image, uint max, uint min = 0)
        {
            ImageIndex = image;
            MaxAmount  = max;
            MinAmount  = min;
            Amount     = max;
            Modal      = true;
            Movable    = false;

            Index   = 660;
            Library = Libraries.Prguse;

            Location = new Point((800 - Size.Width) / 2, (600 - Size.Height) / 2);

            TitleLabel = new MirLabel
            {
                AutoSize   = true,
                Location   = new Point(19 + 2, 8 + 15 + 3),
                Parent     = this,
                NotControl = true,
                Text       = title
            };

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(180, 23),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
                Visible      = false,
            };
            CloseButton.Click += (o, e) => Dispose();

            ItemImage = new MirControl
            {
                Location = new Point(15, 34),
                Size     = new Size(38, 34),
                Parent   = this,
                Visible  = false,
            };
            ItemImage.AfterDraw += (o, e) => DrawItem();

            OKButton = new MirButton
            {
                HoverIndex   = 383,
                Index        = 382,
                Library      = Libraries.Title,
                Location     = new Point(23 + 120, 76 + 47),
                Parent       = this,
                PressedIndex = 384,
            };
            OKButton.Click += (o, e) => Dispose();

            CancelButton = new MirButton
            {
                HoverIndex   = 386,
                Index        = 385,
                Library      = Libraries.Title,
                Location     = new Point(110 + 100, 76 + 47),
                Parent       = this,
                PressedIndex = 387,
            };
            CancelButton.Click += (o, e) => Dispose();

            InputTextBox = new MirTextBox
            {
                Parent       = this,
                Border       = true,
                BorderColour = Color.Lime,
                Location     = new Point(59 - 37 + 2, 43 + 40 + 4),
                Size         = new Size(238, 19),
            };
            InputTextBox.SetFocus();
            //InputTextBox.Font = new Font(Settings.FontName, 10);
            InputTextBox.TextBox.KeyPress    += MirInputBox_KeyPress;
            InputTextBox.TextBox.TextChanged += TextBox_TextChanged;
            InputTextBox.Text = MaxAmount.ToString();
            InputTextBox.TextBox.SelectionStart  = 0;
            InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length;
        }