public void OpenInviteWindow() { if (!IsPartyLeader()) { return; } messageBox.Show("Invite member: ", true, true, true, "Invite member:"); messageBox.OK += SendInviteToPlayer; }
private void DeleteCharacter() { if (_selected < 0 || _selected >= Characters.Count) { return; } MirMessageBox message = new MirMessageBox(string.Format("是否确实要删除该角色{0}?", Characters[_selected].Name), MirMessageBoxButtons.YesNo); int index = Characters[_selected].Index; message.YesButton.Click += (o1, e1) => { MirInputBox inputBox = new MirInputBox("请输入角色名称进行确认."); inputBox.OKButton.Click += (o, e) => { string name = Characters[_selected].Name.ToString(); if (inputBox.InputTextBox.Text == name) { DeleteCharacterButton.Enabled = false; Network.Enqueue(new C.DeleteCharacter { CharacterIndex = index }); } else { MirMessageBox failedMessage = new MirMessageBox(string.Format("输入名称错误."), MirMessageBoxButtons.OK); failedMessage.Show(); } inputBox.Dispose(); }; inputBox.Show(); }; message.Show(); }
private void NewCharacter(S.NewCharacter p) { _character.OKButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("当前已禁止创建新角色."); _character.Dispose(); break; case 1: MirMessageBox.Show("您使用的角色名称不可用."); _character.NameTextBox.SetFocus(); break; case 2: MirMessageBox.Show("您选择的人物性别不存在.\n 请联系管理员寻求帮助."); break; case 3: MirMessageBox.Show("您选择的职业不存在.\n 请联系管理员寻求帮助."); break; case 4: MirMessageBox.Show("您的角色已经满了只能使用 " + Globals.MaxCharacterCount + " 角色."); _character.Dispose(); break; case 5: MirMessageBox.Show("该角色名称已经被使用,请更换."); _character.NameTextBox.SetFocus(); break; } }
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 += (o1, e1) => { MirInputBox inputBox = new MirInputBox("Please enter the characters name."); inputBox.OKButton.Click += (o, e) => { string name = Characters[_selected].Name.ToString(); if (inputBox.InputTextBox.Text == name) { DeleteCharacterButton.Enabled = false; Network.Enqueue(new C.DeleteCharacter { CharacterIndex = index }); } else { MirMessageBox failedMessage = new MirMessageBox(string.Format("Incorrect Entry."), MirMessageBoxButtons.OK); failedMessage.Show(); } inputBox.Dispose(); }; inputBox.Show(); }; message.Show(); }
private void NewCharacter(S.NewCharacter p) { _character.OKButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("Creating new characters is currently disabled."); _character.Dispose(); break; case 1: MirMessageBox.Show("Your Character Name is not acceptable."); _character.NameTextBox.SetFocus(); break; case 2: MirMessageBox.Show("The gender you selected does not exist.\n Contact a GM for assistance."); break; case 3: MirMessageBox.Show("The class you selected does not exist.\n Contact a GM for assistance."); break; case 4: MirMessageBox.Show("You cannot make anymore then " + Globals.MaxCharacterCount + " Characters."); _character.Dispose(); break; case 5: MirMessageBox.Show("A Character with this name already exists."); _character.NameTextBox.SetFocus(); break; } }
public static void Disconnect(Disconnect P) { Network.Disconnect(); SceneFunctions.ConClosed = true; MirMessageBox MMBox; switch (P.Reason) { case 0: MMBox = new MirMessageBox("You have been disconnected from the game."); MMBox.OKButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); break; case 1: MMBox = new MirMessageBox("You have been disconnected from the game,\nAnother user logged onto your account."); MMBox.OKButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); break; #if DEBUG default: throw new NotImplementedException(); #endif } }
public void StartGame() { if (!Libraries.Loaded) { MirMessageBox message = new MirMessageBox(string.Format("Please wait, The game is still loading... {0:##0}%", Libraries.Progress / (double)Libraries.Count * 100), MirMessageBoxButtons.Cancel); message.BeforeDraw += (o, e) => message.Label.Text = string.Format("Please wait, The game is still loading... {0:##0}%", Libraries.Progress / (double)Libraries.Count * 100); message.AfterDraw += (o, e) => { if (!Libraries.Loaded) { return; } message.Dispose(); StartGame(); }; message.Show(); return; } StartGameButton.Enabled = false; Network.Enqueue(new C.StartGame { CharacterIndex = Characters[_selected].Index }); }
public static void ConnectionFailed() { MirMessageBox MMBox = new MirMessageBox("Failed to connect to the server...", MessageBoxButtons.RetryCancel); MMBox.CancelButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); }
public static void WrongVersion() { MirMessageBox MMBox = new MirMessageBox("Wrong Version, Please update your game.\n Game will now close.", MessageBoxButtons.OK); MMBox.OKButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); }
private void NewCharacter(S.NewCharacter p) { _character.OKButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show(GameLanguage.CreatingCharactersDisabled); _character.Dispose(); break; case 1: MirMessageBox.Show(GameLanguage.InvalidCharacterName); _character.NameTextBox.SetFocus(); break; case 2: MirMessageBox.Show("The gender you selected does not exist.\n Contact a GM for assistance."); break; case 3: MirMessageBox.Show(GameLanguage.NoClass); break; case 4: MirMessageBox.Show(string.Format(GameLanguage.ToManyCharacters, Globals.MaxCharacterCount)); _character.Dispose(); break; case 5: MirMessageBox.Show(GameLanguage.CharacterNameExists); _character.NameTextBox.SetFocus(); break; } }
public void StartGame(S.StartGame p) { StartGameButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("Starting the game is currently disabled."); break; case 1: MirMessageBox.Show("You are not logged in."); break; case 2: MirMessageBox.Show("Your character could not be found."); break; case 3: MirMessageBox.Show("No active map and/or start point found."); break; case 4: if (Settings.HighResolution) { CMain.SetResolution(1024, 768); } ActiveScene = new GameScene(); Dispose(); break; } }
private void NewCharacter(S.NewCharacter p) { _character.OKButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("服务器暂时不允许创建新角色。"); _character.Dispose(); break; case 1: MirMessageBox.Show("角色名不可用。"); _character.NameTextBox.SetFocus(); break; case 2: MirMessageBox.Show("你选择的性别不存在.\n 请联系GM处理。"); break; case 3: MirMessageBox.Show("你选择的职业不存在.\n 请联系GM处理。"); break; case 4: MirMessageBox.Show("你不能创建超过" + Globals.MaxCharacterCount + "个角色。"); _character.Dispose(); break; case 5: MirMessageBox.Show("这个角色名已存在。"); _character.NameTextBox.SetFocus(); break; } }
public static void DeleteCharacter(string Name, int Index) { MirMessageBox MMBox = new MirMessageBox(string.Format("Are you sure you want to Delete the character {0}?", Name), MessageBoxButtons.YesNo); DeleteIndex = Index; MMBox.YesButton.Click += DeleteCharacter; MMBox.Show(); }
public static void QuitGame() { //If Last Combat < 10 CANCEL MirMessageBox MMBox = new MirMessageBox("Do you want to quit Legened of Mir?", MessageBoxButtons.YesNo); MMBox.YesButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); }
public static void LogOut() { //If Last Combat < 10 CANCEL MirMessageBox MMBox = new MirMessageBox("Do you want to log out of Legened of Mir?", MessageBoxButtons.YesNo); MMBox.YesButton.Click += (o, e) => SceneFunctions.LogOut(); MMBox.Show(); }
public void StartGame(S.StartGameBanned p) { StartGameButton.Enabled = true; TimeSpan d = p.ExpiryDate - CMain.Now; MirMessageBox.Show(string.Format("This account is banned.\n\nReason: {0}\nExpiryDate: {1}\nDuration: {2:#,##0} Hours, {3} Minutes, {4} Seconds", p.Reason, p.ExpiryDate, Math.Floor(d.TotalHours), d.Minutes, d.Seconds)); }
private void NewCharacter(S.NewCharacterSuccess p) { _character.Dispose(); MirMessageBox.Show(GameLanguage.CharacterCreated); Characters.Insert(0, p.CharInfo); _selected = 0; UpdateInterface(); }
private void NewCharacter(S.NewCharacterSuccess p) { _character.Dispose(); MirMessageBox.Show("Your character was created successfully."); Characters.Insert(0, p.CharInfo); _selected = 0; UpdateInterface(); }
public void StartGame(S.StartGameBanned p) { StartGameButton.Enabled = true; TimeSpan d = p.ExpiryDate - CMain.Now; MirMessageBox.Show(string.Format("这个账号已被封禁.\n\n原因: {0}\n解封日期: {1}\n持续时间: {2:#,##0}小时, {3}分钟, {4}秒", p.Reason, p.ExpiryDate, Math.Floor(d.TotalHours), d.Minutes, d.Seconds)); }
private void NewCharacter(S.NewCharacterSuccess p) { _character.Dispose(); MirMessageBox.Show("你的角色创建成功。"); Characters.Insert(0, p.CharInfo); _selected = 0; UpdateInterface(); }
public void StartGame(S.StartGame p) { StartGameButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("Starting the game is currently disabled."); break; case 1: MirMessageBox.Show("You are not logged in."); break; case 2: MirMessageBox.Show("Your character could not be found."); break; case 3: MirMessageBox.Show("No active map and/or start point found."); break; case 4: if (p.Resolution < Settings.Resolution || Settings.Resolution == 0) { Settings.Resolution = p.Resolution; } switch (Settings.Resolution) { default: case 1024: Settings.Resolution = 1024; CMain.SetResolution(1024, 768); break; case 1280: CMain.SetResolution(1280, 800); break; case 1366: CMain.SetResolution(1366, 768); break; case 1920: CMain.SetResolution(1920, 1080); break; } ActiveScene = new GameScene(); DXManager.ResetDevice(); Dispose(); break; } }
public void StartGame(S.StartGame p) { StartGameButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("启动游戏当前处于禁用状态."); break; case 1: MirMessageBox.Show("你没有登录."); break; case 2: MirMessageBox.Show("找不到你的角色."); break; case 3: MirMessageBox.Show("未找到可活动地图/或进入的起点."); break; case 4: if (p.Resolution < Settings.Resolution || Settings.Resolution == 0) { Settings.Resolution = p.Resolution; } switch (Settings.Resolution) { default: case 1024: Settings.Resolution = 1024; CMain.SetResolution(1280, 768); //默认 1024,768 进入画面大小 break; case 1280: CMain.SetResolution(1280, 800); break; case 1366: CMain.SetResolution(1366, 768); break; case 1920: CMain.SetResolution(1920, 1080); break; } ActiveScene = new GameScene(); Dispose(); break; } }
public void StartGame(S.StartGame p) { StartGameButton.Enabled = true; if (p.Resolution < Settings.Resolution || Settings.Resolution == 0) { Settings.Resolution = p.Resolution; } if (p.Resolution < 1024 || Settings.Resolution < 1024) { Settings.Resolution = 800; } else if (p.Resolution < 1366 || Settings.Resolution < 1366) { Settings.Resolution = 1024; } else if (p.Resolution >= 1366 && Settings.Resolution >= 1366) { Settings.Resolution = 1366; } switch (p.Result) { case 0: MirMessageBox.Show("Starting the game is currently disabled."); break; case 1: MirMessageBox.Show("You are not logged in."); break; case 2: MirMessageBox.Show("Your character could not be found."); break; case 3: MirMessageBox.Show("No active map and/or start point found."); break; case 4: if (Settings.Resolution == 1024) { CMain.SetResolution(1024, 768); } else if (Settings.Resolution == 1366) { CMain.SetResolution(1366, 768); } ActiveScene = new GameScene(); Dispose(); break; } }
public static void ConnectionClosed() { if (ConClosed) { return; } ConClosed = true; MirMessageBox MMBox = new MirMessageBox("Failed to connect to the server.", MessageBoxButtons.OK); MMBox.OKButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); }
public static void ConnectionLost() { if (ConClosed) { return; } ConClosed = true; MirMessageBox MMBox = new MirMessageBox("Lost connection with the server."); MMBox.OKButton.Click += (o, e) => SceneFunctions.QuitGame(); MMBox.Show(); }
private void DeleteCharacter(S.DeleteCharacter p) { DeleteCharacterButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("Deleting characters is currently disabled."); break; case 1: MirMessageBox.Show("The character you selected does not exist.\n Contact a GM for assistance."); break; } }
private void DeleteCharacter(S.DeleteCharacter p) { DeleteCharacterButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("删除的角色当前处于禁用状态."); break; case 1: MirMessageBox.Show("您选择的角色不存在.\n 请联系管理员寻求帮助."); break; } }
private void DeleteCharacter(S.DeleteCharacter p) { DeleteCharacterButton.Enabled = true; switch (p.Result) { case 0: MirMessageBox.Show("服务器暂时不允许删除角色。"); break; case 1: MirMessageBox.Show("你选择的角色不存在.\n 请联系GM处理。"); break; } }
public void Show() { if (Visible) { return; } if (GameScene.User.MountType < 0) { MirMessageBox messageBox = new MirMessageBox(GameLanguage.NoMount, MirMessageBoxButtons.OK); messageBox.Show(); return; } Visible = true; }
public void Transform_Click() { if (ItemCell.Item != null) { Network.Enqueue(new C.Transform { ToUniqueID = ItemCell.Item.UniqueID, FromUniqueID = ulong.MaxValue }); } else { MirMessageBox messageBox = new MirMessageBox("아이템이 없습니다.", MirMessageBoxButtons.OK); messageBox.Show(); } Clear(); }