예제 #1
0
        public AssistDialog()
        {
            Index   = 710;
            Library = Libraries.Prguse;

            Movable  = true;
            Sort     = true;
            Location = Center;

            checkBoxSmartAttack = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(16, 16), Library = Libraries.Prguse
            };
            checkBoxSmartAttack.LabelText = "刀刀刺杀";
            checkBoxSmartAttack.Click    += CheckBoxClick;

            checkBoxSmartFire = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(16, 32), Library = Libraries.Prguse
            };
            checkBoxSmartFire.LabelText = "自动烈火";
            checkBoxSmartFire.Checked   = Settings.smartFireHit;
            checkBoxSmartFire.Click    += CheckBoxFireClick;

            checkBoxAutoEat = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(16, 48), Library = Libraries.Prguse
            };
            checkBoxAutoEat.LabelText = "自动吃药";
            checkBoxAutoEat.Checked   = Settings.smartFireHit;
            checkBoxAutoEat.Click    += CheckBoxAutoEatClick;

            checkBoxSmartSheild = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(206, 16), Library = Libraries.Prguse
            };
            checkBoxSmartSheild.LabelText = "自动开盾";
            checkBoxSmartSheild.Checked   = Settings.smartSheild;
            checkBoxSmartSheild.Click    += CheckBoxSheildClick;

            textBoxPercentHpProtect = new MirTextBox {
                Location         = new Point(16, 64),
                Parent           = this,
                Size             = new Size(136, 15),
                MaxLength        = Globals.MaxPasswordLength,
                OnlyNumber       = true,
                CanLoseFocus     = true,
                FocusWhenVisible = false
            };
            textBoxPercentHpProtect.TextBox.TextChanged += percentHpTextBox_changed;
            textBoxPercentHpProtect.Text = String.Format("{0}", Settings.percentHpProtect);

            textBoxEatItemName = new MirTextBox {
                Location         = new Point(16, 90),
                Parent           = this,
                Size             = new Size(136, 15),
                MaxLength        = Globals.MaxPasswordLength,
                CanLoseFocus     = true,
                FocusWhenVisible = false
            };
            textBoxEatItemName.TextBox.TextChanged += eatHpItemTextBox_changed;
            textBoxEatItemName.Text = Settings.hpItemName;

            textBoxPercentMpProtect = new MirTextBox {
                Location     = new Point(16, 120),
                Parent       = this, Size = new Size(136, 15),
                MaxLength    = Globals.MaxPasswordLength, OnlyNumber = true,
                CanLoseFocus = true, FocusWhenVisible = false
            };
            textBoxPercentMpProtect.TextBox.TextChanged += percentMpTextBox_changed;
            textBoxPercentMpProtect.Text = String.Format("{0}", Settings.percentHpProtect);

            textBoxEatMpName = new MirTextBox {
                Location     = new Point(16, 150), Parent = this,
                Size         = new Size(136, 15), MaxLength = Globals.MaxPasswordLength,
                CanLoseFocus = true, FocusWhenVisible = false
            };
            textBoxEatMpName.TextBox.TextChanged += eatMpItemTextBox_changed;
            textBoxEatMpName.Text = Settings.mpItemName;


            checkBoxSmartSheild = new MirCheckBox
            {
                Index  = 2086, UnTickedIndex = 2086, TickedIndex = 2087,
                Parent = this, Location = new Point(206, 16), Library = Libraries.Prguse
            };
            checkBoxSmartSheild.LabelText = "自动换毒";
            checkBoxSmartSheild.Checked   = Settings.smartSheild;
            checkBoxSmartSheild.Click    += CheckBoxSheildClick;
        }
