当前位置: 首页>>代码示例>>C#>>正文


C# Menu类代码示例

本文整理汇总了C#中Menu的典型用法代码示例。如果您正苦于以下问题:C# Menu类的具体用法?C# Menu怎么用?C# Menu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Menu类属于命名空间,在下文中一共展示了Menu类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadingOnOnLoadingComplete

        private static void LoadingOnOnLoadingComplete(EventArgs args)
        {
            //Menu
            BaseUltMenu = MainMenu.AddMenu("BaseUlt+", "baseUltMenu");
            BaseUltMenu.AddGroupLabel("BaseUlt+ General");
            BaseUltMenu.AddSeparator();
            BaseUltMenu.Add("baseult", new CheckBox("BaseUlt"));
            BaseUltMenu.Add("showrecalls", new CheckBox("Show Recalls"));
            BaseUltMenu.Add("showallies", new CheckBox("Show Allies"));
            BaseUltMenu.Add("showenemies", new CheckBox("Show Enemies"));
            BaseUltMenu.Add("checkcollision", new CheckBox("Check Collision"));
            BaseUltMenu.AddSeparator();
            BaseUltMenu.Add("timeLimit", new Slider("FOW Time Limit (SEC)", 20, 0, 120));
            BaseUltMenu.AddSeparator();
            BaseUltMenu.Add("nobaseult", new KeyBind("No BaseUlt while", false, KeyBind.BindTypes.HoldActive, 32));
            BaseUltMenu.AddSeparator();
            BaseUltMenu.Add("x", new Slider("Offset X", 0, -500, 500));
            BaseUltMenu.Add("y", new Slider("Offset Y", 0, -500, 500));
            BaseUltMenu.AddGroupLabel("BaseUlt+ Targets");
            foreach (var unit in HeroManager.Enemies)
            {
                BaseUltMenu.Add("target" + unit.ChampionName, new CheckBox(string.Format("{0} ({1})", unit.ChampionName, unit.Name)));
            }
            BaseUltMenu.AddGroupLabel("BaseUlt+ Credits");
            BaseUltMenu.AddLabel("By: LunarBlue");
            BaseUltMenu.AddLabel("Testing: FinnDev");

            // Initialize the Addon
            OfficialAddon.Initialize();

            // Listen to the two main events for the Addon
            Game.OnUpdate += args1 => OfficialAddon.OnUpdate();
            Drawing.OnEndScene += args1 => OfficialAddon.OnEndScene();
            Teleport.OnTeleport += OfficialAddon.OnTeleport;
        }
开发者ID:elosupport,项目名称:Korean,代码行数:35,代码来源:Program.cs

示例2: btnAdd_Click

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string loginID = "1";
        try
        {
            if (Session["Login"] == null) { Session["PreviousPage"] = HttpContext.Current.Request.Url.AbsoluteUri; Response.Redirect("../LoginPage.aspx"); }

            loginID = ((Login)Session["Login"]).LoginID.ToString();
        }
        catch (Exception ex)
        { }

        Menu menu = new Menu();

        menu.MenuTitle = txtMenuTitle.Text;
        menu.ModuleID = Int32.Parse(ddlModule.SelectedValue);
        menu.PageID = Int32.Parse(ddlPage.SelectedValue);
        menu.ParentMenuID = Int32.Parse(ddlParentMenu.SelectedValue);
        menu.MenuOrder = decimal.Parse(txtMenuOrder.Text);
        menu.AddedBy = loginID;
        menu.AddedDate = DateTime.Now;
        menu.UpdatedBy = loginID;
        menu.UpdatedDate = DateTime.Now;
        menu.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue);
        int resutl = MenuManager.InsertMenu(menu);

        showMenuDataByModuleID(ddlModule.SelectedValue);
        btnClear_Click(this, new EventArgs());
    }
开发者ID:anam,项目名称:gp-HO,代码行数:29,代码来源:AdminMenuInsertUpdate.aspx.cs

