• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WndEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args)
 {
     if (args.Msg == (uint)WindowsMessages.WM_RBUTTONDOWN)
     {
         LastClickPoint = Game.CursorPos.To2D();
     }
 }
开发者ID:badao,项目名称:ProjectFiora,代码行数:7,代码来源:OrbwalkLastClick.cs


示例2: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args)
 {
     if (args.WParam != 'F' || Game.IsChatOpen)
         return;
     _enabled = args.Msg != WmKeyup;
     Game.ExecuteCommand(string.Format("dota_player_units_auto_attack_after_spell {0}", _enabled?0:1));
 }
开发者ID:dendimonster,项目名称:EnsageSharp-1,代码行数:7,代码来源:Program.cs


示例3: Game_OnWndProc

 /// <summary>
 /// Fired when the game recieves a window event.
 /// </summary>
 /// <param name="args">The <see cref="WndEventArgs"/> instance containing the event data.</param>
 private static void Game_OnWndProc(WndEventArgs args)
 {
     foreach (var notification in NotificationsList)
     {
         notification.Value.OnWndProc(args);
     }
 }
开发者ID:ChewyMoon,项目名称:LeagueSharp.Common,代码行数:11,代码来源:Notifications.cs


示例4: OnKeyPress

 public void OnKeyPress(WndEventArgs args)
 {
     if (args.Msg == (uint)WindowMessages.LeftButtonDown)
     {
         if(OnMouseDown != null)
             OnMouseDown();
         isBeingClicked = true;
         if (MenuHandler.GetCheckboxValue(MenuHandler.Settings, "Debug Click Actions"))
             Console.WriteLine(DisplayName + " had left click pushed down on it.");
     }
     else if (args.Msg == (uint)WindowMessages.LeftButtonUp)
     {
         if (OnMouseRelease != null)
             OnMouseRelease();
         isBeingClicked = false;
         if(MenuHandler.GetCheckboxValue(MenuHandler.Settings, "Debug Click Actions"))
             Console.WriteLine(DisplayName + " had left click released on it.");
     }
     else if (args.Msg == (uint)WindowMessages.MouseMove)
     {
         if (OnMouseMove != null)
             OnMouseMove();
         if (MenuHandler.GetCheckboxValue(MenuHandler.Settings, "Debug Hover Actions"))
             Console.WriteLine(DisplayName + " had the mouse move over it.");
     }
 }
开发者ID:Sicryption,项目名称:EloBuddyAddons,代码行数:26,代码来源:Button.cs


示例5: Game_OnWndProc

        private static void Game_OnWndProc(WndEventArgs args)
        {
            if (args.Msg == 0x0100 && args.WParam == 0x60)
            {
                _firstKey = 0x60;
            }

            if (args.Msg != 0x0100 || !Keys.ToList().Contains((byte) args.WParam))
            {
                return;
            }

            var key = (int) args.WParam;
            if (_firstKey == 0x60)
            {
                _firstKey = key;
            }

            if (_firstKey == key)
            {
                return;
            }

            ObjectManager.Player.SwapItem(Array.IndexOf(Keys, _firstKey), Array.IndexOf(Keys, key));
            _firstKey = 0x60;
        }
开发者ID:RoachxD,项目名称:LeagueSharp-SDK,代码行数:26,代码来源:Program.cs


示例6: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args)
 {
     if (args.WParam == 'Z' && !Game.IsChatOpen && args.Msg == (uint) Utils.WindowsMessages.WM_KEYUP) {
         _enabled = true;
         _following = false;
     }
 }
开发者ID:jucelyn,项目名称:Ensage,代码行数:7,代码来源:Program.cs


示例7: OnWndMsg

 public static void OnWndMsg(WndEventArgs args)
 {
     foreach (var script in ScriptInitializer.Scripts)
     {
         script.Call(script.Globals["OnWndMsg"], args.Msg, args.WParam);
     }
 }
开发者ID:eddy5641,项目名称:LuaSharp,代码行数:7,代码来源:ApiHandler.cs