예제 #2
0
        public GameShopDialog()
        {
            GameScene.GameShopInfoList.Clear();
            Index    = 749;
            Library  = Libraries.CustomTitle;
            Movable  = true;
            Location = Center;
            Sort     = true;

            TitleLabel = new MirImageControl
            {
                Index    = 26,
                Library  = Libraries.CustomTitle,
                Location = new Point(18, 9),
                Parent   = this
            };

            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.CustomPrguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();

            DonateButton = new MirButton
            {
                Index        = 654,
                Location     = new Point(20, 40),
                Parent       = this,
                PressedIndex = 655,
                Sound        = SoundList.ButtonA,
                Library      = Libraries.CustomTitle,
            };
            DonateButton.Click += DonateButton_Click;

            totalGold = 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)
            };

            totalCredits = 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),
            };

            UpButton = new MirButton
            {
                Index        = 197,
                HoverIndex   = 198,
                PressedIndex = 199,
                Library      = Libraries.CustomPrguse2,
                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.CustomPrguse2,
                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.CustomPrguse2,
                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.CustomTitle,
                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();
            };
            PaymentTypeGold = new MirCheckBox
            {
                LabelText     = "Buy with Gold",
                Location      = new Point(250, 449),
                Parent        = this,
                Hint          = "Buy item(s) with Gold.",
                Index         = 2086,
                UnTickedIndex = 2086,
                TickedIndex   = 2087,
                Library       = Libraries.CustomPrguse,
                Checked       = true
            };
            PaymentTypeGold.Click += PType_Clicked;

            PaymentTypeCredit = new MirCheckBox
            {
                LabelText     = "Buy with Credits",
                Location      = new Point(340, 449),
                Parent        = this,
                Hint          = "Buy item(s) with Credits.",
                Index         = 2086,
                UnTickedIndex = 2086,
                TickedIndex   = 2087,
                Library       = Libraries.CustomPrguse
            };
            PaymentTypeCredit.Click += PType_Clicked;
            allItems = new MirButton
            {
                Index    = 770,
                Library  = Libraries.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomTitle,
                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.CustomPrguse2,
                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.CustomPrguse2,
                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();
        }
예제 #3
0
        public JournalDialog()
        {
            Index    = 230;
            Library  = Libraries.Prguse2;
            Sort     = true;
            Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
            Title    = new MirLabel
            {
                Text          = "Achievements",
                Font          = new Font(Settings.FontName, 10f),
                Parent        = this,
                NotControl    = true,
                Location      = new Point(110, 45),
                Size          = new Size(660, 40),
                ForeColour    = Color.LightPink,
                OutLineColour = Color.Black
            };

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

            GainButton = new MirButton
            {
                HoverIndex   = 251,
                Index        = 250,
                Location     = new Point(575, 300),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 252,
                Sound        = SoundList.ButtonA,
                CenterText   = true,
                Text         = "Get Reward"
            };

            UpButton = new MirButton
            {
                HoverIndex   = 198,
                Index        = 197,
                Visible      = true,
                Library      = Libraries.Prguse2,
                Location     = new Point(ScrollBarBaseX, 73),
                Size         = new Size(16, 14),
                Parent       = this,
                PressedIndex = 199,
                Sound        = SoundList.ButtonA
            };

            DownButton = new MirButton
            {
                HoverIndex   = 208,
                Index        = 207,
                Visible      = true,
                Library      = Libraries.Prguse2,
                Location     = new Point(ScrollBarBaseX, 310),
                Size         = new Size(16, 14),
                Parent       = this,
                PressedIndex = 209,
                Sound        = SoundList.ButtonA
            };

            PositionBar = new MirButton
            {
                Index    = 206,
                Library  = Libraries.Prguse2,
                Location = new Point(ScrollBarBaseX, 88),
                Parent   = this,
                Movable  = true,
                Sound    = SoundList.None
            };

            CompleteCheckBox = new MirCheckBox
            {
                Index       = 1346,
                TickedIndex = 1347,
                LabelText   = "Exclude the completion list",
                Library     = Libraries.Prguse,
                Parent      = this,
                Location    = new Point(315, 50)
            };
        }
