Exemplo n.º 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;
        }
Exemplo n.º 2
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();
            };
        }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
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
        }
Exemplo n.º 5
0
        public GuildLetterDialog()
        {
            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, 33),
                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        = 190,
                HoverIndex   = 191,
                PressedIndex = 192,
                Parent       = this,
                Library      = Libraries.Title,
                Sound        = SoundList.ButtonA,
                Location     = new Point(30, 265)
            };
            SendButton.Click += (o, e) =>
            {
                BoardInfo info = new BoardInfo();
                info.Name = RecipientNameLabel.Text;
                info.Text = MessageTextBox.Text;
                Network.Enqueue(new SendGuildHouseBoard
                {
                    Mode = 0,
                    Info = info
                });
                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();
            };
        }
Exemplo n.º 6
0
        public GuildReadLetterDialog()
        {
            Index    = 689;
            Library  = Libraries.Prguse;
            Size     = new Size(296, 252);
            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();
            };

            SenderNameLabel = new MirLabel
            {
                Parent     = this,
                Font       = new Font(Settings.FontName, 12f),
                ForeColour = Color.Goldenrod,
                Location   = new Point(10, 11),
                Size       = new Size(150, 20),
                NotControl = true
            };

            DateSentLabel = new MirLabel
            {
                Parent     = this,
                Font       = new Font(Settings.FontName, 8f),
                ForeColour = Color.White,
                Location   = new Point(10, 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(12, 55),
                Size         = new Size(265, 155),
                CanLoseFocus = true,
                ReadOnly     = true
            };
            MessageTextBox.MultiLine();

            DeleteButton = new MirButton
            {
                Index        = 540,
                HoverIndex   = 541,
                PressedIndex = 542,
                Parent       = this,
                Library      = Libraries.Title,
                Sound        = SoundList.ButtonA,
                Location     = new Point(144, 223)
            };
            DeleteButton.Click += (o, e) =>
            {
                bool flag = Info == null;
                if (!flag)
                {
                    Network.Enqueue(new SendGuildHouseBoard
                    {
                        Mode = 2,
                        Info = Info
                    });
                    Hide();
                }
            };

            ModifyButton = new MirButton
            {
                Index        = 193,
                HoverIndex   = 194,
                PressedIndex = 195,
                Parent       = this,
                Library      = Libraries.Title,
                Sound        = SoundList.ButtonA,
                Location     = new Point(214, 223)
            };
            ModifyButton.Click += (o, e) =>
            {
                Hide();
            };
        }