本文整理汇总了C#中WndEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# WndEventArgs类的具体用法?C# WndEventArgs怎么用?C# WndEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WndEventArgs类属于命名空间,在下文中一共展示了WndEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game_OnWndProc
private static void Game_OnWndProc(WndEventArgs args)
{
if (args.Msg == (uint)WindowsMessages.WM_RBUTTONDOWN)
{
LastClickPoint = Game.CursorPos.To2D();
}
}
示例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));
}
示例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);
}
}
示例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.");
}
}
示例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;
}
示例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;
}
}
示例7: OnWndMsg
public static void OnWndMsg(WndEventArgs args)
{
foreach (var script in ScriptInitializer.Scripts)
{
script.Call(script.Globals["OnWndMsg"], args.Msg, args.WParam);
}
}
示例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
}
}
示例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;
}
}
}
示例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;
}
}
示例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);
}
}
}
示例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;
}
}
}
}
}
示例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;
}
}
}
示例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;
}
}
示例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");
}