static void Main(string[] args) { AlienDetailsInputter.ReadAlienInput(); AlienDetailsDisplayer.AlienDataDisplay(AlienDetailsInputter.getAlienDetails()); MenuCreator.FormatExporterMenu(); Console.ReadLine(); }
public async Task <ActionResult <MenuCreator> > PostMenuCreator(MenuCreator menuCreator) { _context.MenuCreator.Add(menuCreator); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMenuCreator", new { id = menuCreator.Id }, menuCreator)); }
public static void DoClear() { var target = EntityManager.MinionsAndMonsters.Monsters.FirstOrDefault(x => !x.IsDead && Spells.E.IsInRange(x)); if (!target.IsValidTarget(Spells.E.Range) || (MenuCreator.IsChecked(MenuCreator.JungleClearMenu, "jc.ferocity") && Player.Instance.Mana > 4)) { return; } switch (MenuCreator.GetSliderValue(MenuCreator.JungleClearMenu, "jc.ferocity.type")) { case 1: FocusQ(target); break; case 2: FocusW(target); break; case 3: FocusE(target); break; } }
protected override void OnDestroyed() { creator = null; contextMenuCreator = null; base.OnDestroyed(); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { KeyboardState keyboardState = Keyboard.GetState(); if (mainMenu.IsAlive) { updates.Update(gameTime); mainMenu.Update(gameTime); } // Allows the game to pause and exit if (!mainMenu.IsAlive && (GamePad.GetState(PlayerIndex.One).Buttons.Start == Microsoft.Xna.Framework.Input.ButtonState.Pressed || keyboardState.IsKeyDown(Keys.Escape) && !oldKeyboardState.IsKeyDown(Keys.Escape))) { //mainMenu = MenuCreator.createMainMenu(App.PrimaryController, App.Controllers, App.TitleSafeArea, gameManager, true); mainMenu = MenuCreator.createPauseMenu(App.PrimaryController, App.Controllers, App.TitleSafeArea, gameManager); } // Allows the game to exit if (!mainMenu.IsAlive) { //this.Exit(); gameManager.HandlePlayerInput(keyboardState, Mouse.GetState()); gameManager.UpdateScene(gameTime); } oldKeyboardState = keyboardState; //base.Update(gameTime); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MenuDaily,MenuDate")] MenuCreator menuCreator) { if (id != menuCreator.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(menuCreator); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MenuCreatorExists(menuCreator.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(menuCreator)); }
public async Task <IActionResult> PutMenuCreator(int id, MenuCreator menuCreator) { if (id != menuCreator.Id) { return(BadRequest()); } _context.Entry(menuCreator).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MenuCreatorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private void TestGlobalTemplateMenu(object sender, RoutedEventArgs e) { var position = XJK.SysX.Device.Mouse.GetPosition(); var globalPath = Path.Combine(ENV.BaseDirectory, Env.GlobalTemplateSettingFileName); var menu = MenuCreator.Create(ENV.BaseDirectory, "", globalPath); menu.Show(position); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here App.Initialize(graphics, updates); base.Initialize(); txtDescription = Content.Load <SpriteFont>("asd"); gameManager = new GameManager.GameManager(this); gameManager.Background = Content.Load <Texture2D>("background"); mainMenu = MenuCreator.createMainMenu(App.PrimaryController, App.Controllers, App.TitleSafeArea, gameManager); }
private void CreateMenuControl() { // build datastructure var menu = new MenuCreator(); var menuItems = menu.CreateMenuDataStructure(_layers, newToolStripMenuItem_Click, openToolStripMenuItem_Click, saveToolStripMenuItem_Click, exitToolStripMenuItem_Click, layerToolStripMenuItem_Click); // create a menustrip control from that data structure _menuStrip = menu.CreateMenu(menuItems); Controls.Add(_menuStrip); }
public async Task <IActionResult> Create([Bind("Id,MenuDaily,MenuDate")] MenuCreator menuCreator) { if (ModelState.IsValid) { _context.Add(menuCreator); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(menuCreator)); }
/// <summary> /// évènement de fin de niveau /// </summary> private void LevelSuccess() { int iNivCourant = _lstLevels.IndexOf(nivCourant) + 1; if (iNivCourant >= _lstLevels.Count) { iNivCourant = 0; } nivCourant = _lstLevels[iNivCourant]; _game.mainMenu = MenuCreator.createWinMenu(App.PrimaryController, App.Controllers, App.TitleSafeArea, this); }
static void InitRengod() { if (!Player.Instance.ChampionName.ToLower().Equals("rengar")) { return; } MenuCreator.Init(); ItemManager.Init(); Draw.Init(); Game.OnTick += OnTick; Obj_AI_Base.OnProcessSpellCast += OnProcessSpell; }
public static void ShowSubMenu() { ConsoleKeyInfo pressedKey; bool exitProgram = false; var menu = new MenuCreator <int>(); menu.AddMenuItem(ShowRandomValue, "Operacja 0", 10); menu.AddMenuItem(ShowRandomValue, "Operacja 1", 20); menu.AddMenuItem(ShowRandomValue, "Operacja 2", 30); menu.AddMenuItem(ShowRandomValue, "Operacja 3", 40); menu.AddMenuItem(ShowMainMenu, "Powrót do pierwszego menu"); pressedKey = menu.ShowMenu(ref exitProgram); }
private static void ShowMainMenu() { ConsoleKeyInfo pressedKey; bool exitProgram = false; var menu = new MenuCreator <int>(); menu.AddMenuItem(ShowSubMenu, "Show sub menu"); menu.AddMenuItem(ShowRandomValue, "Operacja 1", 20); menu.AddMenuItem(ShowRandomValue, "Operacja 2", 30); menu.AddMenuItem(ShowRandomValue, "Operacja 3", 40); menu.AddMenuItem(ShowHelloWord, "Show hello world"); pressedKey = menu.ShowMenu(ref exitProgram); }
static void Main(string[] args) { while (string.IsNullOrEmpty(temp) || Directory.Exists(temp)) { temp = Path.GetFullPath(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())); } Directory.CreateDirectory(temp); if (args.Length == 1) { switch (args[0]) { case "--uninstall": Uninstaller.Start(); break; } Directory.Delete(temp, true); Environment.Exit(0); return; } ShowIntro(); var loop = true; while (loop) { var index = MenuCreator.CreateMenu(new[] { "$OVM_MODE Open Voice Modder", "Open drivers setup", "Exit" }); switch (index) { case 0: OpenVoiceModder(); break; case 1: Drivers(); break; default: loop = false; break; } } Directory.Delete(temp, true); }
public SideBarViewModel(IHorsifyDialogService horsifyDialogService, IEventAggregator eventAggregator, IRegionManager regionManager, ILoggerFacade loggerFacade) : base(loggerFacade) { _eventAggregator = eventAggregator; _regionManager = regionManager; _horsifyDialogService = horsifyDialogService; Log("Loading SideBar..", Category.Debug, Priority.None); //Composite Menus and MenuItems mCreator = new MenuCreator(); //Builds all menu items from the _rootMenu SearchButtons = new ObservableCollection <ISearchButtonViewModel>(GenerateSearchButtonsForMenuComponent(mCreator._rootMenu)); eventAggregator.GetEvent <HorsifySearchCompletedEvent>().Subscribe(() => IsBusy = false); #region Commands Setup MenuHomeCommand = new DelegateCommand(() => { //Build items from the _rootMenu SearchButtons.Clear(); SearchButtons.AddRange(GenerateSearchButtonsForMenuComponent(mCreator._rootMenu)); }); NavigateDjHorsifyCommand = new DelegateCommand(() => _regionManager.RequestNavigate(Regions.ContentRegion, "DjHorsifyView")); //OPEN SEARCH OpenSearchCommand = new DelegateCommand(() => { eventAggregator.GetEvent <OnNavigateViewEvent <string> >() .Publish("InstantSearch"); }); NavigateCommand = new DelegateCommand <string>(OnNavigateView); if (SelectMenuCommand == null) { SelectMenuCommand = new DelegateCommand <SearchButtonViewModel>(async(sbm) => await SelectMenuAsync(sbm)); } MinimizeCommand = new DelegateCommand(OnMinimize); ShutdownCommand = new DelegateCommand(OnShutdown); #endregion ShutdownNotificationRequest = new InteractionRequest <IConfirmation>(); }
public static void DoCombo() { var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Physical); if (!target.IsValidTarget(Spells.E.Range)) { return; } if (target.Distance(Player.Instance) < 350) { var predictPos = Prediction.Position.PredictUnitPosition(target, 200); Orbwalker.OrbwalkTo(predictPos.To3D()); } if (Player.HasBuff(Globals.RENGAR_UTIMATE_DISPLAY_NAME) || Player.HasBuff(Globals.RENGAR_UTIMATE_NAME)) { if (Player.Instance.IsInAutoAttackRange(target)) { Player.IssueOrder(GameObjectOrder.AttackUnit, target); } else { return; } } switch (MenuCreator.GetSliderValue(MenuCreator.ComboMenu, "combo.type")) { case 1: FocusQ(target); break; case 2: FocusE(target); break; case 3: FocusW(target); break; } }
public async Task <IActionResult> Create(string foodCategories) { var obj = JsonConvert.DeserializeObject <MenuDeserializeObj>(foodCategories); if (!string.IsNullOrEmpty(foodCategories)) { var menuCreator = new MenuCreator() { MenuDaily = foodCategories, MenuDate = DateTime.Now }; _context.Add(menuCreator); await _context.SaveChangesAsync(); return(Json(true)); } return(Json(false)); }
public static void DoHarass() { var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Physical); if (!target.IsValidTarget(Spells.E.Range) || (MenuCreator.IsChecked(MenuCreator.HarassMenu, "hs.ferocity") && Player.Instance.Mana > 4)) { return; } switch (MenuCreator.GetSliderValue(MenuCreator.HarassMenu, "hs.ferocity.type")) { case 1: FocusQ(target); break; case 2: FocusW(target); break; case 3: FocusE(target); break; } }
protected override void OnDestroyed() { creator = null; base.OnDestroyed(); }
protected override void OnDestroyed () { creator = null; base.OnDestroyed (); }
protected override void OnDestroyed () { creator = null; contextMenuCreator = null; base.OnDestroyed (); }
/// <summary> /// évènement de la mort du joueur /// </summary> private void PlayerDead() { _ship.IsAlive = true; nivCourant = nivCourant; _game.mainMenu = MenuCreator.createDeathMenu(App.PrimaryController, App.Controllers, App.TitleSafeArea, this); }