예제 #4
0
        public AssistDialog()
        {
            Index   = 309;
            Library = Libraries.Prguse;

            Movable  = true;
            Sort     = true;
            Location = Center;

            checkBoxSmartAttack = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(301, 69), Library = Libraries.Prguse
            };
            //checkBoxSmartAttack.Checked = Settings.smart
            checkBoxSmartAttack.LabelText = "刀刀刺杀";
            checkBoxSmartAttack.Click    += CheckBoxSmartAttack;

            checkBoxSmartFire = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(301, 94), Library = Libraries.Prguse
            };
            checkBoxSmartFire.LabelText = "自动烈火";
            checkBoxSmartFire.Checked   = Settings.smartFireHit;
            checkBoxSmartFire.Click    += CheckBoxFireClick;

            checkBoxAutoEat = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(151, 69), Library = Libraries.Prguse
            };
            checkBoxAutoEat.LabelText = "自动吃药";
            checkBoxAutoEat.Checked   = Settings.smartFireHit;
            checkBoxAutoEat.Click    += CheckBoxAutoEatClick;

            checkBoxSmartSheild = new MirCheckBox {
                Index = 2086, UnTickedIndex = 2086, TickedIndex = 2087, Parent = this, Location = new Point(301, 119), Library = Libraries.Prguse
            };
            checkBoxSmartSheild.LabelText = "自动开盾";
            checkBoxSmartSheild.Checked   = Settings.smartSheild;
            checkBoxSmartSheild.Click    += CheckBoxSheildClick;

            checkBoxChangePoison = new MirCheckBox
            {
                Index  = 2086, UnTickedIndex = 2086, TickedIndex = 2087,
                Parent = this, Location = new Point(301, 143), Library = Libraries.Prguse
            };
            checkBoxChangePoison.LabelText = "自动换毒";
            checkBoxChangePoison.Checked   = Settings.smartChangePoison;
            checkBoxChangePoison.Click    += CheckBoxChangePoisonClick;


            checkBoxAutoPick = new MirCheckBox {
                Index  = 2086, UnTickedIndex = 2086, TickedIndex = 2087,
                Parent = this, Location = new Point(26, 69), Library = Libraries.Prguse
            };
            checkBoxAutoPick.LabelText = "自动拾取";
            checkBoxAutoPick.Checked   = Settings.autoPick;
            checkBoxAutoPick.Click    += CheckBoxAutoPick;

            textBoxPercentHpProtect = new MirTextBox {
                Location         = new Point(238, 95),
                Parent           = this,
                Size             = new Size(45, 15),
                MaxLength        = Globals.MaxPasswordLength,
                OnlyNumber       = true,
                CanLoseFocus     = true,
                FocusWhenVisible = false,
                Font             = new Font(Settings.FontName, 8F)
            };
            textBoxPercentHpProtect.TextBox.TextChanged += percentHpTextBox_changed;
            textBoxPercentHpProtect.Text = String.Format("{0}", Settings.percentHpProtect);

            textBoxEatItemName = new MirTextBox {
                Location         = new Point(189, 119),
                Parent           = this,
                Size             = new Size(93, 15),
                MaxLength        = Globals.MaxPasswordLength,
                CanLoseFocus     = true,
                FocusWhenVisible = false,
                Font             = new Font(Settings.FontName, 8F)
            };
            textBoxEatItemName.TextBox.TextChanged += eatHpItemTextBox_changed;
            textBoxEatItemName.Text = Settings.hpItemName;

            textBoxPercentMpProtect = new MirTextBox {
                Location     = new Point(238, 143),
                Parent       = this, Size = new Size(40, 15),
                MaxLength    = Globals.MaxPasswordLength, OnlyNumber = true,
                CanLoseFocus = true, FocusWhenVisible = false,
                Font         = new Font(Settings.FontName, 8F)
            };

            textBoxPercentMpProtect.TextBox.TextChanged += percentMpTextBox_changed;
            textBoxPercentMpProtect.Text = String.Format("{0}", Settings.percentHpProtect);

            textBoxEatMpName = new MirTextBox {
                Location     = new Point(189, 168), Parent = this,
                Size         = new Size(93, 15), MaxLength = Globals.MaxPasswordLength,
                CanLoseFocus = true, FocusWhenVisible = false,
                Font         = new Font(Settings.FontName, 8F)
            };
            textBoxEatMpName.TextBox.TextChanged += eatMpItemTextBox_changed;
            textBoxEatMpName.Text = Settings.mpItemName;

            CloseButton = new MirButton
            {
                HoverIndex   = 361,
                Index        = 360,
                Location     = new Point(415, 4),
                Library      = Libraries.Prguse2,
                Parent       = this,
                PressedIndex = 362,
                Sound        = SoundList.ButtonA,
            };
            CloseButton.Click += (o, e) => Hide();
        }