示例8: up

        private static ulong increaseSurroundingAlliesKey = 0x68; //arrow up (numpad)

        #endregion Fields

        #region Methods

        public static void GameOnOnWndProc(WndEventArgs args)
        {
            try
            {
                if (args.WParam == 'R' && !Game.IsChatOpen && args.Msg == 0x0100) //keydown (as soon as possible)
                {
                    logPos = ObjectMgr.LocalHero.Position.ToVector2();
                }

                //autoult toggle key pressed
                if (args.WParam == autoUltToggleKey && !Game.IsChatOpen && args.Msg == 0x0101) //keyup
                {
                    ToogleAutoUltBool = !ToogleAutoUltBool;
                }

                if (args.WParam == decreaseSurroundingAlliesKey && !Game.IsChatOpen && args.Msg == 0x0101) //keyup
                {
                    allySurroundingCountModifier--;
                }
                else if (args.WParam == increaseSurroundingAlliesKey &&
                         !Game.IsChatOpen && args.Msg == 0x0101) //keyup
                {
                    allySurroundingCountModifier++;
                }
            }
            catch
            {
                // ignored
            }
        }
开发者ID:DanThePman,项目名称:VengeFun,代码行数:36,代码来源:KeyHandler.cs


示例9: OnWndProc

        private static void OnWndProc(WndEventArgs args)
        {
            if (MenuGUI.IsChatOpen)
            {
                ActiveMode = ActiveModes.None;
                return;
            }

            if (Config.Keys.AllKeys.Contains(args.WParam))
            {
                var mode = ActiveModes.None;
                foreach (var entry in Config.Keys.ActiveModeLinks)
                {
                    if (entry.Key.Value.Key == args.WParam)
                    {
                        mode = mode | entry.Value;
                    }
                }

                switch (args.Msg)
                {
                    case (uint)WindowsMessages.WM_KEYDOWN:

                        ActiveMode = ActiveMode | mode;
                        break;

                    case (uint)WindowsMessages.WM_KEYUP:

                        ActiveMode = ActiveMode ^ mode;
                        break;
                }
            }
        }
开发者ID:koolkaracter,项目名称:LeagueSharp,代码行数:33,代码来源:Hero.cs


示例10: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args)
 {
     if (args.Msg == (uint)WindowsMessages.WM_KEYDOWN && args.WParam == 'R' && BadaoMainVariables.R.IsReady())
     {
         BadaoMissFortuneVariables.Rcount = Utils.GameTimeTickCount;
     }
 }
开发者ID:badao,项目名称:BadaoKingdomTest,代码行数:7,代码来源:BadaoMissFortuneCombo.cs


示例11: Game_OnWndProc

        private void Game_OnWndProc(WndEventArgs args)
        {
            //Program.debug("WND: " + args.WParam);
            if(args.WParam == 16)
            {
                var priority = Config.Item("TsAa").GetValue<StringList>().SelectedIndex == 1;
                foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                {
                    Config.Item("TsAaPriority" + enemy.ChampionName).Show(priority);

                }

                Config.Item("extraFocus").Show(!priority);
                Config.Item("extraRang").Show(!priority && Config.Item("extraFocus").GetValue<bool>());
                Config.Item("extraTime").Show(!priority && Config.Item("extraFocus").GetValue<bool>());
                Config.Item("drawFocus").Show(!priority && Config.Item("extraFocus").GetValue<bool>());

                if(Config.Item("TsAa").GetValue<StringList>().SelectedIndex == 2)
                {
                    foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(enemy => enemy.IsEnemy))
                    {
                        Config.Item("TsAaPriority" + enemy.ChampionName).Show(false);

                    }
                    Config.Item("extraFocus").Show(false);
                    Config.Item("extraRang").Show(false);
                    Config.Item("extraTime").Show(false);
                    Config.Item("drawFocus").Show(false);
                }
            }
        }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:31,代码来源:OktwTs.cs


示例12: OnWndProc

        public void OnWndProc(WndEventArgs args)
        {
            if (args.Msg == WM_MOUSEDOWN)
            {
                if (args.WParam == VK_LBUTTON && Config.Item("placekey").GetValue<KeyBind>().Active)
                {
                    Vector3? nearestWard = Ward.FindNearestWardSpot(Drawing.ScreenToWorld(Game.CursorPos.X, Game.CursorPos.Y));

                    if (nearestWard != null)
                    {
                        InventorySlot wardSpellSlot = Items.GetWardSlot();
                         
                         if (wardSpellSlot != null)
                         {
                             wardSpellSlot.UseItem((Vector3)nearestWard);
                         } 
                    }

                    WardSpot nearestSafeWard = Ward.FindNearestSafeWardSpot(Drawing.ScreenToWorld(Game.CursorPos.X, Game.CursorPos.Y));

                    if (nearestSafeWard != null)
                    {
                        InventorySlot wardSpellSlot = Items.GetWardSlot();

                        if (wardSpellSlot != null)
                        {
                            ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, nearestSafeWard.MovePosition);
                            Wardspoting._PutSafeWard = nearestSafeWard;
                        }
                    }
                }
            }
        }
