本文整理汇总了C#中Client.MirControls.MirMessageBox.Show方法的典型用法代码示例。如果您正苦于以下问题:C# MirMessageBox.Show方法的具体用法?C# MirMessageBox.Show怎么用?C# MirMessageBox.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.MirControls.MirMessageBox
的用法示例。
在下文中一共展示了MirMessageBox.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoginScene
public LoginScene()
{
SoundManager.PlaySound(SoundList.IntroMusic, true);
Disposing += (o, e) => SoundManager.StopSound(SoundList.IntroMusic);
_background = new MirAnimatedControl
{
Animated = false,
AnimationCount = 19,
AnimationDelay = 100,
Index = 0,
Library = Libraries.ChrSel,
Loop = false,
Parent = this,
};
_login = new LoginDialog {Parent = _background, Visible = false};
_login.AccountButton.Click += (o, e) =>
{
_login.Hide();
_account = new NewAccountDialog { Parent = _background };
_account.Disposing += (o1, e1) => _login.Show();
};
_login.PassButton.Click += (o, e) =>
{
_login.Hide();
_password = new ChangePasswordDialog { Parent = _background };
_password.Disposing += (o1, e1) => _login.Show();
};
Version = new MirLabel
{
AutoSize = true,
BackColour = Color.FromArgb(200, 50, 50, 50),
Border = true,
BorderColour = Color.Black,
Location = new Point(5, 580),
Parent = _background,
Text = string.Format("Version: {0}", Application.ProductVersion),
};
_connectBox = new MirMessageBox("Attempting to connect to the server.", MirMessageBoxButtons.Cancel);
_connectBox.CancelButton.Click += (o, e) => Program.Form.Close();
Shown += (sender, args) =>
{
Network.Connect();
_connectBox.Show();
};
}
示例2: OnNewRank
public void OnNewRank(int Index, int SelectedIndex)
{
if (SelectedIndex >= Ranks.Count) return;
if (LastGuildMsg > CMain.Time) return;
MirMessageBox messageBox = new MirMessageBox(string.Format("Are you sure you want to change the rank of {0} to {1}?", MembersName[Index].Text, Ranks[SelectedIndex].Name), MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, a) =>
{
Network.Enqueue(new C.EditGuildMember { ChangeType = 2, Name = MembersName[Index].Text, RankIndex = (byte)Ranks[SelectedIndex].Index, RankName = Ranks[SelectedIndex].Name });
LastGuildMsg = CMain.Time + 5000;
};
messageBox.Show();
}
示例3: DeleteCharacter
private void DeleteCharacter()
{
if (_selected < 0 || _selected >= Characters.Count) return;
MirMessageBox message = new MirMessageBox(string.Format("Are you sure you want to Delete the character {0}?", Characters[_selected].Name), MirMessageBoxButtons.YesNo);
int index = Characters[_selected].Index;
message.YesButton.Click += (o, e) =>
{
DeleteCharacterButton.Enabled = false;
Network.Enqueue(new C.DeleteCharacter { CharacterIndex = index });
};
message.Show();
}
示例4: QuestListDialog
//.........这里部分代码省略.........
HoverIndex = 271,
PressedIndex = 272,
Library = Libraries.Title,
Parent = this,
Location = new Point(40, 437),
Sound = SoundList.ButtonA,
};
_acceptButton.Click += (o, e) =>
{
if (Reward == null || SelectedQuest.Taken) return;
Network.Enqueue(new C.AcceptQuest { NPCIndex = SelectedQuest.QuestInfo.NPCIndex, QuestIndex = SelectedQuest.QuestInfo.Index });
//Hide();
};
_finishButton = new MirButton
{
Index = 273,
HoverIndex = 274,
PressedIndex = 275,
Library = Libraries.Title,
Parent = this,
Location = new Point(40, 437),
Sound = SoundList.ButtonA,
Visible = false
};
_finishButton.Click += (o, e) =>
{
if (Reward == null || !SelectedQuest.Completed) return;
if (Reward.SelectedItemIndex < 0 && SelectedQuest.QuestInfo.RewardsSelectItem.Count > 0)
{
MirMessageBox messageBox = new MirMessageBox("You must select a reward item.");
messageBox.Show();
return;
}
Network.Enqueue(new C.FinishQuest { QuestIndex = SelectedQuest.QuestInfo.Index, SelectedItemIndex = Reward.SelectedItemIndex });
//Hide();
};
MirButton leaveButton = new MirButton
{
Index = 276,
HoverIndex = 277,
PressedIndex = 278,
Library = Libraries.Title,
Parent = this,
Location = new Point(205, 437),
Sound = SoundList.ButtonA,
};
leaveButton.Click += (o, e) => Hide();
#endregion
#region Message Area
MirButton upButton = new MirButton
{
Index = 197,
HoverIndex = 198,
PressedIndex = 199,
Library = Libraries.Prguse2,
Parent = this,
Size = new Size(16, 14),
Location = new Point(292, 136),
示例5: OnMouseDown
private static void OnMouseDown(object sender, MouseEventArgs e)
{
MapButtons |= e.Button;
GameScene.CanRun = false;
if (AwakeningAction == true) return;
if (e.Button != MouseButtons.Left) return;
if (GameScene.SelectedCell != null)
{
if (GameScene.SelectedCell.GridType != MirGridType.Inventory)
{
GameScene.SelectedCell = null;
return;
}
MirItemCell cell = GameScene.SelectedCell;
if (cell.Item.Info.Bind.HasFlag(BindMode.DontDrop))
{
MirMessageBox messageBox = new MirMessageBox(string.Format("You cannot drop {0}", cell.Item.Name), MirMessageBoxButtons.OK);
messageBox.Show();
GameScene.SelectedCell = null;
return;
}
if (cell.Item.Count == 1)
{
MirMessageBox messageBox = new MirMessageBox(string.Format("Are you sure you want to drop {0}?", cell.Item.FriendlyName), MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, a) =>
{
Network.Enqueue(new C.DropItem { UniqueID = cell.Item.UniqueID, Count = 1 });
cell.Locked = true;
};
messageBox.Show();
}
else
{
MirAmountBox amountBox = new MirAmountBox("Drop Amount:", cell.Item.Info.Image, cell.Item.Count);
amountBox.OKButton.Click += (o, a) =>
{
if (amountBox.Amount <= 0) return;
Network.Enqueue(new C.DropItem
{
UniqueID = cell.Item.UniqueID,
Count = amountBox.Amount
});
cell.Locked = true;
};
amountBox.Show();
}
GameScene.SelectedCell = null;
return;
}
if (GameScene.PickedUpGold)
{
MirAmountBox amountBox = new MirAmountBox("Drop Amount:", 116, GameScene.Gold);
amountBox.OKButton.Click += (o, a) =>
{
if (amountBox.Amount > 0)
{
Network.Enqueue(new C.DropGold { Amount = amountBox.Amount });
}
};
amountBox.Show();
GameScene.PickedUpGold = false;
}
if (MapObject.MouseObject != null && !MapObject.MouseObject.Dead && !(MapObject.MouseObject is ItemObject) &&
!(MapObject.MouseObject is NPCObject) && !(MapObject.MouseObject is MonsterObject && MapObject.MouseObject.AI == 64))
{
MapObject.TargetObject = MapObject.MouseObject;
if (MapObject.MouseObject is MonsterObject && MapObject.MouseObject.AI != 6)
MapObject.MagicObject = MapObject.TargetObject;
}
else
MapObject.TargetObject = null;
}
示例6: LogOut
public void LogOut()
{
if (CMain.Time >= LogTime)
{
//If Last Combat < 10 CANCEL
MirMessageBox messageBox = new MirMessageBox("Do you want to log out of Legend of Mir?", MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, e) =>
{
Network.Enqueue(new C.LogOut());
Enabled = false;
};
messageBox.Show();
}
else
{
ChatDialog.ReceiveChat("Cannot leave game for " + (LogTime - CMain.Time) / 1000 + " seconds.", ChatType.System);
}
}
示例7: RequestReincarnation
private void RequestReincarnation()
{
if (CMain.Time > User.DeadTime && User.CurrentAction == MirAction.Dead)
{
MirMessageBox messageBox = new MirMessageBox("Would you like to be revived?", MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, e) => Network.Enqueue(new C.AcceptReincarnation());
messageBox.Show();
}
}
示例8: Awakening
private void Awakening(S.Awakening p)
{
if (NPCAwakeDialog.Visible)
NPCAwakeDialog.Hide();
if (InventoryDialog.Visible)
InventoryDialog.Hide();
MirItemCell cell = InventoryDialog.GetCell((ulong)p.removeID);
if (cell != null)
{
cell.Locked = false;
cell.Item = null;
}
/*
for (int i = 0; i < InventoryDialog.Grid.Length; i++)
{
if (InventoryDialog.Grid[i].Locked == true)
{
InventoryDialog.Grid[i].Locked = false;
if (InventoryDialog.Grid[i].Item.UniqueID == (ulong)p.removeID)
{
InventoryDialog.Grid[i].Item = null;
}
}
}
*/
MirMessageBox messageBox = null;
switch (p.result)
{
case -4:
messageBox = new MirMessageBox("You have not supplied enough materials.", MirMessageBoxButtons.OK);
MapControl.AwakeningAction = false;
break;
case -3:
messageBox = new MirMessageBox("You do not have enough gold.", MirMessageBoxButtons.OK);
MapControl.AwakeningAction = false;
break;
case -2:
messageBox = new MirMessageBox("Awakening already at maximum level.", MirMessageBoxButtons.OK);
MapControl.AwakeningAction = false;
break;
case -1:
messageBox = new MirMessageBox("Cannot awaken this item.", MirMessageBoxButtons.OK);
MapControl.AwakeningAction = false;
break;
case 0:
//messageBox = new MirMessageBox("Upgrade Failed.", MirMessageBoxButtons.OK);
break;
case 1:
//messageBox = new MirMessageBox("Upgrade Success.", MirMessageBoxButtons.OK);
break;
}
if (messageBox != null) messageBox.Show();
}
示例9: Show
public void Show()
{
if (Visible) return;
if (!GameScene.User.IntelligentCreatures.Any())
{
MirMessageBox messageBox = new MirMessageBox("You do not own any creatures.", MirMessageBoxButtons.OK);
messageBox.Show();
return;
}
Visible = true;
showing = true;
SwitchAnimTime = CMain.Time + 8000;
AnimSwitched = false;
AnimNeedSwitch = false;
RefreshDialog();
}
示例10: TrustMerchantDialog
//.........这里部分代码省略.........
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) =>
{
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.Name, 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) =>
{
示例11: RequestBuff
public void RequestBuff(byte Id)
{
if ((Id + StartIndex) > GuildBuffInfos.Count) return;
GuildBuffInfo BuffInfo = GuildBuffInfos[Id + StartIndex];
if (BuffInfo == null) return;
GuildBuff Buff = FindGuildBuff(BuffInfo.Id);
if (Buff == null)
{
string Error = "";
if (GameScene.Scene.GuildDialog.SparePoints < BuffInfo.PointsRequirement)
Error = "Insufficient points available.";
if (GameScene.Scene.GuildDialog.Level < BuffInfo.LevelRequirement)
Error = "Guild level too low.";
if (!GameScene.Scene.GuildDialog.GetMyOptions().HasFlag(RankOptions.CanActivateBuff))
Error = "Guild rank does not allow buff activation.";
if (Error != "")
{
MirMessageBox messageBox = new MirMessageBox(Error);
messageBox.Show();
return;
}
if (CMain.Time < LastRequest + 100) return;
LastRequest = CMain.Time;
Network.Enqueue(new C.GuildBuffUpdate { Action = 1, Id = BuffInfo.Id });
}
else
{
string Error = "";
if (Buff.Active)
Error = "Buff is still active.";
if (GameScene.Scene.GuildDialog.Gold < BuffInfo.ActivationCost)
Error = "Insufficient guild funds.";
if (!GameScene.Scene.GuildDialog.GetMyOptions().HasFlag(RankOptions.CanActivateBuff))
Error = "Guild rank does not allow buff activation.";
if (Error != "")
{
MirMessageBox messageBox = new MirMessageBox(Error);
messageBox.Show();
return;
}
if (CMain.Time < LastRequest + 100) return;
LastRequest = CMain.Time;
Network.Enqueue(new C.GuildBuffUpdate {Action = 2, Id = BuffInfo.Id});
}
}
示例12: OnRankSelect
public void OnRankSelect(int Index)
{
if (Index < Ranks.Count)
RanksSelectBox.SelectedIndex = Index;
else
{
if (Ranks.Count == 255) return;
if (LastGuildMsg > CMain.Time) return;
MirMessageBox messageBox = new MirMessageBox("Are you sure you want to create a new rank?", MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, a) =>
{
Network.Enqueue(new C.EditGuildMember { ChangeType = 4, RankName = String.Format("Rank-{0}", Ranks.Count - 1) });
LastGuildMsg = CMain.Time + 5000;
};
messageBox.Show();
}
UpdateRanks();
}
示例13: DeleteMember
public void DeleteMember(int Index)
{
if (MembersName[Index].Text == MapControl.User.Name) return;
if (LastGuildMsg > CMain.Time) return;
MirMessageBox messageBox = new MirMessageBox(string.Format("Are you sure you want to kick {0}?", MembersName[Index].Text), MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, a) =>
{
Network.Enqueue(new C.EditGuildMember { ChangeType = 1, Name = MembersName[Index].Text });
LastGuildMsg = CMain.Time + 5000;
};
messageBox.Show();
}
示例14: TradeRequest
private void TradeRequest(S.TradeRequest p)
{
MirMessageBox messageBox = new MirMessageBox(string.Format("Player {0} has requested to trade with you.", p.Name), MirMessageBoxButtons.YesNo);
messageBox.YesButton.Click += (o, e) => Network.Enqueue(new C.TradeReply { AcceptInvite = true });
messageBox.NoButton.Click += (o, e) => { Network.Enqueue(new C.TradeReply { AcceptInvite = false }); messageBox.Dispose(); };
messageBox.Show();
}
示例15: TradeCancel
private void TradeCancel(S.TradeCancel p)
{
if (p.Unlock)
{
TradeDialog.ChangeLockState(false);
}
else
{
TradeDialog.TradeReset();
MirMessageBox messageBox = new MirMessageBox("Deal cancelled.\r\nTo deal correctly you must face the other party.", MirMessageBoxButtons.OK);
messageBox.Show();
}
}