本文整理汇总了C#中Client.MirControls.MirInputBox.Show方法的典型用法代码示例。如果您正苦于以下问题:C# MirInputBox.Show方法的具体用法?C# MirInputBox.Show怎么用?C# MirInputBox.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.MirControls.MirInputBox
的用法示例。
在下文中一共展示了MirInputBox.Show方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewIntelligentCreature
private void NewIntelligentCreature(S.NewIntelligentCreature p)//IntelligentCreature
{
User.IntelligentCreatures.Add(p.Creature);
MirInputBox inputBox = new MirInputBox("Please give your creature a name.");
inputBox.InputTextBox.Text = GameScene.User.IntelligentCreatures[User.IntelligentCreatures.Count-1].CustomName;
inputBox.OKButton.Click += (o1, e1) =>
{
if (IntelligentCreatureDialog.Visible) IntelligentCreatureDialog.Update();//refresh changes
GameScene.User.IntelligentCreatures[User.IntelligentCreatures.Count - 1].CustomName = inputBox.InputTextBox.Text;
Network.Enqueue(new C.UpdateIntelligentCreature { Creature = GameScene.User.IntelligentCreatures[User.IntelligentCreatures.Count - 1] });
inputBox.Dispose();
};
inputBox.Show();
}
示例2: GuildRequestWar
private void GuildRequestWar(S.GuildRequestWar p)
{
MirInputBox inputBox = new MirInputBox("Please enter the guild you would like to go to war with.");
inputBox.OKButton.Click += (o, e) =>
{
Network.Enqueue(new C.GuildWarReturn { Name = inputBox.InputTextBox.Text });
inputBox.Dispose();
};
inputBox.Show();
}
示例3: MailSendRequest
private void MailSendRequest(S.MailSendRequest p)
{
MirInputBox inputBox = new MirInputBox("Please enter the name of the person you would like to mail.");
inputBox.OKButton.Click += (o1, e1) =>
{
GameScene.Scene.MailComposeParcelDialog.ComposeMail(inputBox.InputTextBox.Text);
GameScene.Scene.InventoryDialog.Show();
//open letter dialog, pass in name
inputBox.Dispose();
};
inputBox.Show();
}
示例4: NPCRequestInput
private void NPCRequestInput(S.NPCRequestInput p)
{
MirInputBox inputBox = new MirInputBox("Please enter the required information.");
inputBox.OKButton.Click += (o1, e1) =>
{
Network.Enqueue(new C.NPCConfirmInput { Value = inputBox.InputTextBox.Text, NPCID = p.NPCID, PageName = p.PageName });
inputBox.Dispose();
};
inputBox.Show();
}
示例5: GuildNameRequest
private void GuildNameRequest(S.GuildNameRequest p)
{
MirInputBox inputBox = new MirInputBox("Please enter a guild name, length must be 3~20 characters.");
inputBox.InputTextBox.TextBox.KeyPress += (o, e) =>
{
string Allowed = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (!Allowed.Contains(e.KeyChar))
e.Handled = true;
};
inputBox.OKButton.Click += (o, e) =>
{
if (inputBox.InputTextBox.Text.Contains('\\'))
{
ChatDialog.ReceiveChat("You cannot use the \\ sign in a guildname!", ChatType.System);
inputBox.InputTextBox.Text = "";
}
Network.Enqueue(new C.GuildNameReturn { Name = inputBox.InputTextBox.Text });
inputBox.Dispose();
};
inputBox.Show();
}
示例6: FriendDialog
//.........这里部分代码省略.........
HoverIndex = 361,
Index = 360,
Location = new Point(237, 3),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA,
};
CloseButton.Click += (o, e) => Hide();
AddButton = new MirButton
{
Index = 554,
HoverIndex = 555,
PressedIndex = 556,
Library = Libraries.Prguse,
Location = new Point(60, 241),
Parent = this,
Sound = SoundList.ButtonA
};
AddButton.Click += (o, e) =>
{
;
string message = string.Format("Please enter the name of the person you would like to {0}.", _blockedTab ? "block" : "add");
MirInputBox inputBox = new MirInputBox(message);
inputBox.OKButton.Click += (o1, e1) =>
{
Network.Enqueue(new C.AddFriend { Name = inputBox.InputTextBox.Text, Blocked = _blockedTab });
inputBox.Dispose();
};
inputBox.Show();
};
RemoveButton = new MirButton
{
Index = 557,
HoverIndex = 558,
PressedIndex = 559,
Library = Libraries.Prguse,
Location = new Point(88, 241),
Parent = this,
Sound = SoundList.ButtonA
};
RemoveButton.Click += (o, e) =>
{
if (SelectedFriend == null) return;
MirMessageBox messageBox = new MirMessageBox(string.Format("Are you sure you wish to remove '{0}'?", SelectedFriend.Name), MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o1, e1) =>
{
Network.Enqueue(new C.RemoveFriend { CharacterIndex = SelectedFriend.Index });
messageBox.Dispose();
};
messageBox.Show();
};
MemoButton = new MirButton
{
Index = 560,
HoverIndex = 561,
PressedIndex = 562,
示例7: MentorDialog
public MentorDialog()
{
Index = 170;
Library = Libraries.Prguse;
Movable = true;
Sort = true;
Location = Center;
TitleLabel = new MirImageControl
{
Index = 51,
Library = Libraries.Title,
Location = new Point(18, 4),
Parent = this
};
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(219, 3),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA,
};
CloseButton.Click += (o, e) => Hide();
AllowButton = new MirButton
{
HoverIndex = 115,
Index = 114,
Location = new Point(30, 178),
Library = Libraries.Prguse,
Parent = this,
PressedIndex = 116,
Sound = SoundList.ButtonA,
Hint = "Allow/Disallow Mentor Requests",
};
AllowButton.Click += (o, e) =>
{
if (AllowButton.Index == 116)
{
AllowButton.Index = 117;
AllowButton.HoverIndex = 118;
AllowButton.PressedIndex = 119;
}
else
{
AllowButton.Index = 114;
AllowButton.HoverIndex = 115;
AllowButton.PressedIndex = 116;
}
Network.Enqueue(new C.AllowMentor());
};
AddButton = new MirButton
{
HoverIndex = 214,
Index = 213,
Location = new Point(60, 178),
Library = Libraries.Title,
Parent = this,
PressedIndex = 215,
Sound = SoundList.ButtonA,
Hint = "Add Mentor",
};
AddButton.Click += (o, e) =>
{
if (MentorLevel != 0)
{
GameScene.Scene.ChatDialog.ReceiveChat("You already have a Mentor.", ChatType.System);
return;
}
string message = "Please enter the name of the person you would like to be your Mentor.";
MirInputBox inputBox = new MirInputBox(message);
inputBox.OKButton.Click += (o1, e1) =>
{
Network.Enqueue(new C.AddMentor { Name = inputBox.InputTextBox.Text });
inputBox.Dispose();
};
inputBox.Show();
};
RemoveButton = new MirButton
{
HoverIndex = 217,
Index = 216,
Location = new Point(135, 178),
Library = Libraries.Title,
//.........这里部分代码省略.........
示例8: ButtonClick
private void ButtonClick(object sender, EventArgs e)
{
int selectedCreature = BeforeAfterDraw();
if (selectedCreature < 0) return;
bool needSummon = false, needDismiss = false, needRelease = false, needUpdate = false;
if (sender == CreatureRenameButton)
{
MirInputBox inputBox = new MirInputBox("Please enter a new name for the creature.");
inputBox.InputTextBox.Text = GameScene.User.IntelligentCreatures[selectedCreature].CustomName;
inputBox.OKButton.Click += (o1, e1) =>
{
Update();//refresh changes
GameScene.User.IntelligentCreatures[selectedCreature].CustomName = inputBox.InputTextBox.Text;
Network.Enqueue(new C.UpdateIntelligentCreature { Creature = GameScene.User.IntelligentCreatures[selectedCreature] });
inputBox.Dispose();
};
inputBox.Show();
CreatureRenameButton.Visible = false;
return;
}
if (sender == SummonButton)
{
//if (GameScene.User.IntelligentCreatures[selectedCreature].Fullness == 0)
//{
// GameScene.Scene.ChatDialog.ReceiveChat((string.Format("Creature {0} is starving, revitalize first.", GameScene.User.IntelligentCreatures[selectedCreature].CustomName)), ChatType.System);
//}
needSummon = true;
needUpdate = true;
SummonButton.Enabled = false;
DismissButton.Enabled = true;
DismissButton.Visible = true;
}
if (sender == DismissButton)
{
needDismiss = true;
needUpdate = true;
SummonButton.Enabled = true;
DismissButton.Enabled = false;
DismissButton.Visible = false;
}
if (sender == ReleaseButton)
{
MirInputBox verificationBox = new MirInputBox("Please enter the creature's name for verification.");
verificationBox.OKButton.Click += (o1, e1) =>
{
if (String.Compare(verificationBox.InputTextBox.Text, GameScene.User.IntelligentCreatures[selectedCreature].CustomName, StringComparison.OrdinalIgnoreCase) != 0)
{
GameScene.Scene.ChatDialog.ReceiveChat("Verification Failed!!", ChatType.System);
}
else
{
//clear all and get new info after server got update
for (int i = 0; i < CreatureButtons.Length; i++) CreatureButtons[i].Clear();
Hide();
Network.Enqueue(new C.UpdateIntelligentCreature { Creature = GameScene.User.IntelligentCreatures[selectedCreature], ReleaseMe = true });
}
verificationBox.Dispose();
};
verificationBox.Show();
return;
}
if (sender == SemiAutoModeButton)
{
//make sure rules allow Automatic Mode
if (!GameScene.User.IntelligentCreatures[selectedCreature].CreatureRules.AutoPickupEnabled) return;
//turn on automatic pickupmode
SemiAutoModeButton.Visible = false;
AutomaticModeButton.Visible = true;
GameScene.User.IntelligentCreatures[selectedCreature].petMode = IntelligentCreaturePickupMode.Automatic;
needUpdate = true;
}
if (sender == AutomaticModeButton)
{
//make sure rules allow SemiAutomatic Mode
if (!GameScene.User.IntelligentCreatures[selectedCreature].CreatureRules.SemiAutoPickupEnabled) return;
//turn on semiauto pickupmode
AutomaticModeButton.Visible = false;
SemiAutoModeButton.Visible = true;
GameScene.User.IntelligentCreatures[selectedCreature].petMode = IntelligentCreaturePickupMode.SemiAutomatic;
needUpdate = true;
}
if (sender == OptionsMenuButton)
{
//show ItemFilter
if (!GameScene.Scene.IntelligentCreatureOptionsDialog.Visible) GameScene.Scene.IntelligentCreatureOptionsDialog.Show(GameScene.User.IntelligentCreatures[selectedCreature].Filter);
if (!GameScene.Scene.IntelligentCreatureOptionsGradeDialog.Visible) GameScene.Scene.IntelligentCreatureOptionsGradeDialog.Show(GameScene.User.IntelligentCreatures[selectedCreature].Filter.PickupGrade);
}
if (needUpdate)
{
Update();//refresh changes
Network.Enqueue(new C.UpdateIntelligentCreature { Creature = GameScene.User.IntelligentCreatures[selectedCreature], SummonMe = needSummon, UnSummonMe = needDismiss, ReleaseMe = needRelease });
}
//.........这里部分代码省略.........
示例9: DelMember
private void DelMember()
{
if (GroupList.Count > 0 && GroupList[0] != MapObject.User.Name)
{
GameScene.Scene.ChatDialog.ReceiveChat("You are not the leader of your group.", ChatType.System);
return;
}
MirInputBox inputBox = new MirInputBox("Please enter the name of the person you wish to group.");
inputBox.OKButton.Click += (o, e) =>
{
Network.Enqueue(new C.DelMember { Name = inputBox.InputTextBox.Text });
inputBox.Dispose();
};
inputBox.Show();
}
示例10: AddMember
public void AddMember()
{
if (!MyOptions.HasFlag(RankOptions.CanRecruit)) return;
if (LastGuildMsg > CMain.Time) return;
MirInputBox messageBox = new MirInputBox("Who would you like to invite to the guild?");
messageBox.OKButton.Click += (o, e) =>
{
Network.Enqueue(new C.EditGuildMember { ChangeType = 0, Name = messageBox.InputTextBox.Text });
LastGuildMsg = CMain.Time + 5000;
messageBox.Dispose();
};
messageBox.Show();
}
示例11: FriendDialog
public FriendDialog()
{
Index = 199;
Library = Libraries.Title;
Movable = true;
Sort = true;
Location = Center;
TitleLabel = new MirImageControl
{
Index = 6,
Library = Libraries.Title,
Location = new Point(18, 4),
Parent = this
};
CloseButton = new MirButton
{
HoverIndex = 361,
Index = 360,
Location = new Point(237, 3),
Library = Libraries.Prguse2,
Parent = this,
PressedIndex = 362,
Sound = SoundList.ButtonA,
};
CloseButton.Click += (o, e) => Hide();
AddButton = new MirButton
{
Index = 554,
HoverIndex = 555,
PressedIndex = 556,
Library = Libraries.Prguse,
Location = new Point(60, 241),
Parent = this,
Sound = SoundList.ButtonA
};
AddButton.Click += (o, e) =>
{
MirInputBox inputBox = new MirInputBox("Please enter the name of the person you would like to add.");
inputBox.OKButton.Click += (o1, e1) =>
{
//GameScene.Scene.MailComposeLetterDialog.ComposeMail(inputBox.InputTextBox.Text);
inputBox.Dispose();
};
inputBox.Show();
};
RemoveButton = new MirButton
{
Index = 557,
HoverIndex = 558,
PressedIndex = 559,
Library = Libraries.Prguse,
Location = new Point(88, 241),
Parent = this,
Sound = SoundList.ButtonA
};
MemoButton = new MirButton
{
Index = 560,
HoverIndex = 561,
PressedIndex = 562,
Library = Libraries.Prguse,
Location = new Point(116, 241),
Parent = this,
Sound = SoundList.ButtonA
};
EmailButton = new MirButton
{
Index = 563,
HoverIndex = 564,
PressedIndex = 565,
Library = Libraries.Prguse,
Location = new Point(144, 241),
Parent = this,
Sound = SoundList.ButtonA
};
WhisperButton = new MirButton
{
Index = 566,
HoverIndex = 567,
PressedIndex = 568,
Library = Libraries.Prguse,
Location = new Point(172, 241),
Parent = this,
Sound = SoundList.ButtonA
};
}
示例12: MailListDialog
//.........这里部分代码省略.........
SelectedMail = null;
CurrentPage++;
StartIndex += 10;
UpdateInterface();
};
#region Action Buttons
SendButton = new MirButton
{
Index = 563,
HoverIndex = 564,
PressedIndex = 565,
Library = Libraries.Prguse,
Parent = this,
Location = new Point(75, 414),
Sound = SoundList.ButtonA,
Hint = "Send"
};
SendButton.Click += (o, e) =>
{
MirInputBox inputBox = new MirInputBox("Please enter the name of the person you would like to mail.");
inputBox.OKButton.Click += (o1, e1) =>
{
//open letter dialog, pass in name
GameScene.Scene.MailComposeLetterDialog.ComposeMail(inputBox.InputTextBox.Text);
inputBox.Dispose();
};
inputBox.Show();
};
ReplyButton = new MirButton
{
Index = 569,
HoverIndex = 570,
PressedIndex = 571,
Library = Libraries.Prguse,
Parent = this,
Location = new Point(102, 414),
Sound = SoundList.ButtonA,
Hint = "Reply"
};
ReplyButton.Click += (o, e) =>
{
if (SelectedMail == null) return;
GameScene.Scene.MailComposeLetterDialog.ComposeMail(SelectedMail.SenderName);
};
ReadButton = new MirButton
{
Index = 572,
HoverIndex = 573,
PressedIndex = 574,
Library = Libraries.Prguse,
Parent = this,
Location = new Point(129, 414),
Sound = SoundList.ButtonA,
Hint = "Read"
};
ReadButton.Click += (o, e) =>