示例#1
0
 /// <summary>
 /// 保存菜单
 /// </summary>
 /// <param name="m"></param>
 /// <returns></returns>
 public bool SaveMenu(Menu m, ref string err)
 {
     try
     {
         var mr = new MenuR();
         if (m.Id > 0)
         {
             return(mr.Update(m) > 0);
         }
         return(mr.Insert(m) > 0);;
     }
     catch
     {
         return(false);
     }
 }
示例#2
0
文件: Jinx.cs 项目: s1m421/ls-tools
        public Jinx()
        {
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W, 1500f);
            E = new Spell(SpellSlot.E, 920f);
            R = new Spell(SpellSlot.R, 3000f);
            W.SetSkillshot(0.6f, 60f, 3300f, true, SkillshotType.SkillshotLine);
            E.SetSkillshot(1.2f, 100f, 1750f, false, SkillshotType.SkillshotCircle);
            R.SetSkillshot(0.7f, 140f, 1500f, false, SkillshotType.SkillshotLine);


            MenuHero = MainMenu.Add(new Menu("MenuHero", Player.ChampionName));
            MenuDraw = MenuHero.Add(new Menu("MenuDraw", "Draw"));
            MenuDraw.Add(new MenuBool("Q", "Q range", true));
            MenuDraw.Add(new MenuBool("W", "W range", true));
            MenuDraw.Add(new MenuBool("E", "E range", true));
            MenuDraw.Add(new MenuBool("R", "R range", true));

            MenuQ = MenuHero.Add(new Menu("MenuQ", "Q Config"));
            MenuQ.Add(new MenuBool("Auto", "Auto", true));
            MenuQ.Add(new MenuBool("Mix", "Mix", true));

            MenuW = MenuHero.Add(new Menu("MenuW", "W Config"));
            MenuW.Add(new MenuBool("Auto", "Auto", true));
            MenuW.Add(new MenuBool("Mix", "Mix", true));
            MenuE = MenuHero.Add(new Menu("MenuE", "E Config"));
            MenuE.Add(new MenuBool("Auto", "Auto", true));
            MenuE.Add(new MenuBool("telE", "Auto E on teleport", true));
            MenuE.Add(new MenuBool("comboE", "Auto E combo logic", true));

            MenuR = MenuHero.Add(new Menu("MenuR", "R Config"));
            MenuR.Add(new MenuBool("Auto", "Auto", true));
            MenuR.Add(new MenuBool("Rturrent", "Don't R under turret", true));
            MenuR.Add(new MenuKeyBind("cast", "Lane Clear", System.Windows.Forms.Keys.T, KeyBindType.Toggle));

            MenuFarm = MenuHero.Add(new Menu("MenuFarm", "Farm"));
            MenuFarm.Add(new MenuSlider("Mana", "LaneClear mana ", 50));
            MenuFarm.Add(new MenuBool("Q", "Farm Q", true));

            Orbwalker.OnAction += OnAction;
            Game.OnUpdate      += Game_OnUpdate;
        }
示例#3
0
 /// <summary>
 /// 用户菜单列表
 /// 带用户权限
 /// </summary>
 /// <param name="account"></param>
 /// <returns></returns>
 public IList <Menu> MenuList(string account, int topId)
 {
     try
     {
         IMenuR menuR = new MenuR();
         //权限最大
         if (account.Equals("@ADMIN"))
         {
             return(menuR.IQueryable(i => i.TopMenuId == topId));
         }
         //除系统级外都显示
         if (account.Equals("ADMIN"))
         {
             return(menuR.IQueryable(i => i.TopMenuId == topId && i.Hiding == false && i.Stopping == false));
         }
         return(menuR.GetMenuList(account, topId));
     }
     catch
     {
         return(null);
     }
 }
示例#4
0
        /// <summary>
        /// 获得单个菜单
        /// </summary>
        /// <param name="topId"></param>
        /// <returns></returns>
        public Menu GetMenu(int id)
        {
            MenuR mr = new MenuR();

            return(mr.FindEntity(i => i.Id == id));
        }
示例#5
0
        /// <summary>
        /// 按顶级菜单获得全部菜单
        /// 无权限
        /// </summary>
        /// <param name="topId">顶级菜单</param>
        /// <returns></returns>
        public IList <Menu> AllMenus(int topId)
        {
            IMenuR menuR = new MenuR();

            return(menuR.FindList(i => i.TopMenuId == topId || i.Id == topId));
        }