예제 #5
0
        public GroupDialog()
        {
            Index    = 120;
            Library  = Libraries.CustomPrguse;
            Movable  = true;
            Sort     = true;
            Location = Center;

            GroupMembers = new MirLabel[Globals.MaxGroup];

            GroupMembers[0] = new MirLabel
            {
                AutoSize   = true,
                Location   = new Point(16, 33),
                Parent     = this,
                NotControl = true,
            };

            for (int i = 1; i < GroupMembers.Length; i++)
            {
                GroupMembers[i] = new MirLabel
                {
                    AutoSize   = true,
                    Location   = new Point(((i + 1) % 2) * 100 + 16, 55 + ((i - 1) / 2) * 20),
                    Parent     = this,
                    NotControl = true,
                };
            }



            TitleLabel = new MirImageControl
            {
                Index    = 5,
                Library  = Libraries.CustomTitle,
                Location = new Point(18, 8),
                Parent   = this
            };

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

            GroupStage = new MirLabel
            {
                AutoSize   = true,
                Location   = new Point(78, 248),
                Parent     = this,
                NotControl = true,
                Text       = "Stage: 0",
                Font       = new Font(Settings.FontName, 8F, FontStyle.Bold),
            };

            GroupExperient = new MirLabel
            {
                AutoSize   = true,
                Location   = new Point(78, 284),
                Parent     = this,
                NotControl = true,
                Text       = "Experience bonus: 0%",
                Font       = new Font(Settings.FontName, 8F, FontStyle.Bold),
            };

            SwitchButton = new MirButton
            {
                HoverIndex   = 115,
                Index        = 114,
                Location     = new Point(25, 219),
                Library      = Libraries.CustomPrguse,
                Parent       = this,
                PressedIndex = 116,
                Sound        = SoundList.ButtonA,
            };
            SwitchButton.Click += (o, e) => Network.Enqueue(new C.SwitchGroup {
                AllowGroup = !AllowGroup
            });

            LockInfoBox = new MirCheckBox
            {
                Index         = 2086,
                UnTickedIndex = 2086,
                TickedIndex   = 2087,
                Library       = Libraries.CustomPrguse,
                Parent        = this,
                Location      = new Point(136, 268),
                Hint          = "Lock Group Info on/off.",
                Checked       = false,
                Visible       = false
            };
            checkBoxLabel = new MirLabel
            {
                Text       = "Lock Group Info on/off.",
                Location   = new Point(136, 268),
                ForeColour = Color.Goldenrod,
                Font       = new Font(Settings.FontName, 12f),
                Parent     = this,
                Visible    = false,
                NotControl = true
            };
            LockInfoBox.Click += (o, e) =>
            {
                if (LockInfoBox.Checked)
                {
                    LockInfo = true;
                }
                else
                {
                    LockInfo = false;
                }
            };
            AddButton = new MirButton
            {
                HoverIndex   = 134,
                Index        = 133,
                Location     = new Point(70, 219),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 135,
                Sound        = SoundList.ButtonA,
            };
            AddButton.Click += (o, e) => AddMember();

            DelButton = new MirButton
            {
                HoverIndex   = 137,
                Index        = 136,
                Location     = new Point(140, 219),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 138,
                Sound        = SoundList.ButtonA,
            };
            DelButton.Click += (o, e) => DelMember();

            BeforeDraw += GroupPanel_BeforeDraw;

            GroupList.Clear();
        }