示例3: Misc

 static Misc()
 {
     // Initialize the menu values
     Menu = Config.Menu.AddSubMenu("Misc");
     _drawQ = Menu.Add("drawQ", new CheckBox("Draw Q"));
     _drawW = Menu.Add("drawW", new CheckBox("Draw W"));
     _drawE = Menu.Add("drawE", new CheckBox("Draw E"));
     _drawReadySpellsOnly = Menu.Add("drawReady", new CheckBox("Draw ready spells only"));
     Menu.AddSeparator();
     _ksW = Menu.Add("ksQ", new CheckBox("KS with W"));
     _ksR = Menu.Add("ksR", new CheckBox("KS with R"));
     Menu.AddSeparator();
     _useHeal = Menu.Add("useHeal", new CheckBox("Use Heal Smart"));
     _useQSS = Menu.Add("useQSS", new CheckBox("Use QSS"));
     Menu.AddSeparator();
     for (int i = 0; i < EntityManager.Heroes.Allies.Count; i++)
     {
         _useHealOn[i] = Menu.Add("useHeal" + i, new CheckBox("Use Heal to save " + EntityManager.Heroes.Allies[i].ChampionName));
     }
     Menu.AddSeparator();
     _useEOnGapcloser = Menu.Add("useEOnGapcloser", new CheckBox("Use E on Gapcloser", false));
     _EOnImmobileEnemy = Menu.Add("EOnImmobile", new CheckBox("Use E on immobile enemy"));
     _EOnSlowedEnemy = Menu.Add("EOnSlowed", new CheckBox("Use E on slowed enemy", false));
     _useEInterrupt = Menu.Add("EToInterrupt", new CheckBox("Use E as interrupt"));
     _interruptDangerLvl = Menu.Add("InterruptDangerLvl", new Slider("Interrupt Danger Lvl", 2, 1, 3));
     Menu.AddSeparator();
     _stealDrake = Menu.Add("stealDrake", new CheckBox("Try to steal Dragon"));
     _stealBaron = Menu.Add("stealBaron", new CheckBox("Try to steal Baron"));
     Menu.AddSeparator();
     _autolevelskills = Menu.Add("autolevelskills", new CheckBox("Autolevelskills"));
     _autoBuyStartingItems = Menu.Add("autoBuyStartingItems", new CheckBox("Autobuy Starting Items (SR only)"));
     Menu.AddSeparator();
     _useSkinHack = Menu.Add("useSkinHack", new CheckBox("Use Skinhack", false));
     _skinId = Menu.Add("skinId", new Slider("Skin ID", 6, 1, 14));
 }
开发者ID:TopGunner,项目名称:EloBuddy,代码行数:35,代码来源:Config.cs

示例4: Load_Auc

 private static void Load_Auc(EventArgs args)
 {
     Menu_Auc = MainMenu.AddMenu("A--U--C", "AUC_Orbwalk_" + Player.Instance.ChampionName);
     Menu_Auc.AddLabel("AUC Orbwalker by Lekks",30);
     Menu_Auc.AddLabel("If you enable AUC Orbwalker  the Common Orbwalker will get Disabled.");
     new Addons.Orbwalker();
 }
开发者ID:KarmaPanda,项目名称:EloBuddy-1,代码行数:7,代码来源:Program.cs

示例5: SpellDrawer

        public SpellDrawer(Menu mainMenu)
        {
            Drawing.OnDraw += Drawing_OnDraw;

            menu = mainMenu;
            Game_OnGameLoad();
        }
开发者ID:GodLS,项目名称:EloBuddy-Addons,代码行数:7,代码来源:SpellDrawer.cs

示例6: OnGameLoad

        public static void OnGameLoad(EventArgs args)
        {
            Menu = MainMenu.AddMenu("Mastery Emote Spammer", "masteryemotespammermenu");
            Menu.AddLabel("Made by imsosharp, ported by ThugDoge");
            StringList(Menu, "mode", "Mode", new []{ "MASTERY", "LAUGH" }, 0);
            StringList(Menu, "chatdisrespectmode", "Chat Disrespect Mode", new[] { "DISABLED", "CHAMPION NAME", "SUMMONER NAME" }, 0);
            Menu.Add("onkill", new CheckBox("After Kill"));
            Menu.Add("onassist", new CheckBox("After Assist"));
            Menu.Add("ondeath", new CheckBox("After Death", false));
            Menu.Add("neardead", new CheckBox("Near Dead Bodies"));
            Menu.Add("ondodgedskillshot", new CheckBox("After you dodge a skillshot"));
            Menu.Add("afterignite", new CheckBox("Dubstep Ignite"));
            Menu.Add("afterflash", new CheckBox("Challenger Flash", false));
            Menu.Add("afterq", new CheckBox("After Q", false));
            Menu.Add("afterw", new CheckBox("After W", false));
            Menu.Add("aftere", new CheckBox("After E", false));
            Menu.Add("afterr", new CheckBox("After R", false));

            Random = new Random();
            FlashSlot = ObjectManager.Player.GetSpellSlotFromName("SummonerFlash");
            IgniteSlot = ObjectManager.Player.GetSpellSlotFromName("SummonerDot");
            Game.OnUpdate += OnUpdate;
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;

            //init chat disrespekter
            foreach (var en in ObjectManager.Get<AIHeroClient>().Where(h => h.IsEnemy))
            {
                DeathsHistory.Add(en.NetworkId, en.Deaths);
            }
        }
