本文整理汇总了C#中Client.MirControls.MirTextBox类的典型用法代码示例。如果您正苦于以下问题:C# MirTextBox类的具体用法?C# MirTextBox怎么用?C# MirTextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MirTextBox类属于Client.MirControls命名空间,在下文中一共展示了MirTextBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReportDialog
public ReportDialog()
{
Index = 1633;
Library = Libraries.Prguse;
Movable = true;
Sort = true;
Location = Center;
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(336, 3),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA,
};
CloseButton.Click += (o, e) => Hide();
ReportType = new MirDropDownBox()
{
Parent = this,
Location = new Point(12, 35),
Size = new Size(170, 14),
ForeColour = Color.White,
Visible = true,
Enabled = true,
};
ReportType.Items.Add("Select Report Type.");
ReportType.Items.Add("Submit Bug");
ReportType.Items.Add("Report Player");
MessageArea = new MirTextBox
{
Parent = this,
Location = new Point(12, 57),
Size = new Size(330, 150),
Font = new Font(Settings.FontName, 8F),
};
MessageArea.MultiLine();
SendButton = new MirButton
{
Parent = this,
Library = Libraries.Title,
Index = 607,
HoverIndex = 608,
PressedIndex = 609,
Sound = SoundList.ButtonA,
Location = new Point(260, 219)
};
SendButton.Click += SendButton_Click;
}
示例2: MirInputBox
public MirInputBox(string message)
{
Modal = true;
Movable = false;
Index = 660;
Library = Libraries.Prguse;
Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
CaptionLabel = new MirLabel
{
DrawFormat = TextFormatFlags.WordBreak,
Location = new Point(25, 25),
Size = new Size(235, 40),
Parent = this,
Text = message,
};
InputTextBox = new MirTextBox
{
Parent = this,
Border = true,
BorderColour = Color.Lime,
Location = new Point(23, 86),
Size = new Size(240, 19),
MaxLength = 50,
};
InputTextBox.SetFocus();
InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress;
OKButton = new MirButton
{
HoverIndex = 201,
Index = 200,
Library = Libraries.Title,
Location = new Point(60, 123),
Parent = this,
PressedIndex = 202,
};
CancelButton = new MirButton
{
HoverIndex = 204,
Index = 203,
Library = Libraries.Title,
Location = new Point(160, 123),
Parent = this,
PressedIndex = 205,
};
CancelButton.Click += DisposeDialog;
}
示例3: MemoDialog
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
}
示例4: TrustMerchantDialog
public TrustMerchantDialog()
{
Index = 670;
Library = Libraries.Prguse;
Sort = true;
SearchTextBox = new MirTextBox
{
Location = new Point(19, 329),
Parent = this,
Size = new Size(104, 15),
MaxLength = 20,
CanLoseFocus = true
};
SearchTextBox.TextBox.KeyPress += SearchTextBox_KeyPress;
SearchTextBox.TextBox.KeyUp += SearchTextBox_KeyUp;
SearchTextBox.TextBox.KeyDown += SearchTextBox_KeyDown;
FindButton = new MirButton
{
HoverIndex = 481,
Index = 480,
Location = new Point(130, 325),
Library = Libraries.Title,
Parent = this,
PressedIndex = 482,
Sound = SoundList.ButtonA,
};
FindButton.Click += (o, e) =>
{
if (string.IsNullOrEmpty(SearchTextBox.Text)) return;
if (CMain.Time < SearchTime)
{
GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System);
return;
}
SearchTime = CMain.Time + Globals.SearchDelay;
Network.Enqueue(new C.MarketSearch
{
Match = SearchTextBox.Text,
});
};
RefreshButton = new MirButton
{
HoverIndex = 664,
Index = 663,
Location = new Point(190, 325),
Library = Libraries.Prguse,
Parent = this,
PressedIndex = 665,
Sound = SoundList.ButtonA,
};
RefreshButton.Click += (o, e) =>
{
if (CMain.Time < SearchTime)
{
GameScene.Scene.ChatDialog.ReceiveChat(string.Format("You can search again after {0} seconds.", Math.Ceiling((SearchTime - CMain.Time) / 1000D)), ChatType.System);
return;
}
SearchTime = CMain.Time + Globals.SearchDelay;
SearchTextBox.Text = string.Empty;
Network.Enqueue(new C.MarketRefresh());
};
MailButton = new MirButton
{
HoverIndex = 667,
Index = 666,
Location = new Point(225, 325),
Library = Libraries.Prguse,
Parent = this,
PressedIndex = 668,
Sound = SoundList.ButtonA,
Visible = false
};
BuyButton = new MirButton
{
HoverIndex = 484,
Index = 483,
Location = new Point(400, 325),
Library = Libraries.Title,
Parent = this,
PressedIndex = 485,
Sound = SoundList.ButtonA,
};
BuyButton.Click += (o, e) =>
{
if (Selected == null || CMain.Time < MarketTime) return;
if (UserMode)
{
if (Selected.Listing.Seller == "For Sale")
{
MirMessageBox box = new MirMessageBox(string.Format("{0} has not sold, Are you sure you want to get it back?", Selected.Listing.Item.Name), MirMessageBoxButtons.YesNo);
box.YesButton.Click += (o1, e2) =>
{
//.........这里部分代码省略.........
示例5: GuildDialog
public GuildDialog()
{
Index = 180;
Library = Libraries.Prguse;
Movable = true;
Sort = true;
Location = Center;
#region TabUI
NoticeButton = new MirButton
{
Library = Libraries.Title,
Index = 93,
PressedIndex = 94,
Sound = SoundList.ButtonA,
Parent = this,
Location = new Point(20, 38)
};
NoticeButton.Click += (o, e) => LeftDialog(0);
MembersButton = new MirButton
{
Library = Libraries.Title,
Index = 99,
PressedIndex = 100,
Sound = SoundList.ButtonA,
Parent = this,
Location = new Point(91, 38),
};
MembersButton.Click += (o, e) => LeftDialog(1);
StorageButton = new MirButton
{
Library = Libraries.Title,
Index = 105,
PressedIndex = 106,
Sound = SoundList.ButtonA,
Parent = this,
Location = new Point(162, 38),
Visible = false
};
StorageButton.Click += (o, e) => LeftDialog(2);
BuffsButton = new MirButton
{
Library = Libraries.Title,
Index = 526,
HoverIndex = 527,
PressedIndex = 528,
Sound = SoundList.ButtonA,
Parent = StatusPage,
Location = new Point(124, 63),
Visible = false,
};
BuffsButton.Click += (o, e) =>
{
GameScene.Scene.GuildBuffDialog.Show();
Hide();
};
RankButton = new MirButton // Ranks
{
Library = Libraries.Title,
Index = 101,
HoverIndex = 102,
Sound = SoundList.ButtonA,
Parent = this,
Location = new Point(233, 38),
Visible = false,
};
RankButton.Click += (o, e) => LeftDialog(3);
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(565, 4),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA
};
CloseButton.Click += (o, e) => Hide();
#endregion
#endregion
#region NoticePageUI
NoticePage = new MirImageControl()
{
Parent = this,
Size = new Size(352, 372),
Location = new Point(0, 60),
Visible = true
};
Notice = new MirTextBox()
{
ForeColour = Color.White,
Font = new Font(Settings.FontName, 8F),
Enabled = false,
Visible = true,
Parent = NoticePage,
Size = new Size(322, 330),
//.........这里部分代码省略.........
示例6: GuildDialog
//.........这里部分代码省略.........
Font = new Font(Settings.FontName, 8F),
Text = "",
Visible = true,
};
GuildName.BeforeDraw += (o, e) =>
{
if (MapControl.User.GuildName != "")
GuildName.Text = MapControl.User.GuildName;
else
GuildName.Text = "None";
};
#endregion
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(563, 6),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA
};
CloseButton.Click += (o, e) => Hide();
#region "notice tab"
NoticePage = new MirImageControl()
{
Parent = this,
Size = new Size(567, 368),
Location = new Point(13, 37),
Visible = true
};
Notice = new MirTextBox()
{
ForeColour = Color.White,
Font = new Font(Settings.FontName, 8F),
Enabled = false,
Visible = true,
Parent = NoticePage,
Size = new Size(550, 325),
Location = new Point(0, 0)
};
Notice.MultiLine();
NoticeEditButton = new MirButton
{
Visible = false,
Index = 85,
HoverIndex = 86,
PressedIndex = 84,
Library = Libraries.Title,
Sound = SoundList.ButtonA,
Parent = NoticePage,
Location = new Point(27, 337)
};
NoticeEditButton.Click += (o, e) => EditNotice();
NoticeSaveButton = new MirButton
{
Visible = false,
Index = 82,
HoverIndex = 83,
PressedIndex = 84,
Library = Libraries.Title,
Sound = SoundList.ButtonA,
示例7: ChatDialog
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
{
//.........这里部分代码省略.........
示例8: NewAccountDialog
public NewAccountDialog()
{
Index = 63;
Library = Libraries.Prguse;
Size = new Size();
Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
CancelButton = new MirButton
{
HoverIndex = 204,
Index = 203,
Library = Libraries.Title,
Location = new Point(409, 425),
Parent = this,
PressedIndex = 205
};
CancelButton.Click += (o, e) => Dispose();
OKButton = new MirButton
{
Enabled = false,
HoverIndex = 201,
Index = 200,
Library = Libraries.Title,
Location = new Point(135, 425),
Parent = this,
PressedIndex = 202,
};
OKButton.Click += (o, e) => CreateAccount();
AccountIDTextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(226, 104),
MaxLength = Globals.MaxAccountIDLength,
Parent = this,
Size = new Size(136, 18),
};
AccountIDTextBox.SetFocus();
AccountIDTextBox.TextBox.MaxLength = Globals.MaxAccountIDLength;
AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
AccountIDTextBox.TextBox.GotFocus += AccountIDTextBox_GotFocus;
Password1TextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(226, 130),
MaxLength = Globals.MaxPasswordLength,
Parent = this,
Password = true,
Size = new Size(136, 18),
TextBox = { MaxLength = Globals.MaxPasswordLength },
};
Password1TextBox.TextBox.TextChanged += Password1TextBox_TextChanged;
Password1TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus;
Password2TextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(226, 156),
MaxLength = Globals.MaxPasswordLength,
Parent = this,
Password = true,
Size = new Size(136, 18),
TextBox = { MaxLength = Globals.MaxPasswordLength },
};
Password2TextBox.TextBox.TextChanged += Password2TextBox_TextChanged;
Password2TextBox.TextBox.GotFocus += PasswordTextBox_GotFocus;
UserNameTextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(226, 190),
MaxLength = 20,
Parent = this,
Size = new Size(136, 18),
TextBox = { MaxLength = 20 },
};
UserNameTextBox.TextBox.TextChanged += UserNameTextBox_TextChanged;
UserNameTextBox.TextBox.GotFocus += UserNameTextBox_GotFocus;
BirthDateTextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(226, 216),
MaxLength = 10,
Parent = this,
Size = new Size(136, 18),
TextBox = { MaxLength = 10 },
};
BirthDateTextBox.TextBox.TextChanged += BirthDateTextBox_TextChanged;
BirthDateTextBox.TextBox.GotFocus += BirthDateTextBox_GotFocus;
QuestionTextBox = new MirTextBox
{
//.........这里部分代码省略.........
示例9: MirAmountBox
public MirAmountBox(string title, int image, uint max, uint min = 0, uint defaultAmount = 0)
{
ImageIndex = image;
MaxAmount = max;
MinAmount = min;
Amount = max;
Modal = true;
Movable = false;
Index = 238;
Library = Libraries.Prguse;
Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
TitleLabel = new MirLabel
{
AutoSize = true,
Location = new Point(19, 8),
Parent = this,
NotControl = true,
Text = title
};
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(180, 3),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA,
};
CloseButton.Click += (o, e) => Dispose();
ItemImage = new MirControl
{
Location = new Point(15, 34),
Size = new Size(38, 34),
Parent = this,
};
ItemImage.AfterDraw += (o, e) => DrawItem();
OKButton = new MirButton
{
HoverIndex = 201,
Index = 200,
Library = Libraries.Title,
Location = new Point(23, 76),
Parent = this,
PressedIndex = 202,
};
OKButton.Click += (o, e) => Dispose();
CancelButton = new MirButton
{
HoverIndex = 204,
Index = 203,
Library = Libraries.Title,
Location = new Point(110, 76),
Parent = this,
PressedIndex = 205,
};
CancelButton.Click += (o, e) => Dispose();
InputTextBox = new MirTextBox
{
Parent = this,
Border = true,
BorderColour = Color.Lime,
Location = new Point(58, 43),
Size = new Size(132, 19),
};
InputTextBox.SetFocus();
InputTextBox.TextBox.KeyPress += MirInputBox_KeyPress;
InputTextBox.TextBox.TextChanged += TextBox_TextChanged;
InputTextBox.Text = (defaultAmount > 0 && defaultAmount <= MaxAmount) ? defaultAmount.ToString() : MaxAmount.ToString();
InputTextBox.TextBox.SelectionStart = 0;
InputTextBox.TextBox.SelectionLength = InputTextBox.Text.Length;
}
示例10: MailComposeLetterDialog
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();
}
示例11: MailComposeParcelDialog
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),
//.........这里部分代码省略.........
示例12: GameShopDialog
//.........这里部分代码省略.........
CStartIndex++;
SetCategories();
UpdatePositionBar();
};
PositionBar = new MirButton
{
Index = 205,
HoverIndex = 206,
PressedIndex = 206,
Library = Libraries.Prguse2,
Location = new Point(120, 117),
Parent = this,
Movable = true,
Sound = SoundList.None,
Visible = true
};
PositionBar.OnMoving += PositionBar_OnMoving;
FilterBackground = new MirImageControl
{
Index = 769,
Library = Libraries.Title,
Location = new Point(11, 102),
Parent = this,
};
FilterBackground.MouseWheel += FilterScrolling;
Search = new MirTextBox
{
BackColour = Color.FromArgb(4, 4, 4),
ForeColour = Color.White,
Parent = this,
Size = new Size(140, 16),
Location = new Point(540, 69),
Font = new Font(Settings.FontName, 9F),
MaxLength = 23,
CanLoseFocus = true,
};
Search.TextBox.KeyUp += (o, e) =>
{
GetCategories();
};
allItems = new MirButton
{
Index = 770,
Library = Libraries.Title,
Location = new Point(138, 68),
Visible = true,
Parent = this,
Sound = SoundList.ButtonA,
};
allItems.Click += (o, e) =>
{
SectionFilter = "Show All";
ResetTabs();
GetCategories();
};
topItems = new MirButton
示例13: ChangePasswordDialog
public ChangePasswordDialog()
{
Index = 50;
Library = Libraries.Prguse;
Location = new Point((Settings.ScreenWidth - Size.Width) / 2, (Settings.ScreenHeight - Size.Height) / 2);
CancelButton = new MirButton
{
HoverIndex = 111,
Index = 110,
Library = Libraries.Title,
Location = new Point(222, 236),
Parent = this,
PressedIndex = 112
};
CancelButton.Click += (o, e) => Dispose();
OKButton = new MirButton
{
Enabled = false,
HoverIndex = 108,
Index = 107,
Library = Libraries.Title,
Location = new Point(80, 236),
Parent = this,
PressedIndex = 109,
};
OKButton.Click += (o, e) => ChangePassword();
AccountIDTextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(178, 76),
MaxLength = Globals.MaxAccountIDLength,
Parent = this,
Size = new Size(136, 18),
};
AccountIDTextBox.SetFocus();
AccountIDTextBox.TextBox.MaxLength = Globals.MaxAccountIDLength;
AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
CurrentPasswordTextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(178, 114),
MaxLength = Globals.MaxPasswordLength,
Parent = this,
Password = true,
Size = new Size(136, 18),
TextBox = { MaxLength = Globals.MaxPasswordLength },
};
CurrentPasswordTextBox.TextBox.TextChanged += CurrentPasswordTextBox_TextChanged;
NewPassword1TextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(178, 152),
MaxLength = Globals.MaxPasswordLength,
Parent = this,
Password = true,
Size = new Size(136, 18),
TextBox = { MaxLength = Globals.MaxPasswordLength },
};
NewPassword1TextBox.TextBox.TextChanged += NewPassword1TextBox_TextChanged;
NewPassword2TextBox = new MirTextBox
{
Border = true,
BorderColour = Color.Gray,
Location = new Point(178, 189),
MaxLength = Globals.MaxPasswordLength,
Parent = this,
Password = true,
Size = new Size(136, 18),
TextBox = { MaxLength = Globals.MaxPasswordLength },
};
NewPassword2TextBox.TextBox.TextChanged += NewPassword2TextBox_TextChanged;
}
示例14: LoginDialog
public LoginDialog()
{
Index = 1084;
Library = Libraries.Prguse;
Location = new Point((Settings.ScreenWidth - Size.Width)/2, (Settings.ScreenHeight - Size.Height)/2);
TitleLabel = new MirImageControl
{
Index = 30,
Library = Libraries.Title,
Parent = this,
};
TitleLabel.Location = new Point((Size.Width - TitleLabel.Size.Width)/2, 5);
AccountIDLabel = new MirImageControl
{
Index = 31,
Library = Libraries.Title,
Parent = this,
Location = new Point(51, 82),
};
PassLabel = new MirImageControl
{
Index = 32,
Library = Libraries.Title,
Parent = this,
Location = new Point(46, 109)
};
OKButton = new MirButton
{
Enabled = false,
HoverIndex = 321,
Index = 320,
Library = Libraries.Title,
Location = new Point(227, 83),
Parent = this,
PressedIndex = 322
};
OKButton.Click += (o, e) => Login();
AccountButton = new MirButton
{
HoverIndex = 324,
Index = 323,
Library = Libraries.Title,
Location = new Point(60, 163),
Parent = this,
PressedIndex = 325,
};
PassButton = new MirButton
{
HoverIndex = 327,
Index = 326,
Library = Libraries.Title,
Location = new Point(166, 163),
Parent = this,
PressedIndex = 328,
};
ViewKeyButton = new MirButton
{
HoverIndex = 333,
Index = 332,
Library = Libraries.Title,
Location = new Point(60, 189),
Parent = this,
PressedIndex = 334,
};
CloseButton = new MirButton
{
HoverIndex = 330,
Index = 329,
Library = Libraries.Title,
Location = new Point(166, 189),
Parent = this,
PressedIndex = 331,
};
CloseButton.Click += (o, e) => Program.Form.Close();
AccountIDTextBox = new MirTextBox
{
Location = new Point(85, 85),
Parent = this,
Size = new Size(136, 15),
MaxLength = Globals.MaxAccountIDLength
};
AccountIDTextBox.SetFocus();
AccountIDTextBox.TextBox.TextChanged += AccountIDTextBox_TextChanged;
AccountIDTextBox.TextBox.KeyPress += TextBox_KeyPress;
AccountIDTextBox.Text = Settings.AccountID;
PasswordTextBox = new MirTextBox
{
Location = new Point(85, 108),
Parent = this,
Password = true,
//.........这里部分代码省略.........
示例15: NewCharacterDialog
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();
};
//.........这里部分代码省略.........