开发者ID:WTayllor,项目名称:L-,代码行数:33,代码来源:PerfectWardTracker.cs


示例13: Game_OnWndProc

		private static void Game_OnWndProc(WndEventArgs args) {
			if (args.Msg == 'Q')
			{
				var Qtarget = Q.GetTarget(0, Qignored);
				if (Qtarget!=null && SpellQ.GetState() == QState.ThreshQ)
				{
					SpellQ.CastQ1(Qtarget);
				}
				else
				{
					args.Process = false;
				}
			}
			if (args.Msg == 'W')
			{
				var FurthestAlly = GetFurthestAlly();
				if (FurthestAlly != null)
				{
					W.Cast(Prediction.GetPrediction(FurthestAlly, W.Delay).CastPosition);
				}

			}
			if (args.Msg == 'E')
			{
				var Etarget = E.GetTarget();
				if (Etarget!=null)
				{
					ELogic(Etarget);
				}
				else
				{
					args.Process = false;
				}
			}
		}
开发者ID:rickson22,项目名称:LeagueSharp,代码行数:35,代码来源:Thresh.cs


示例14: ButtonControl

        private void ButtonControl(WndEventArgs args)
        {
            ShowEasyButton = (KoreanUtils.GetParamBool(annie.MainMenu, "showeeasybutton"));

            if (ShowEasyButton)
            {
                if ((args.Msg == (uint)WindowsMessages.WM_LBUTTONUP)
                    && (MouseOnButton(StunButtonOn) || MouseOnButton(StunButtonOff)))
                {
                    if (StunButtonOn.Visible)
                    {
                        KoreanUtils.SetValueBool(annie.MainMenu, "savestunforcombo", false);
                    }
                    else if (StunButtonOff.Visible)
                    {
                        KoreanUtils.SetValueBool(annie.MainMenu, "savestunforcombo", true);
                    }
                }
                else if ((args.Msg == (uint)WindowsMessages.WM_MOUSEMOVE) && (args.WParam == 5)
                         && (MouseOnButton(StunButtonOn) || MouseOnButton(StunButtonOff)))
                {
                    MoveButtons(
                        new Vector2(Utils.GetCursorPos().X - (StunButtonOn.Width / 2), Utils.GetCursorPos().Y - 10));
                }

                StunButtonOn.Visible = KoreanUtils.GetParamBool(annie.MainMenu, "savestunforcombo");
                StunButtonOff.Visible = !StunButtonOn.Visible;
            }
            else
            {
                StunButtonOff.Visible = false;
                StunButtonOn.Visible = false;
            }
        }
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:34,代码来源:AnnieButtons.cs