开发者ID:roaxtreil,项目名称:EBRepo,代码行数:30,代码来源:Program.cs

示例7: DebugMenu

 static DebugMenu()
 {
     MenuDebug = Config.Menu.AddSubMenu("Debug");
     MenuDebug.AddLabel("This is for debugging purposes only.");
     _debugChat = MenuDebug.Add("debugChat", new CheckBox("Show debug messages in chat", false));
     _debugConsole = MenuDebug.Add("debugConsole", new CheckBox("Show debug messages in console", false));
 }
开发者ID:tramyeu,项目名称:EloBuddy,代码行数:7,代码来源:Config.cs

示例8: Config

        static Config()
        {
            // Initialize the menu
            Menu = MainMenu.AddMenu(MenuName, MenuName.ToLower());
            Menu.AddGroupLabel("Welcome to Ultimate Zhonyas by TopGunner");

        }
开发者ID:denizereer3,项目名称:EloBuddy,代码行数:7,代码来源:Config.cs

示例9: btnUpdate_Click

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        string loginID = "1";
        try
        {
            if (Session["Login"] == null) { Session["PreviousPage"] = HttpContext.Current.Request.Url.AbsoluteUri; Response.Redirect("../LoginPage.aspx"); }

            loginID = ((Login)Session["Login"]).LoginID.ToString();
        }
        catch (Exception ex)
        { }
        Menu menu = new Menu();
        menu = MenuManager.GetMenuByID(Int32.Parse(hfMenuID.Value));
        Menu tempMenu = new Menu();
        tempMenu.MenuID = menu.MenuID;

        tempMenu.MenuTitle = txtMenuTitle.Text;
        tempMenu.ModuleID = Int32.Parse(ddlModule.SelectedValue);
        tempMenu.PageID = Int32.Parse(ddlPage.SelectedValue);
        tempMenu.ParentMenuID = Int32.Parse(ddlParentMenu.SelectedValue);
        tempMenu.MenuOrder = decimal.Parse(txtMenuOrder.Text);
        tempMenu.AddedBy = loginID;
        tempMenu.AddedDate = DateTime.Now;
        tempMenu.UpdatedBy = loginID;
        tempMenu.UpdatedDate = DateTime.Now;
        tempMenu.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue);
        bool result = MenuManager.UpdateMenu(tempMenu);

        Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri.Split('?')[0]+"?ModuleID="+ddlModule.SelectedValue);

        //showMenuDataByModuleID(ddlModule.SelectedValue);
        //btnClear_Click(this, new EventArgs());
    }
开发者ID:anam,项目名称:gp-HO,代码行数:33,代码来源:AdminMenuInsertUpdate.aspx.cs

示例10: Main

 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     menu = new Menu();
     Application.Run(menu);
 }
开发者ID:DeKal,项目名称:2048,代码行数:7,代码来源:Program.cs

