예제 #1
0
 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));
        }
예제 #3
0
        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();
        }
예제 #5
0
        /// <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());
        }
예제 #8
0
        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);
        }
예제 #9
0
 /// <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);
 }
예제 #10
0
        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));
        }
예제 #12
0
        /// <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);
        }
예제 #13
0
        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;
        }
예제 #14
0
        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);
        }
예제 #15
0
        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);
        }
예제 #16
0
        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);
        }
예제 #17
0
        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>();
        }
예제 #18
0
        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;
            }
        }
예제 #19
0
        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));
        }
예제 #20
0
        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;
            }
        }
예제 #21
0
파일: MenuButton.cs 프로젝트: ywscr/Pinta
 protected override void OnDestroyed()
 {
     creator = null;
     base.OnDestroyed();
 }
예제 #22
0
파일: MenuButton.cs 프로젝트: msiyer/Pinta
		protected override void OnDestroyed ()
		{
			creator = null;
			base.OnDestroyed ();
		}
예제 #23
0
		protected override void OnDestroyed ()
		{
			creator = null;
			contextMenuCreator = null;

			base.OnDestroyed ();
		}
예제 #24
0
 /// <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);
 }