예제 #6
0
        public KeyboardLayoutDialog()
        {
            Index    = 119;
            Library  = Libraries.CustomTitle;
            Movable  = false;
            Sort     = true;
            Location = Center;

            TitleLabel = new MirImageControl
            {
                Index    = 3,
                Library  = Libraries.CustomTitle,
                Location = new Point(207, 11),
                Parent   = this
            };
            CharacterName = new MirLabel
            {
                Text       = "Hotkey settings for",
                Location   = new Point(130, 39),
                Parent     = this,
                AutoSize   = true,
                DrawFormat = (TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter),
                Font       = new Font(Settings.FontName, 13f),
                ForeColour = Color.White,
                NotControl = true
            };
            PressKeyText = new MirLabel
            {
                Text       = "Please enter the key to be assigned",
                Location   = new Point(25, 378),
                Parent     = this,
                AutoSize   = true,
                DrawFormat = TextFormatFlags.Default,
                Font       = new Font(Settings.FontName, 9f),
                ForeColour = Color.White,
                NotControl = true,
                Visible    = false
            };
            CloseButton = new MirButton
            {
                Parent       = this,
                Index        = 361,
                PressedIndex = 363,
                HoverIndex   = 362,
                Library      = Libraries.CustomPrguse,
                Location     = new Point(485, 6),
                Hint         = "Exit"
            };
            CloseButton.Click += (o, e) =>
            {
                Hide();
            };

            NoticeButton = new MirButton
            {
                HoverIndex   = 147,
                Index        = 146,
                Location     = new Point(35, 398),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 148,
                Sound        = SoundList.ButtonA,
                Hint         = "Key Info"
            };
            NoticeButton.Click += (o, e) =>
            {
                bool flag = ActiveKey != null;
                if (!flag)
                {
                    MirMessageBox mirMessageBox = new MirMessageBox("The following keys can not be set with shortcut keys.\n[ Enter ] [ Tab ] [ Pause(break) ] [ Esc ]\nThe following keys can only be used in combination.\n[ Ctrl ] [ Alt ] [ Shift ]", MirMessageBoxButtons.OK);
                    mirMessageBox.Show();
                }
            };

            ResetButton = new MirButton
            {
                HoverIndex   = 628,
                Index        = 627,
                Location     = new Point(120, 398),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 629,
                Sound        = SoundList.ButtonA,
                Hint         = "Reset Keys."
            };
            ResetButton.Click += (o, e) =>
            {
                bool flag = ActiveKey != null;
                if (!flag)
                {
                    CMain.InputKeys.ResetKey();
                    KeyBindObject[] keyBinds = KeyBinds;
                    for (int j = 0; j < keyBinds.Length; j++)
                    {
                        KeyBindObject keyBindObject = keyBinds[j];
                        keyBindObject.RefreshKey();
                    }
                }
            };

            SaveButton = new MirButton
            {
                HoverIndex   = 587,
                Index        = 586,
                Location     = new Point(430, 398),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 588,
                Sound        = SoundList.ButtonA,
                Hint         = "Save Changes."
            };
            SaveButton.Click += (o, e) =>
            {
                SaveKey();
            };

            CancelButton = new MirButton
            {
                HoverIndex   = 204,
                Index        = 203,
                Location     = new Point(360, 398),
                Library      = Libraries.CustomTitle,
                Parent       = this,
                PressedIndex = 205,
                Sound        = SoundList.ButtonA,
                Hint         = "Cancel Changes."
            };
            CancelButton.Click += (o, e) =>
            {
                CancelKey();
            };

            CharacterCheckBox = new MirCheckBox
            {
                Index       = 1346,
                TickedIndex = 1347,
                LabelText   = "By character\nkey settings",
                Library     = Libraries.Prguse,
                Parent      = this,
                Location    = new Point(410, 40)
            };
            MirControl arg_448_0 = CharacterCheckBox;

            //EventHandler arg_448_1;
            //if ((arg_448_1 = KeyboardLayoutDialog.<> c.<> 9__20_5) == null)
            //{
            //   arg_448_1 = (KeyboardLayoutDialog.<> c.<> 9__20_5 = new EventHandler(KeyboardLayoutDialog.<> c.<> 9.<.ctor > b__20_5));
            //}
            //arg_448_0.Click += arg_448_1;

            KeyPanel = new MirImageControl
            {
                Parent   = this,
                Size     = new Size(500, 280),
                Location = new Point(13, 95),
                Visible  = true
            };
            KeyPanel.MouseWheel += new MouseEventHandler(KeyPanel_MouseWheel);

            UpButton = new MirButton
            {
                HoverIndex   = 198,
                Index        = 197,
                Visible      = true,
                Library      = Libraries.Prguse2,
                Location     = new Point(488, 92),
                Size         = new Size(16, 14),
                Parent       = this,
                PressedIndex = 199,
                Sound        = SoundList.ButtonA
            };
            UpButton.Click += (o, e) =>
            {
                bool flag = ScrollIndex == 0;
                if (!flag)
                {
                    ScrollIndex--;
                    UpdateKeyBinds();
                    UpdateScrollPosition();
                }
            };

            DownButton = new MirButton
            {
                HoverIndex   = 208,
                Index        = 207,
                Visible      = true,
                Library      = Libraries.Prguse2,
                Location     = new Point(488, 363),
                Size         = new Size(16, 14),
                Parent       = this,
                PressedIndex = 209,
                Sound        = SoundList.ButtonA
            };
            DownButton.Click += (o, e) =>
            {
                bool flag = ScrollIndex == ShowCount - PageRows;
                if (!flag)
                {
                    ScrollIndex++;
                    UpdateKeyBinds();
                    UpdateScrollPosition();
                }
            };

            PositionBar = new MirButton
            {
                Index    = 206,
                Library  = Libraries.Prguse2,
                Location = new Point(488, 108),
                Parent   = this,
                Movable  = true,
                Sound    = SoundList.None
            };
            PositionBar.OnMoving += new MouseEventHandler(PositionBar_OnMoving);

            InputKey = new MirTextBox
            {
                BackColour = Color.DarkGray,
                ForeColour = Color.Black,
                Parent     = this,
                Size       = new Size(1, 1),
                Location   = new Point(0, 0),
                MaxLength  = 80,
                Visible    = false,
                Font       = new Font(Settings.FontName, 10f)
            };
            InputKey.TextBox.KeyDown += new KeyEventHandler(InputKey_KeyDown);
            KeyBinds  = new KeyBindObject[CMain.InputKeys.Keylist.Count];
            ShowCount = KeyBinds.Length;
            for (int i = 0; i < CMain.InputKeys.Keylist.Count; i++)
            {
                KeyBinds[i] = new KeyBindObject
                {
                    Parent   = KeyPanel,
                    Location = new Point(0, i * 22),
                    Size     = new Size(500, 20),
                    Key      = CMain.InputKeys.Keylist[i]
                };
                KeyBinds[i].MouseWheel += new MouseEventHandler(KeyPanel_MouseWheel);
            }
        }