示例11: Initialize

        public static void Initialize()
        {
            Menu_ = MainMenu.AddMenu("ElTristana", "menu");

            comboMenu = Menu_.AddSubMenu("Combo", "Combo");
            comboMenu.Add("ElTristana.Combo.Q", new CheckBox("Use Q"));
            comboMenu.Add("ElTristana.Combo.E", new CheckBox("Use E"));
            comboMenu.Add("ElTristana.Combo.R", new CheckBox("Use R"));
            comboMenu.Add("ElTristana.Combo.OnlyQ", new CheckBox("Only Q if target has E"));
            comboMenu.Add("ElTristana.Combo.Focus.E", new CheckBox("Focus E target"));
            comboMenu.Add("ElTristana.Combo.Always.RE", new CheckBox("Use E + R finisher"));
            comboMenu.Add("ElTristana.Combo.E.Mana", new Slider("Minimum mana for E", 25));
            comboMenu.AddSeparator();
            comboMenu.Add("ElTristana.Combo.E.KeyBind", new KeyBind("Semi-Manual E", false, KeyBind.BindTypes.HoldActive, 'E'));
            comboMenu.AddSeparator();
            foreach (var hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.IsEnemy))
                comboMenu.Add("ElTristana.E.On" + hero.NetworkId, new CheckBox("E? : " + hero.ChampionName));

            suicideMenu = Menu_.AddSubMenu("W settings", "Suicide menu");
            suicideMenu.Add("ElTristana.W", new CheckBox("Use this special feature", false));
            suicideMenu.Add("ElTristana.W.Jump.kill", new CheckBox("Only jump when killable", false));
            suicideMenu.Add("ElTristana.W.Jump.tower", new CheckBox("Check under tower"));
            suicideMenu.Add("ElTristana.W.Jump", new CheckBox("W to enemy with 4 stacks"));
            suicideMenu.Add("ElTristana.W.Enemies", new Slider("Only jump when enemies in range", 1, 1, 5));
            suicideMenu.Add("ElTristana.W.Enemies.Range", new Slider("Enemies in range distance check", 1500, 800, 2000));

            harassMenu = Menu_.AddSubMenu("Harass", "Harass");
            harassMenu.Add("ElTristana.Harass.Q", new CheckBox("Use Q"));
            harassMenu.Add("ElTristana.Harass.E", new CheckBox("Use E"));
            harassMenu.Add("ElTristana.Harass.QE", new CheckBox("Use Q only with E"));
            harassMenu.Add("ElTristana.Harass.E.Mana", new Slider("Minimum mana for E", 25));
            foreach (var hero in ObjectManager.Get<AIHeroClient>().Where(hero => hero.IsEnemy))
                harassMenu.Add("ElTristana.E.On.Harass" + hero.NetworkId, new CheckBox("E? : " + hero.CharData.BaseSkinName));

            laneClearMenu = Menu_.AddSubMenu("Laneclear", "Laneclear");
            laneClearMenu.Add("ElTristana.LaneClear.Q", new CheckBox("Use Q"));
            laneClearMenu.Add("ElTristana.LaneClear.E", new CheckBox("Use E"));
            laneClearMenu.Add("ElTristana.LaneClear.Tower", new CheckBox("Use E on tower"));
            laneClearMenu.Add("ElTristana.LaneClear.E.Mana", new Slider("Minimum mana for E", 25));

            jungleClearMenu = Menu_.AddSubMenu("Jungleclear", "Jungleclear");
            jungleClearMenu.Add("ElTristana.JungleClear.Q", new CheckBox("Use Q"));
            jungleClearMenu.Add("ElTristana.JungleClear.E", new CheckBox("Use E"));
            jungleClearMenu.Add("ElTristana.JungleClear.E.Mana", new Slider("Minimum mana for E", 25));

            killstealMenu = Menu_.AddSubMenu("Killsteal", "Killsteal");
            killstealMenu.Add("ElTristana.killsteal.Active", new CheckBox("Activate killsteal"));
            killstealMenu.Add("ElTristana.Killsteal.R", new CheckBox("Use R"));

            miscMenu = Menu_.AddSubMenu("Misc", "Misc");
            miscMenu.Add("ElTristana.Draw.off", new CheckBox("Turn drawings off"));
            miscMenu.Add("ElTristana.DrawStacks", new CheckBox("Draw E stacks"));
            miscMenu.Add("ElTristana.Draw.Q", new CheckBox("Draw Q"));
            miscMenu.Add("ElTristana.Draw.E", new CheckBox("Draw E"));
            miscMenu.Add("ElTristana.Draw.R", new CheckBox("Draw R"));
            miscMenu.Add("ElTristana.Antigapcloser", new CheckBox("Antigapcloser", false));
            miscMenu.Add("ElTristana.Interrupter", new CheckBox("Interrupter", false));

            Console.WriteLine("Menu Loaded");
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:60,代码来源:MenuInit.cs

