void Update() { if (_gPlayer1.GetComponent <PlayerData>().score >= 100) { _bPlayer1Win = true; nowMenu = AllMenu.End; } else if (_gPlayer2.GetComponent <PlayerData>().score >= 100) { _bPlayer2Win = true; nowMenu = AllMenu.End; } switch (nowMenu) { case AllMenu.Game: //Game(); break; case AllMenu.End: if (!_bEnd) { End(); } break; } if (_bGoNewGame) { GoNewGame(); } }
private static void MenuInit() { Menu = MainMenu.AddMenu("Rengar - Lolscripts.net", "Rengar - Lolscripts.net"); Menu.AddGroupLabel("Rengar - Lolscripts.net CARGADO !!!"); Menu.AddLabel("Lolscripts.net"); Menu.AddLabel("Cualquier duda consulte en el post"); Menu.AddLabel("Lolscripts.net"); Menu.AddLabel("Lolscripts.net"); Menu.AddLabel("Diviértete !"); AllMenu = Menu.AddSubMenu("Config", "Config"); AllMenu.AddSeparator(); AllMenu.AddGroupLabel("Combo Modo"); AllMenu.AddLabel("| 1 -> One Shot || 2 -> Snare |"); AllMenu.Add("combo.mode", new Slider("Combo Modo", 1, 1, 2)); var switcher = AllMenu.Add("Switcher", new KeyBind("Combo Modo Switcher", false, KeyBind.BindTypes.HoldActive, (uint)'T')); switcher.OnValueChange += delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args) { if (args.NewValue == true) { var cast = AllMenu["combo.mode"].Cast <Slider>(); if (cast.CurrentValue == cast.MaxValue) { cast.CurrentValue = 0; } else { cast.CurrentValue++; } } }; AllMenu.Add("autoyoumu", new CheckBox("Auto Youmu con la Ulti")); AllMenu.Add("draw.mode", new CheckBox("Circulos Modo")); AllMenu.Add("draw.selectedenemy", new CheckBox("Circulo en target seleccionado")); AllMenu.Add("magnet.enable", new CheckBox("Activar Iman")); AllMenu.Add("use.smite", new CheckBox("Usar Smite en Combo")); AllMenu.Add("useeoutofq", new CheckBox("Usar E fuera del rango de la Q")); AllMenu.AddSeparator(); AllMenu.AddGroupLabel("LimpiarLinea Modo"); AllMenu.Add("laneclear.q", new CheckBox("Usar Q")); AllMenu.Add("laneclear.w", new CheckBox("Usar W")); AllMenu.Add("laneclear.e", new CheckBox("Usar E")); AllMenu.Add("laneclear.save", new CheckBox("Guardar Stacks", false)); AllMenu.AddSeparator(); AllMenu.AddGroupLabel("LimpiarJungla Modo"); AllMenu.Add("jungleclear.q", new CheckBox("Usar Q")); AllMenu.Add("jungleclear.w", new CheckBox("Usar W")); AllMenu.Add("jungleclear.e", new CheckBox("Usar E")); AllMenu.Add("jungleclear.save", new CheckBox("Guardar Stacks", false)); AllMenu.AddSeparator(); AllMenu.AddGroupLabel("Auto Hp %x when 5 prio"); AllMenu.Add("autohp.active", new CheckBox("AutoHP Activo")); AllMenu.Add("autohp.value", new Slider("AutoHP Valor", 30, 1)); AllMenu.AddSeparator(); AllMenu.Add("skin.active", new CheckBox("Skin Hack Activo")); AllMenu.AddLabel("| 1 -> HeadHunter || 2 -> NighHunter || 3-> SSW"); AllMenu.Add("skin.value", new Slider("Seleccionado Skin", 3, 1, 3)); }
public async Task <ActionResult> DeleteConfirmed(int id) { AllMenu allMenu = await db.AllMenu.FindAsync(id); db.AllMenu.Remove(allMenu); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
void Game() { if (!_bPlayer1Win && !_bPlayer2Win) { //_gPutFish.FishUpdate(); } else { nowMenu = AllMenu.End; } }
public async Task <ActionResult> Edit([Bind(Include = "MenuId,SubMenuId,MenuName,ControlerName,ActionName")] AllMenu allMenu) { if (ModelState.IsValid) { db.Entry(allMenu).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(allMenu)); }
public bool CheckRouteAccess(string url = null) { string checkUrl = !string.IsNullOrWhiteSpace(url) ? url : CurrRoute; if (string.IsNullOrWhiteSpace(checkUrl) && AuthMenu.Count > 0) { return(false); } List <NavMenu> DeniedAccess = AllMenu.FindAll(allItem => !AuthMenu.Exists(authItem => authItem.ItemId == allItem.Id)); return(!DeniedAccess.Exists(menu => checkUrl == menu.Url)); }
public void CloseBtn() { nowMenu = AllMenu.Menu; _gStart_Background.SetActive(true); _gStart_CloBtn.SetActive(false); _gStart_Title.SetActive(true); _gStart_Stuff.SetActive(true); _gStart_Game.SetActive(true); _gStart_Help.SetActive(true); _gStuff_Stuff.SetActive(false); _gHelp_Help.SetActive(false); _gGame.SetActive(false); }
/*public void StartAnime() * { * _gStartAnime.S * }*/ public void StartMenuBtn() { nowMenu = AllMenu.Menu; _gStart_Stuff.SetActive(true); _gStart_Game.SetActive(true); _gStart_Help.SetActive(true); //_gStart_CloStuff.SetActive(false); _gStuff_Stuff.SetActive(false); _gHelp_Help.SetActive(false); _gGame.SetActive(false); //print("GoToStartMenu"); }
public List <TreeSelectListItem> GetUserMenu() { if (ConfigInfo.IsQuickDebug == true) { return(AllMenu.AsQueryable().GetTreeSelectListItems(null, null, x => x.PageName, null, x => x.ICon, x => x.Url, SortByName: false));; } else { var rv = AllMenu.Where(x => x.ShowOnMenu == true).AsQueryable().GetTreeSelectListItems(null, null, x => x.PageName, null, x => x.ICon, x => x.IsInside == true ? x.Url : "/_framework/outside?url=" + x.Url, SortByName: false); RemoveUnAccessableMenu(rv, LoginUserInfo); RemoveEmptyMenu(rv); return(rv); } }
public void StuffBtn() { nowMenu = AllMenu.Staff; _gStart_Background.SetActive(false); _gStart_CloBtn.SetActive(true); _gStart_Title.SetActive(false); _gStart_Stuff.SetActive(false); _gStart_Game.SetActive(false); _gStart_Help.SetActive(false); _gStuff_Stuff.SetActive(true); _gHelp_Help.SetActive(false); _gGame.SetActive(false); //print("GoToStuff"); }
// GET: AllMenus/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AllMenu allMenu = await db.AllMenu.FindAsync(id); if (allMenu == null) { return(HttpNotFound()); } return(View(allMenu)); }
public void PlayerWin(Player.AllPlayer _whichPlayer) { nowMenu = AllMenu.End; switch (_whichPlayer) { case Player.AllPlayer.noPlayer: break; case Player.AllPlayer.player1: _bPlayer1Win = true; break; case Player.AllPlayer.player2: _bPlayer2Win = true; break; } }
public void GameBtn() { nowMenu = AllMenu.Game; _gStart.SetActive(false); //_gStart_Title.SetActive(false); //_gStart_Stuff.SetActive(false); //_gStart_Game.SetActive(false); //_gStart_Help.SetActive(false); //_gStuff_Stuff.SetActive(false); //_gHelp_Help.SetActive(false); _gGame.SetActive(true); //_gGame_UI.SetActive(true); _gCamera.GetComponent <AudioSource>().clip = _audioGame; _gCamera.GetComponent <AudioSource>().Play(); _gCamera.GetComponent <AudioSource>().clip = _audioGame; _gCamera.GetComponent <AudioSource>().Play(); //print("GoToGame"); }
public async Task <ActionResult> Create([Bind(Include = "MenuId,SubMenuId,MenuName,ControlerName,ActionName")] AllMenu allMenu) { if (ModelState.IsValid) { int a = db.AllMenu.Where(p => p.ControlerName == allMenu.ControlerName).Where(c => c.ActionName == allMenu.ActionName).Count(); //db.Database.SqlQuery<Fttx_Orm.Models.AllMenu>("Select ActionName from AllMenu where ControlerName=@ControlerName and ActionName=@ActionName", new { allMenu.ControlerName, allMenu.ActionName }).ToString(); if (a == 0) { db.AllMenu.Add(allMenu); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Create")); } } ViewBag.SubMenuId = new SelectList(db.Database.SqlQuery <Fttx_Orm.Models.AllMenu>("Select * from AllMenu where SubMenuId=0").ToList(), "MenuId", "MenuName", allMenu.MenuId); ViewBag.MenuName = new SelectList(db.Database.SqlQuery <Fttx_Orm.Models.AllMenu>("Select * from AllMenu where SubMenuId!=0").ToList(), "MenuId", "MenuName", allMenu.MenuId); ViewBag.ControlerName = BLL.GetControllerNames(); return(View(allMenu)); }
void SetTotalDiscount() { DiscountModel currentDiscount = new DiscountModel(); if (TotalDiscount1) { currentDiscount = new DiscountModel { DiscountName = Discounts[0].DiscountName, Amount = Discounts[0].Amount, IsPercentage = Discounts[0].IsPercentage } } ; else if (TotalDiscount2) { currentDiscount = new DiscountModel { DiscountName = Discounts[1].DiscountName, Amount = Discounts[1].Amount, IsPercentage = Discounts[1].IsPercentage } } ; else if (TotalDiscount3) { currentDiscount = new DiscountModel { DiscountName = Discounts[2].DiscountName, Amount = Discounts[2].Amount, IsPercentage = Discounts[2].IsPercentage } } ; else if (TotalDiscount4) { currentDiscount = new DiscountModel { DiscountName = Discounts[3].DiscountName, Amount = Discounts[3].Amount, IsPercentage = Discounts[3].IsPercentage } } ; CurrentTotalDiscount = currentDiscount; } void OpenOption(ItemModel item) { CurrentItem = item; CurrentOption = new List <string>(); OptionList = new List <ItemOptionModel>(); if (!string.IsNullOrEmpty(item.Option1)) { OptionList.Add(new ItemOptionModel() { OptionName = item.Option1, Price = item.Option1Price }); } if (!string.IsNullOrEmpty(item.Option2)) { OptionList.Add(new ItemOptionModel() { OptionName = item.Option2, Price = item.Option2Price }); } if (!string.IsNullOrEmpty(item.Option3)) { OptionList.Add(new ItemOptionModel() { OptionName = item.Option3, Price = item.Option3Price }); } if (!string.IsNullOrEmpty(item.Option4)) { OptionList.Add(new ItemOptionModel() { OptionName = item.Option4, Price = item.Option4Price }); } foreach (var option in OptionList) { CurrentOption.Add(option.OptionName + " ( +" + option.Price.ToString("#,0.00") + " )"); } CurrentItemPrice = item.Price; if (item.Option2 == null && item.Option3 == null && item.Option4 == null) { if (!string.IsNullOrEmpty(item.Option1)) { OptionList.Add(new ItemOptionModel() { OptionName = item.Option1, Price = item.Option1Price }); } CurrentSelectedOptionIndex = 0; CurrentItemPrice = item.Price; SaveItemToTicket(); } else { PopupNavigation.PushAsync(new ItemPopup(this)); } } void SetItemMenu() { if (App.ListCategoryModels == null) { var getCate = _service.GetAllCategories(); if (!getCate.Result.IsError) { CategoriesList = getCate.Result.Categories; App.ListCategoryModels = CategoriesList; } } else { CategoriesList = App.ListCategoryModels; } if (CategoriesList == null) { CategoriesList = new List <CategoryModel>(); foreach (var category in CategoriesList) { AllMenu.Add(new MenuModel() { CategoryName = category.Name, Items = new ObservableCollection <ItemModel>() }); } } ItemsViewModel items; if (App.ItemsManuViewModel == null || App.ItemsManuViewModel.Items.Count == 0) { items = _service.GetItems(); App.ItemsManuViewModel = items; } else { items = App.ItemsManuViewModel; } if (items.Items == null || items.Items.Count == 0) { //Application.Current.MainPage.DisplayAlert("", "ไม่พบรายการอาหารในระบบ", "OK"); //PopupNavigation.PushAsync(new Error(new ErrorViewModel("ไม่พบรายการอาหารในระบบ"))); return; } foreach (var item in items.Items) { var isCatExist = AllMenu.Where(a => a.CategoryName == item.CategoryName).FirstOrDefault(); if (isCatExist == null) { AllMenu.Add(new MenuModel() { CategoryName = item.CategoryName, Items = new ObservableCollection <ItemModel>() });; } if (item.Color == null) { item.Color = "DDDDDD"; } AllMenu.Where(a => a.CategoryName == item.CategoryName).FirstOrDefault().Items.Add(item); } } void SaveTicket() { var maxNumber = 0; try { maxNumber = App.TicketList.Max(t => t.TicketNumber); } catch (Exception e) { } ReceiptViewModel receipt = new ReceiptViewModel() { ItemList = CurrentTicket.ToList(), Total = TotalPrice, TicketNumber = maxNumber + 1, CreateDateTime = DateTime.Now, }; App.TicketList.Add(receipt); ClearTicket(); } void OpenTicketList() { ClearTicket(); PopupNavigation.PushAsync(new OpenTicketsPopup(this)); TicketList = App.TicketList; } void ClearTicket() { CurrentTicket = new ObservableCollection <OrderItemModel>(); Quantity = 1; QuantityChangeCommand = new Command <string>((change) => QuantityChange(change)); SaveItemCommand = new Command(SaveItemToTicket); CurrentTicket = new ObservableCollection <OrderItemModel>(); CurrentTotalDiscount = new DiscountModel(); CurrentDiscountAmount = 0; TotalPrice = 0; ShowOpenButton = true; } void OpenTicket(int ticketNumber) { var ticket = App.TicketList.Where(t => t.TicketNumber == ticketNumber).FirstOrDefault(); if (ticket.ItemList == null || ticket.ItemList.Count == 0) { return; } foreach (var item in ticket.ItemList) { CurrentTicket.Add(item); TotalPrice += item.DiscountedPrice; } App.TicketList.Remove(ticket); PopupNavigation.PopAllAsync(); } void Charge() { if (CurrentTicket == null || CurrentTicket.Count == 0) { PopupNavigation.PushAsync(new Error(new ErrorViewModel("Please add item to ticket before proceeding"))); return; } decimal totalDiscount = 0; foreach (var item in CurrentTicket) { totalDiscount += item.ItemDiscount; } ReceiptViewModel receipt = new ReceiptViewModel() { ItemList = CurrentTicket.ToList(), Total = TotalPrice, CreateDateTime = DateTime.Now, TotalDiscount = totalDiscount + CurrentDiscountAmount, Discount = CurrentDiscountAmount, }; Application.Current.MainPage.Navigation.PushAsync(new ChargePage(receipt)); } void GetDiscount() { var discountVM = _service.GetDiscounts(); Discounts = discountVM.Discounts; if (Discounts.Count > 0) { DiscountName1 = Discounts[0].DiscountName; HasDiscount1 = true; Discount1 = false; } if (Discounts.Count > 1) { DiscountName2 = Discounts[1].DiscountName; HasDiscount2 = true; Discount2 = false; } if (Discounts.Count > 2) { DiscountName3 = Discounts[2].DiscountName; HasDiscount3 = true; Discount3 = false; } if (Discounts.Count > 3) { DiscountName4 = Discounts[3].DiscountName; HasDiscount4 = true; Discount4 = false; } } void DeleteItem(OrderItemModel model) { CurrentTicket.Remove(model); CalculateTotalAmount(); } void CloudsyncClick() { IsLoadding = true; var getCate = _service.GetAllCategories(); if (!getCate.Result.IsError) { CategoriesList = getCate.Result.Categories; App.ListCategoryModels = CategoriesList; } var items = _service.GetItems(); if (items.Items == null || items.Items.Count == 0) { //Application.Current.MainPage.DisplayAlert("", "ไม่พบรายการอาหารในระบบ", "OK"); //PopupNavigation.PushAsync(new Error(new ErrorViewModel("ไม่พบรายการอาหารในระบบ"))); return; } App.ItemsManuViewModel = items; Application.Current.MainPage = new NavigationPage(new Views.SaleView()); }