/// <summary> /// Windows initialization /// </summary> void InitializeWindows() { List<string> Commandlist = new List<string>(); Commandlist.Add("To Title"); Commandlist.Add("Shutdown"); Commandlist.Add("Cancel"); commandwindow = new WindowCommand(192, Commandlist); commandwindow.X = 320 - commandwindow.Width / 2; commandwindow.Y = 240 - commandwindow.Height / 2; }
/// <summary> /// Windows initialization /// </summary> void InitializeWindows() { List <string> Commandlist = new List <string>(); Commandlist.Add("To Title"); Commandlist.Add("Shutdown"); Commandlist.Add("Cancel"); commandwindow = new WindowCommand(192, Commandlist); commandwindow.X = 320 - commandwindow.Width / 2; commandwindow.Y = 240 - commandwindow.Height / 2; }
void RunCommand(WindowCommand command) { switch (command) { case WindowCommand.Window_Diff: Launcher.Static.LaunchDiff(); break; case WindowCommand.Window_Disk: Launcher.Static.LaunchDisk(forceCreate: true); break; case WindowCommand.Window_Handles: Launcher.Static.LaunchHandles(); break; case WindowCommand.Window_HexEditor: Launcher.Static.LaunchHexEditor(forceCreate: true); break; case WindowCommand.Window_ImageEditor: Launcher.Static.LaunchImageEditor(); break; case WindowCommand.Window_Network: Launcher.Static.LaunchNetwork(); break; case WindowCommand.Window_Processes: Launcher.Static.LaunchProcesses(); break; case WindowCommand.Window_TextEditor: Launcher.Static.LaunchTextEditor(forceCreate: true); break; case WindowCommand.Window_TextViewer: Launcher.Static.LaunchTextViewer(forceCreate: true); break; } if (shiftDown) Close(); }
/// <summary> /// Sends a command corresponding to a window (system) menu item to a form. /// Its effect is exactly what would happen if someone opened the window menu and clicked on one of its items. /// </summary> /// <param name="form"> /// The <see cref="Form"/> to which to send the window (system) menu command. /// </param> /// <param name="windowCommand"> /// The command to send. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="form"/> is null. /// </exception> /// <exception cref="InvalidEnumArgumentException"> /// <paramref name="windowCommand"/> is not a valid <see cref="WindowCommand"/> value. /// </exception> /// <exception cref="Win32Exception"> /// The system call to execute the selected window (system) menu command returned an error. /// </exception> public static void SendWindowCommand(this Form form, WindowCommand windowCommand) { if (form == null) { throw new ArgumentNullException(nameof(form)); } if (!form.IsHandleCreated || form.IsDisposed || windowCommand == 0) { return; } if (!Enum.IsDefined(typeof(WindowCommand), windowCommand)) { throw new InvalidEnumArgumentException(nameof(windowCommand), (int)windowCommand, typeof(WindowCommand)); } PostSysCommandMessage(form, (uint)windowCommand); }
/// <summary> /// Initialize SceneTitle /// </summary> public override void LoadSceneContent() { // Load database Data.Actors = Cache.ActorData("actors"); Data.Classes = Cache.ClassData("classes"); Data.Skills = Cache.SkillData("skills"); Data.Items = Cache.ItemData("items"); Data.Weapons = Cache.WeaponData("weapons"); Data.Armors = Cache.ArmorData("armors"); Data.Npcs = Cache.NpcData("npcs"); Data.Troops = Cache.TroopData("troops"); Data.States = Cache.StateData("states"); Data.Animations = Cache.AnimationData("animations"); Data.CommonEvents = Cache.CommonEventData("commonevents"); Data.System = Cache.SystemData("system"); Cache.LoadIcons("icons", "IconsReach"); InGame.System = new GameSystem(); InGame.Switches = new GameSwitches(); InGame.Variables = new GameVariables(); InGame.Temp = new GameTemp(); // Title title = new Sprite(Graphics.Background); title.Z = 0; title.Bitmap = Cache.Title(Data.System.TitleName); string s1 = "New Game"; string s2 = "Continue"; string s3 = "Shutdown"; commandWindow = new WindowCommand(192, new List <string>() { s1, s2, s3 }); commandWindow.BackOpacity = 160; commandWindow.X = (GeexEdit.GameWindowWidth - commandWindow.Width) / 2; commandWindow.Y = GeexEdit.GameWindowHeight - 192; commandWindow.Z = 500; continueEnabled = true; // Play title BGM Audio.SongPlay(Data.System.TitleMusicLoop); // Stop playing Song effect and background sound Audio.SongEffectStop(); Audio.BackgroundSoundStop(); }
public DocumentViewModel( IDocumentDataSource dataSource, IErrorInfoService errorService) { _dataSource = dataSource; _errorService = errorService; if (_errorService == null) { throw new ArgumentNullException(nameof(errorService), "Не найден обработчик ошибок."); } if (dataSource == null) { throw new ArgumentNullException(nameof(dataSource), "Не найден источник данных."); } NextCommand = new WindowCommand(ProcessDocument, () => !HasErrors); ValidateQtyCommand = new WindowCommand(ProcessValidate); }
/// <summary> /// Initialize window /// </summary> void InitializeWindow() { // Make command window List <string> Commandlist = new List <string>(); Commandlist.Add(Data.System.Wordings.Item); Commandlist.Add(Data.System.Wordings.Skill); Commandlist.Add(Data.System.Wordings.Equip); Commandlist.Add("Status"); Commandlist.Add("Save"); Commandlist.Add("End Game"); commandWindow = new WindowCommand(GameOptions.MenuCommandListWidth, Commandlist); commandWindow.Index = menuIndex; // If number of party members is 0 if (InGame.Party.Actors.Count == 0) { // Disable items, skills, equipment, and status commandWindow.DisableItem(0); commandWindow.DisableItem(1); commandWindow.DisableItem(2); commandWindow.DisableItem(3); } // If save is forbidden if (InGame.System.IsSaveDisabled) { // Disable save commandWindow.DisableItem(4); } // Make play time window playtimeWindow = new WindowPlayTime(); // Make steps window stepsWindow = new WindowSteps(); // Make gold window goldWindow = new WindowGold(); // Make status window statusWindow = new WindowMenuStatus(); }
/// <summary> /// Initialize window /// </summary> void InitializeWindow() { // Make command window List<string> Commandlist = new List<string>(); Commandlist.Add(Data.System.Wordings.Item); Commandlist.Add(Data.System.Wordings.Skill); Commandlist.Add(Data.System.Wordings.Equip); Commandlist.Add("Status"); Commandlist.Add("Save"); Commandlist.Add("End Game"); commandWindow = new WindowCommand(GameOptions.MenuCommandListWidth, Commandlist); commandWindow.Index = menuIndex; // If number of party members is 0 if (InGame.Party.Actors.Count == 0) { // Disable items, skills, equipment, and status commandWindow.DisableItem(0); commandWindow.DisableItem(1); commandWindow.DisableItem(2); commandWindow.DisableItem(3); } // If save is forbidden if (InGame.System.IsSaveDisabled) { // Disable save commandWindow.DisableItem(4); } // Make play time window playtimeWindow = new WindowPlayTime(); // Make steps window stepsWindow = new WindowSteps(); // Make gold window goldWindow = new WindowGold(); // Make status window statusWindow = new WindowMenuStatus(); }
private void OnHotKeyHandler(HotKey hotKey) { WindowCommand.Execute(WindowCommandType.OPEN); }
private void CreateWindows() { List<CommandOption> options = new List<CommandOption>() { new CommandOption(){ Name = "New Game" }, new CommandOption(){ Name = "Load Game", Enabled = false }, new CommandOption(){ Name = "End Game" }, }; menuOptionsWindow = new WindowCommand(options, true); menuOptionsWindow.X = (int)Settings.Resolution.X / 2 - (int)menuOptionsWindow.Width / 2; menuOptionsWindow.Y = (int)Settings.Resolution.Y / 2 - (int)menuOptionsWindow.Height / 2; Windows.Add(menuOptionsWindow); }
/// <summary> /// Main Processing : Window Initialization /// </summary> void InitializeWindow() { // Make actor command window List<string> Commandlist = new List<string>(); Commandlist.Add(Data.System.Wordings.Attack); Commandlist.Add(Data.System.Wordings.Skill); Commandlist.Add(Data.System.Wordings.Guard); Commandlist.Add(Data.System.Wordings.Item); actorCommandWindow = new WindowCommand(160, Commandlist); actorCommandWindow.Y = GeexEdit.GameWindowHeight - 320; actorCommandWindow.BackOpacity = 160; actorCommandWindow.IsActive = false; actorCommandWindow.IsVisible = false; // Make other windows partyCommandWindow = new WindowPartyCommand(); helpWindow = new WindowHelp(); helpWindow.BackOpacity = 160; helpWindow.IsVisible = false; statusWindow = new WindowBattleStatus(); messageWindow = new WindowMessage(); }