示例15: Game_OnWndProc

        private static void Game_OnWndProc(WndEventArgs m)
        {
            try
            {

                if (m.Msg == WM_KEYDOWN)
                {
                   // Console.WriteLine("key: " + m.WParam + " state " + Game.GameState + " W " + Drawing.Width + " H " + Drawing.Height);
                    if (m.WParam == 32)
                    {
                        var me = ObjectMgr.LocalHero;

                        Console.WriteLine("debug: " + me.BaseAttackTime + " : " + Orbwalker.getBaseAttackTime() + " : " + Orbwalker.GetTurnTimeBypass(me, Game.MousePosition));

                        Console.WriteLine("spell R: " + me.Spellbook.SpellQ.Level + " : " + me.Spellbook.SpellQ.CanBeCasted());

                        foreach (
                         var hero in
                       ObjectMgr.GetEntities<Hero>()
                           .Where(hero => hero.IsValid && hero.IsAlive /*(&& CalculateDamage(hero) >= hero.Health)*/))
                        {
                            Console.WriteLine(" " + hero.Name + " : " + hero.Health + " rdmg: " + me.Spellbook.SpellR.CanBeCasted(hero));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            // Console.WriteLine("shgit");
        }
开发者ID:detuks,项目名称:Ensage,代码行数:32,代码来源:Program.cs


示例16: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args)
 {
     if ((args.Msg == (uint) WindowsMessages.WM_LBUTTONDOWN) && mouseonlsharp())
     {
         bringtofront();
     }
 }
开发者ID:ninja1234567,项目名称:LeagueSharp,代码行数:7,代码来源:Program.cs


示例17: Game_OnWndProc

        private static void Game_OnWndProc(WndEventArgs args)
        {

            if (Program.Config.Item("AssassinReset").GetValue<KeyBind>().Active && args.Msg == 257)
            {
                ClearAssassinList();
                Game.PrintChat(
                    "<font color='#FFFFFF'>Reset Assassin List is Complete! Click on the enemy for Add/Remove.</font>");
            }

            if (args.Msg != (uint)WindowsMessages.WM_LBUTTONDOWN)
            {
                return;
            }

            if (Program.Config.Item("AssassinSetClick").GetValue<bool>())
            {
                foreach (var objAiHero in from hero in ObjectManager.Get<Obj_AI_Hero>()
                                          where hero.IsValidTarget()
                                          select hero
                                              into h
                                              orderby h.Distance(Game.CursorPos) descending
                                              select h
                                                  into enemy
                                                  where enemy.Distance(Game.CursorPos) < 150f
                                                  select enemy)
                {
                    if (objAiHero != null && objAiHero.IsVisible && !objAiHero.IsDead)
                    {
                        var xSelect =
                            Program.Config.Item("AssassinSelectOption").GetValue<StringList>().SelectedIndex;

                        switch (xSelect)
                        {
                            case 0:
                                ClearAssassinList();
                                Program.Config.Item("Assassin" + objAiHero.ChampionName).SetValue(true);
                                Game.PrintChat(
                                    string.Format(
                                        "<font color='FFFFFF'>Added to Assassin List</font> <font color='#09F000'>{0} ({1})</font>",
                                        objAiHero.Name, objAiHero.ChampionName));
                                break;
                            case 1:
                                var menuStatus =
                                    Program.Config.Item("Assassin" + objAiHero.ChampionName)
                                        .GetValue<bool>();
                                Program.Config.Item("Assassin" + objAiHero.ChampionName)
                                    .SetValue(!menuStatus);
                                Game.PrintChat(
                                    string.Format("<font color='{0}'>{1}</font> <font color='#09F000'>{2} ({3})</font>",
                                        !menuStatus ? "#FFFFFF" : "#FF8877",
                                        !menuStatus ? "Added to Assassin List:" : "Removed from Assassin List:",
                                        objAiHero.Name, objAiHero.ChampionName));
                                break;
                        }
                    }
                }
            }
        }
开发者ID:AwkwardDev,项目名称:LeagueSharp2,代码行数:59,代码来源:AssassinManager.cs


示例18: Game_OnWndProc

 private static void Game_OnWndProc(WndEventArgs args) {
     if (args.WParam == Menu.Item("hotkey").GetValue<KeyBind>().Key &&
         args.Msg == (uint) Utils.WindowsMessages.WM_KEYUP &&
         !Game.IsChatOpen) {
         enabled = true;
         following = false;
     }
 }
开发者ID:RetiredQQ,项目名称:Ensage,代码行数:8,代码来源:Program.cs


示例19: CastIgnite

 private void CastIgnite(WndEventArgs args)
 {
     if (args.Msg == (uint)WindowsMessages.WM_KEYDOWN
         && ObjectManager.Player.Spellbook.ActiveSpellSlot == ignite.Slot)
     {
         Cast();
     }
 }
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:8,代码来源:CastOnBestTarget.cs


示例20: Game_OnWndProc

        static void Game_OnWndProc(WndEventArgs args)
        {
            if (!_activated || args.Msg != WM_KEYUP || args.WParam != 'F' || Game.IsChatOpen || !Game.IsInGame)
                return;

            _enabled = !_enabled;
            Console.WriteLine("Crit switched to "+ (_enabled ? "on" : "off"));
        }
开发者ID:theklausnomi,项目名称:Ensage,代码行数:8,代码来源:Program.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WoWPoint类代码示例发布时间:2022-05-24
下一篇:
C# WkbByteOrder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap