public static void CMain_MouseDown(object sender, MouseEventArgs e) { if (Program.Form.ActiveControl is TextBox) { MirTextBox textBox = Program.Form.ActiveControl.Tag as MirTextBox; if (textBox != null && textBox.CanLoseFocus) { Program.Form.ActiveControl = null; } } if (e.Button == MouseButtons.Right && (GameScene.SelectedCell != null || GameScene.PickedUpGold)) { GameScene.SelectedCell = null; GameScene.PickedUpGold = false; return; } try { if (MirScene.ActiveScene != null) { MirScene.ActiveScene.OnMouseDown(e); } } catch (Exception ex) { SaveError(ex.ToString()); } }
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; }
protected override void Dispose(bool disposing) { if (disposing) { CoordinateLabel = null; CloseButton = null; ScrollUpButton = null; ScrollDownButton = null; ScrollBar = null; WorldButton = null; MyLocationButton = null; TeleportToButton = null; SearchButton = null; SearchTextBox = null; TitleLabel = null; } base.Dispose(disposing); }
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(); }
public GameShopDialog() { GameScene.GameShopInfoList.Clear(); Index = 749; Library = Libraries.Title; Movable = true; Location = Center; Sort = true; TitleLabel = new MirImageControl { Index = 26, Library = Libraries.Title, 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.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, 9F), }; 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, 9F) }; 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 = "显示所有"; 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 = "热消"; 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 = "打折"; 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 = "新品"; 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 = "显示所有"; TypeFilter = "显示所有"; 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 = "战士"; TypeFilter = "显示所有"; 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 = "刺客"; TypeFilter = "显示所有"; 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 = "道士"; TypeFilter = "显示所有"; 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 = "法师"; TypeFilter = "显示所有"; 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 = "弓箭手"; TypeFilter = "显示所有"; 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, 9F), }; 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, 9F), }; 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(); }
public TrustMerchantDialog() { Index = 670; Library = Libraries.Prguse; Sort = true; TitleLabel = new MirImageControl { Index = 24, Library = Libraries.Title, Location = new Point(18, 9), Parent = this }; 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.FriendlyName), 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.FriendlyName, 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), }; }
static LoginDialog() { LoginWindow = new MirImageControl { Index = 1084, Library = Libraries.Prguse, Parent = LoginScene.Background, }; LoginWindow.Location = new Point((Settings.ScreenSize.Width - LoginWindow.Size.Width) / 2, (Settings.ScreenSize.Height - LoginWindow.Size.Height) / 2); Title = new MirImageControl { Index = 30, Library = Libraries.Title, Parent = LoginWindow, }; Title.Location = new Point((LoginWindow.Size.Width - Title.Size.Width) / 2, 5); NewAccountButton = new MirButton { HoverIndex = 324, Index = 323, Library = Libraries.Title, Location = new Point(60, 163), Parent = LoginWindow, PressedIndex = 325 }; NewAccountButton.Click += NewAccountButton_Click; LoginButton = new MirButton { Enabled = false, HoverIndex = 321, Index = 320, Library = Libraries.Title, Location = new Point(227, 83), Parent = LoginWindow, PressedIndex = 322, }; LoginButton.Click += new EventHandler(LoginButton_Click); ChangePasswordButton = new MirButton { HoverIndex = 327, Index = 326, Library = Libraries.Title, Location = new Point(166, 163), Parent = LoginWindow, PressedIndex = 328 }; ChangePasswordButton.Click += ChangePasswordButton_Click; CloseButton = new MirButton { HoverIndex = 330, Index = 329, Library = Libraries.Title, Location = new Point(166, 189), Parent = LoginWindow, PressedIndex = 331, Size = new Size(100, 24) }; CloseButton.Click += (o, e) => SceneFunctions.QuitGame(); AccountIDTextBox = new MirTextBox { Location = new Point(85, 85), Parent = LoginWindow, Size = new Size(136, 15) }; AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged; AccountIDTextBox.TextBox.KeyPress += TextBox_KeyPress; AccountIDTextBox.SetFocus(); PasswordTextBox = new MirTextBox { Location = new Point(85, 108), Parent = LoginWindow, Password = true, Size = new Size(136, 15) }; PasswordTextBox.TextBox.TextChanged += PasswordTextBox_TextChanged; PasswordTextBox.TextBox.KeyPress += TextBox_KeyPress; }
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); } }
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, }; }
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(); }
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(); }; }
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; }
static ChangePasswordDialog() { ChangePasswordWindow = new MirImageControl { Index = 50, Library = Libraries.Prguse, Parent = LoginScene.Background, Visible = false }; ChangePasswordWindow.Location = new Point((Settings.ScreenSize.Width - ChangePasswordWindow.Size.Width) / 2, (Settings.ScreenSize.Height - ChangePasswordWindow.Size.Height) / 2); CancelButton = new MirButton { HoverIndex = 111, Index = 110, Library = Libraries.Title, Location = new Point(222, 236), Parent = ChangePasswordWindow, PressedIndex = 112 }; CancelButton.Click += CancelButton_Click; ConfirmButton = new MirButton { Enabled = false, HoverIndex = 108, Index = 107, Library = Libraries.Title, Location = new Point(80, 236), Parent = ChangePasswordWindow, PressedIndex = 109, }; ConfirmButton.Click += ConfirmButton_Click; AccountIDTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(178, 76), MaxLength = Globals.MaxAccountIDLength, Parent = ChangePasswordWindow, Size = new Size(136, 18), }; AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged; CurrentPasswordTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(178, 114), MaxLength = Globals.MaxPasswordLength, Parent = ChangePasswordWindow, Password = true, Size = new Size(136, 18), }; CurrentPasswordTextBox.TextBox.TextChanged += CurrentPasswordTextBox_TextChanged; NewPassword1TextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(178, 152), MaxLength = Globals.MaxPasswordLength, Parent = ChangePasswordWindow, Password = true, Size = new Size(136, 18), }; NewPassword1TextBox.TextBox.TextChanged += NewPassword1TextBox_TextChanged; NewPassword2TextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(178, 189), MaxLength = Globals.MaxPasswordLength, Parent = ChangePasswordWindow, Password = true, Size = new Size(136, 18), }; NewPassword2TextBox.TextBox.TextChanged += NewPassword2TextBox_TextChanged; }
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(); }
static NewAccountDialog() { NewAccountWindow = new MirImageControl { Index = 63, Library = Libraries.Prguse, Parent = LoginScene.Background, Visible = false }; NewAccountWindow.Location = new Point((Settings.ScreenSize.Width - NewAccountWindow.Size.Width) / 2, (Settings.ScreenSize.Height - NewAccountWindow.Size.Height) / 2); CancelButton = new MirButton { HoverIndex = 204, Index = 203, Library = Libraries.Title, Location = new Point(409, 425), Parent = NewAccountWindow, PressedIndex = 205 }; CancelButton.Click += CancelButton_Click; ConfirmButton = new MirButton { Enabled = false, HoverIndex = 201, Index = 200, Library = Libraries.Title, Location = new Point(135, 425), Parent = NewAccountWindow, PressedIndex = 202, }; ConfirmButton.Click += ConfirmButton_Click; AccountIDTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 104), MaxLength = Globals.MaxAccountIDLength, Parent = NewAccountWindow, Size = new Size(136, 18), }; AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged; AccountIDTextBox.TextBox.GotFocus += AccountIDTextBox_GotFocus; Password1TextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 130), MaxLength = Globals.MaxPasswordLength, Parent = NewAccountWindow, Password = true, Size = new Size(136, 18), }; Password1TextBox.TextBox.TextChanged += Password1TextBox_TextChanged; Password1TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus; Password2TextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 156), MaxLength = Globals.MaxPasswordLength, Parent = NewAccountWindow, Password = true, Size = new Size(136, 18), }; Password2TextBox.TextBox.TextChanged += Password2TextBox_TextChanged; Password2TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus; UserNameTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 190), MaxLength = 20, Parent = NewAccountWindow, Size = new Size(136, 18), }; UserNameTextBox.TextBox.TextChanged += UserNameTextBox_TextChanged; UserNameTextBox.TextBox.GotFocus += UserNameTextBox_GotFocus; BirthDateTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 216), MaxLength = 10, Parent = NewAccountWindow, Size = new Size(136, 18), }; BirthDateTextBox.TextBox.TextChanged += BirthDateTextBox_TextChanged; BirthDateTextBox.TextBox.GotFocus += BirthDateTextBox_GotFocus; QuestionTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 251), MaxLength = 30, Parent = NewAccountWindow, Size = new Size(190, 18), }; QuestionTextBox.TextBox.TextChanged += QuestionTextBox_TextChanged; QuestionTextBox.TextBox.GotFocus += QuestionTextBox_GotFocus; AnswerTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 277), MaxLength = 30, Parent = NewAccountWindow, Size = new Size(190, 18), }; AnswerTextBox.TextBox.TextChanged += AnswerTextBox_TextChanged; AnswerTextBox.TextBox.GotFocus += AnswerTextBox_GotFocus; EMailTextBox = new MirTextBox { Border = true, BorderColor = Color.Gray, Location = new Point(226, 312), MaxLength = 50, Parent = NewAccountWindow, Size = new Size(136, 18), }; EMailTextBox.TextBox.TextChanged += EMailTextBox_TextChanged; EMailTextBox.TextBox.GotFocus += EMailTextBox_GotFocus; Description = new MirLabel { Border = true, BorderColor = Color.Gray, Location = new Point(15, 340), Parent = NewAccountWindow, Size = new Size(300, 70), Visible = false }; }
public BigMapDialog() { Index = 820; Library = Libraries.Title; Sort = true; Location = Center; NotControl = false; ScrollUpButton = new MirButton { Index = 197, HoverIndex = 198, PressedIndex = 199, Location = new Point(Size.Width - 21, 48), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; ScrollUpButton.Click += (o, e) => ScrollUp(); ScrollDownButton = new MirButton { Index = 207, HoverIndex = 208, PressedIndex = 209, Location = new Point(Size.Width - 21, 417), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; ScrollDownButton.Click += (o, e) => ScrollDown(); ScrollBar = new MirButton { Index = 205, HoverIndex = 206, PressedIndex = 206, Location = new Point(Size.Width - 21, ScrollUpButton.Location.Y + 13), Library = Libraries.Prguse2, Parent = this, Movable = true, Sound = SoundList.ButtonA, }; ScrollBar.OnMoving += (o, e) => { var y = ScrollBar.Location.Y; if (y < 61) { y = 61; } if (y > 398) { y = 398; } var row = (y - ScrollUpButton.Location.Y + 13) / GapPerRow; ScrollOffset = (int)row; SetNPCButtonVisibility(true); }; WorldButton = new MirButton { Index = 827, HoverIndex = 828, PressedIndex = 829, Location = new Point(250, Size.Height - 33), Library = Libraries.Title, Parent = this, Sound = SoundList.ButtonA, }; WorldButton.Click += (o, e) => OpenWorldMap(); MyLocationButton = new MirButton { Index = 824, HoverIndex = 825, PressedIndex = 826, Location = new Point(400, Size.Height - 33), Library = Libraries.Title, Parent = this, Sound = SoundList.ButtonA, }; MyLocationButton.Click += (o, e) => TargetMyLocation(); TeleportToButton = new MirButton { Index = 821, HoverIndex = 822, PressedIndex = 823, DisabledIndex = 823, Enabled = false, Location = new Point(Size.Width - 122, 432), Library = Libraries.Title, Parent = this, Sound = SoundList.ButtonA, }; TeleportToButton.Click += (o, e) => TeleportToNPC(); SearchButton = new MirButton { Index = 1340, HoverIndex = 1341, PressedIndex = 1342, Enabled = false, Location = new Point(23, Size.Height - 36), Library = Libraries.Prguse2, Parent = this, Sound = SoundList.ButtonA, }; SearchButton.Click += (o, e) => Search(); SearchTextBox = new MirTextBox { Location = new Point(59, Size.Height - 27), Parent = this, Font = new Font(Settings.FontName, 8F), Size = new Size(130, 10), MaxLength = Globals.MaxChatLength }; SearchTextBox.TextBox.TextChanged += SearchTextBox_TextChanged; SearchTextBox.TextBox.KeyPress += SearchTextBox_KeyPress; ViewPort = new BigMapViewPort() { Parent = this }; CoordinateLabel = new MirLabel { AutoSize = true, ForeColour = Color.White, Location = new Point(519, 435), Parent = this, }; TitleLabel = new MirLabel { ForeColour = Color.White, Parent = this, AutoSize = false, Size = new Size(699, 20), Location = new Point(19, 6), Font = new Font(Settings.FontName, 9F, FontStyle.Bold), DrawFormat = TextFormatFlags.HorizontalCenter }; WorldMap = new WorldMapImage() { Parent = this, Location = new Point(10, 0) }; CloseButton = new MirButton { HoverIndex = 361, Index = 360, Location = new Point(Size.Width - 25, 3), Library = Libraries.Prguse2, Parent = this, PressedIndex = 362, Sound = SoundList.ButtonA, }; CloseButton.Click += (o, e) => Hide(); }
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 }
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(); }; }
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(); }; }
static NewCharacterDialog() { Reg = new Regex(@"^[A-Za-z0-9]{" + Globals.MinCharacterNameLength + "," + Globals.MaxCharacterNameLength + "}$"); NewCharacterWindow = new MirImageControl { Index = 73, Library = Libraries.Prguse, Parent = SelectScene.Background, Visible = false, }; NewCharacterWindow.Location = new Point((Settings.ScreenSize.Width - NewCharacterWindow.Size.Width) / 2, (Settings.ScreenSize.Height - NewCharacterWindow.Size.Height) / 2); NewCharacterTitle = new MirImageControl { Index = 20, Library = Libraries.Title, Location = new Point(193, 7), Parent = NewCharacterWindow, }; CancelButton = new MirButton { HoverIndex = 364, Index = 363, Library = Libraries.Title, Location = new Point(425, 425), Parent = NewCharacterWindow, PressedIndex = 365 }; CancelButton.Click += CancelButton_Click; ConfirmButton = new MirButton { Enabled = false, HoverIndex = 361, Index = 360, Library = Libraries.Title, Location = new Point(160, 425), Parent = NewCharacterWindow, PressedIndex = 362, }; ConfirmButton.Click += new EventHandler(ConfirmButton_Click); CharacterNameTextBox = new MirTextBox { Location = new Point(357, 269), Parent = NewCharacterWindow, Size = new Size(190, 15), MaxLength = Globals.MaxCharacterNameLength }; CharacterNameTextBox.TextBox.KeyPress += TextBox_KeyPress; CharacterNameTextBox.TextBox.TextChanged += CharacterNameTextBox_TextChanged; CharacterNameTextBox.SetFocus(); CharacterDisplay = new MirAnimatedControl { Animated = true, AnimationCount = 16, AnimationDelay = 250, Index = 20, Library = Libraries.ChrSel, Location = new Point(120, 250), Parent = NewCharacterWindow, UseOffSet = true, }; CharacterDisplay.AfterDraw += SelectScene.CharacterDisplay_GlowEffect; WarriorButton = new MirButton { HoverIndex = 2427, Index = 2427, Library = Libraries.Prguse, Location = new Point(355, 296), Parent = NewCharacterWindow, PressedIndex = 2428, Sound = SoundList.ClickA, }; WarriorButton.Click += new EventHandler(WarriorButton_Click); WizardButton = new MirButton { HoverIndex = 2430, Index = 2429, Library = Libraries.Prguse, Location = new Point(405, 296), Parent = NewCharacterWindow, PressedIndex = 2431, Sound = SoundList.ClickA, }; WizardButton.Click += new EventHandler(WizardButton_Click); TaoistButton = new MirButton { HoverIndex = 2433, Index = 2432, Library = Libraries.Prguse, Location = new Point(455, 296), Parent = NewCharacterWindow, PressedIndex = 2434, Sound = SoundList.ClickA, }; TaoistButton.Click += new EventHandler(TaoistButton_Click); AssassinButton = new MirButton { HoverIndex = 2436, Index = 2435, Library = Libraries.Prguse, Location = new Point(505, 296), Parent = NewCharacterWindow, PressedIndex = 2437, Sound = SoundList.ClickA, }; AssassinButton.Click += new EventHandler(AssassinButton_Click); MaleButton = new MirButton { HoverIndex = 2421, Index = 2421, Library = Libraries.Prguse, Location = new Point(355, 343), Parent = NewCharacterWindow, PressedIndex = 2422, Sound = SoundList.ClickA, }; MaleButton.Click += new EventHandler(MaleButton_Click); FemaleButton = new MirButton { HoverIndex = 2424, Index = 2423, Library = Libraries.Prguse, Location = new Point(405, 343), Parent = NewCharacterWindow, PressedIndex = 2425, Sound = SoundList.ClickA, }; FemaleButton.Click += new EventHandler(FemaleButton_Click); Description = new MirLabel { Border = true, BorderColor = Color.FromArgb(53, 49, 41), DrawFormat = DrawTextFormat.WordBreak, Location = new Point(279, 70), Parent = NewCharacterWindow, Size = new Size(278, 170), Text = Settings.WarriorDescription, }; }
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; }
public static void Create() { Window = new MirImageControl { Index = 2201, Library = Libraries.Prguse, Parent = GameScene.Scene, Location = new Point(230, 503), Visible = true }; ChatTextBox = new MirTextBox { BackColor = Color.LightGray, ForeColor = Color.Black, Parent = Window, Size = new Size(403, 13), Location = new Point(1, 54), MaxLength = Globals.MaxChatLength, Visible = false, }; ChatTextBox.TextBox.Font = new Font("Microsoft Sans Serif", 8F); ChatTextBox.TextBox.KeyPress += ChatTextBox_KeyPress; ControlBar = new MirImageControl { Index = 2035, Library = Libraries.Prguse, Parent = GameScene.Scene, Location = new Point(230, 488), Visible = true }; SizeButton = new MirButton { Index = 2057, HoverIndex = 2058, PressedIndex = 2059, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(350, 1), Visible = true }; SizeButton.Click += SizeButton_Click; SettingsButton = new MirButton { Index = 2060, HoverIndex = 2061, PressedIndex = 2062, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(372, 1), Visible = true }; SettingsButton.Click += SettingsButton_Click; NormalButton = new MirButton { Index = 2037, HoverIndex = 2037, PressedIndex = 2038, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(12, 1), Visible = true }; NormalButton.Click += NormalButton_Click; ShoutButton = new MirButton { Index = 2039, HoverIndex = 2040, PressedIndex = 2041, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(34, 1), Visible = true }; ShoutButton.Click += ShoutButton_Click; WhisperButton = new MirButton { Index = 2042, HoverIndex = 2043, PressedIndex = 2044, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(56, 1), Visible = true }; WhisperButton.Click += WhisperButton_Click; LoverButton = new MirButton { Index = 2045, HoverIndex = 2046, PressedIndex = 2047, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(78, 1), Visible = true }; LoverButton.Click += LoverButton_Click; MentorButton = new MirButton { Index = 2048, HoverIndex = 2049, PressedIndex = 2050, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(100, 1), Visible = true }; MentorButton.Click += MentorButton_Click; GroupButton = new MirButton { Index = 2051, HoverIndex = 2052, PressedIndex = 2053, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(122, 1), Visible = true }; GroupButton.Click += GroupButton_Click; GuildButton = new MirButton { Index = 2054, HoverIndex = 2055, PressedIndex = 2056, Library = Libraries.Prguse, Parent = ControlBar, Location = new Point(144, 1), Visible = true }; GuildButton.Click += GuildButton_Click; for (int I = 0; I < ChatLines.Length; I++) { ChatLines[I] = new MirLabel { AutoSize = true, BackColor = Color.White, ForeColor = Color.Black, OutLine = false, // Size = new Size(403, 13), Parent = Window, Location = new Point(1, 2 + I * 12), Font = new Font("Microsoft Sans Serif", 8F), Visible = I < LineCount, } } ; }