示例12: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            lastPing = Environment.TickCount;

            foreach (var enemy in ObjectManager.Get<AIHeroClient>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                herosVisible[enemy.NetworkId] = Environment.TickCount;
                herosPinged[enemy.NetworkId] = Environment.TickCount;
                plannedPings[enemy.NetworkId] = 0;
            }

            Config = MainMenu.AddMenu("Perfect Ping", "Perfect Ping");
            Config.Add("Enabled", new CheckBox("Enabled", true));
            //Config.Add("localPing", new CheckBox("Local ping", true));
            Config.Add("autoDisableTime", new Slider("Auto disable after (minutes)", 25, 10, 60));
            Config.Add("heroVisibleTimeout", new Slider("Time visible before detect (ms)", 1500, 0, 2000));
            Config.Add("heroPingTimeout", new Slider("Time before pinging hero again (ms)", 10000, 0, 10000));
            Config.Add("pingTimeout", new Slider("Time between seperate ping (ms)", 3000, 0, 6000));
            Config.Add("pingType", new EloBuddy.SDK.Menu.Values.Slider("Type of ping to use (Normal, Fallback, Danger)", 1, 1, 3));

            MapPosition.Initialize();
            Game.OnUpdate += OnUpdate;

            Chat.Print("<font color = \"#6B9FE3\">Perfect Ping</font><font color = \"#E3AF6B\"> by BestAkaliAfrica</font>. You like ? Buy me a coffee :p");
        }
开发者ID:xTeKillax,项目名称:EloBuddy,代码行数:25,代码来源:Program.cs

示例13: Lobby

        public Lobby(Menu parent)
        {
            InitializeComponent();

            ImageBrush myBrush = new ImageBrush();
            myBrush.ImageSource = new BitmapImage(new Uri(".\\Resources\\icon_backarrow.png", UriKind.Relative));
            bekk.Background = myBrush;

            ImageBrush myBrush2 = new ImageBrush();
            myBrush2.ImageSource = new BitmapImage(new Uri(".\\Resources\\icon_closebutton.png", UriKind.Relative));
            klóz.Background = myBrush2;

            this.parent = parent;

            chatbox.Items.Clear();

            refreshworker = new BackgroundWorker();
            refreshworker.WorkerSupportsCancellation = true;
            refreshworker.WorkerReportsProgress = true;
            refreshworker.DoWork += refresh;
            refreshworker.ProgressChanged += refreshUI;

            activityworker = new BackgroundWorker();
            activityworker.WorkerSupportsCancellation = true;
            activityworker.DoWork += wait;
            activityworker.RunWorkerCompleted += doActivity;
        }
开发者ID:BlackRebels,项目名称:IQ-Champions,代码行数:27,代码来源:Lobby.xaml.cs

示例14: Gameplay

        private Menu menu; // Reference to menu form

        #endregion Fields

        #region Constructors

        // Constructor
        public Gameplay(Engine initEngine, Menu initMenu, byte initCurrentState = (byte)state.Menu)
        {
            currentState = initCurrentState;        // These are all inherited from Menu --
            engine       = initEngine;              // 'Continue Game' has not been implemented yet,
            menu         = initMenu;                // so constructor will be with a fresh engine and
            InitializeComponent();                  // PreDeal state.
        }
开发者ID:jmelcher86,项目名称:Stuff,代码行数:14,代码来源:Gameplay.cs

示例15: TestSaveNew

        public void TestSaveNew()
        {
            var menuDao = A.Fake<IMenuDao>();
            var menuService = new MenuService(menuDao);

            var user = new User()
            {
                ContactNo = "123456",
                Email = "[email protected]",
                FullName = "Jayson Valeroso",
                Username = "jvalero"
            };

            var newMenu = new Menu()
            {
                Date = DateTime.Now
            };

            A.CallTo(() => menuDao.Save(newMenu)).Returns(newMenu);

            var savedMenu = menuService.SaveNew(newMenu, user);

            Assert.AreEqual(MenuStatus.Draft, savedMenu.MenuStatus);
            Assert.AreEqual("jvalero", savedMenu.Vendor.Username);
        }
开发者ID:jvaleroso,项目名称:FoodTrip,代码行数:25,代码来源:MenuServiceTest.cs


注:本文中的Menu类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。