public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent)) { Debug = !Debug; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (Control.ModifierKeys == Keys.Control && Hud.Input.IsKeyDown(Keys.Subtract)) // ctrl+NumPad.Subtract"-") { Console.Beep(250, 150); doFlag = !doFlag; // toggle display if (doFlag) { displayTag = 0; // Text decoration every interval (default 1 sec) MonitorTimer = new System.Timers.Timer(); MonitorTimer.Interval = RMInterval; MonitorTimer.Elapsed += MonitoringResource; MonitorTimer.AutoReset = true; MonitorTimer.Enabled = true; } else { try { MonitorTimer.Enabled = false; } catch {} } } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent)) { TurnedOn = !TurnedOn; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && keyEvent.Key == Key) { showSummary = !showSummary; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.Key == Key && !keyEvent.IsPressed) { Hud.SceneReveal.MinimapClip = !Hud.SceneReveal.MinimapClip; } }
public void OnKeyEvent(IKeyEvent keyEvent) { // Builing the database needs to be done only once in game because the ranking does not change very often. // It may take time to download the ranking webpage. It depends on your computing/network environment though. if (Control.ModifierKeys == Keys.Control && Hud.Input.IsKeyDown(Keys.Divide)) // ctrl+Numpad("/") { Console.Beep(250, 120); t1 = new Thread(new ThreadStart(BuildGRiftRanking)); // just in case that it often takes long time to download the webpage t1.Start(); // start multi-threading if (culture == "ko") { Hud.Sound.Speak("잠시 기다려 주세요!"); } else { Hud.Sound.Speak("Please wait a moment!"); } AbortTimer = new System.Timers.Timer(); AbortTimer.Interval = 10000; // aboart the thread after Interval AbortTimer.Elapsed += AbortThread; AbortTimer.AutoReset = false; AbortTimer.Enabled = true; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (UseToggleLabelsKey && keyEvent.IsPressed && keyEvent.Key == ToggleLabelsKey) { ShowArmorySetNumberLabels = !ShowArmorySetNumberLabels; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent)) { Show = !Show; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent) && ToggleEnable) { TurnedOn = !TurnedOn; currentYard = TurnedOn ? MaxYard : BaseYard; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (Show && keyEvent.IsPressed && tKey.Matches(keyEvent)) { Show = false; tablesProcessed = false; ClearData(); } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.Matches(DumpHotKey) && keyEvent.IsPressed) { DumpToFile(); return; } if (keyEvent.Matches(DisplayHotKey) && keyEvent.IsPressed) { _showList = !_showList; } }
/// <summary> /// Gets the actions registered for this key event. /// </summary> /// <param name="keyEvent">The key event.</param> /// <param name="createIfNotFound">if set to <c>true</c> [create if not found].</param> /// <returns></returns> private KeyValuePair <IKeyEvent, List <Action <IController> > > GetActions(IKeyEvent keyEvent, bool createIfNotFound = false) { var @event = KeyEvents.SingleOrDefault(x => x.Key.Matches(keyEvent)); if (IsDefault(@event) && createIfNotFound) { @event = new KeyValuePair <IKeyEvent, List <Action <IController> > >(keyEvent, new List <Action <IController> >()); KeyEvents.Add(@event.Key, @event.Value); } return(@event); }
/// <summary> /// Called when the player pressed or released a key. This method is called during the data collection phase, which means no rendering is possible! /// </summary> /// <param name="keyEvent"></param> public void OnKeyEvent(IKeyEvent keyEvent) { var @event = GetActions(keyEvent); if (!IsDefault(@event)) { foreach (var action in @event.Value) { action.Invoke(Hud); } } }
public void InvokeIfExists(IKeyEvent keyEvent, IController hud) { var hotkey = hotkeyActions .Where(hk => !(hk.iKeyEvent is null) && hk.active && hk.iKeyEvent.Matches(keyEvent)) .FirstOrDefault(hk => hk.PreconditionSatisfied(hud)); if (hotkey != null) { executor.Execute(() => hotkey.Invoke(hud), hotkey.GetType().ToString(), hotkey.minimumExecutionDelta); } }
// dps/ehp window show or not public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && PressKeyEvent.Matches(keyEvent)) { Show = !Show; /* * if (Show) * Show = false; * else * Show = true; */ } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent)) { Hud.TextLog.Log("Scenes", "start", false, false); foreach (var Debug in SceneDebug) { string debugtext = "\"" + Debug + "\"" + ", "; Hud.TextLog.Log("Scenes", debugtext, false, true); } Show = !Show; } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent)) { if (!Show) //toggle on if pressed F6 { Show = !Show; //no off switch !! } else if (Show && OnlyShowOnBountyTable) { Show = !Show; } } }
public void KeyPress(IKeyEvent evnt) { if (evnt.MoveNext) { if (Parent != null) { MoveChildFocus(false); } } else if (evnt.MovePrev) { if (Parent != null) { MoveChildFocus(true); } } OnKeyPress(evnt); }
private void ProcessInstances(IObserver <StreamAction> observer, IKeyEvent e) { IEnumerable <Item> runningInstances = InstancesParser.GetInstances(e.Data?.Children); // Check instances foreach (var instance in runningInstances) { //Console.WriteLine($"check {instance.Id}"); string address; if (_uris.TryGetValue(instance.Id, out address)) { if (instance.Enabled == false) { observer.OnNext(new StreamAction(StreamAction.StreamActionType.REMOVE, address)); Console.WriteLine($"remove {_uris[instance.Id]}"); _uris.Remove(instance.Id); } } else { address = String.Format("http://{0}:{1}/jellyfish.stream", instance.Ip, instance.Port); _uris.Add(instance.Id, address); Console.WriteLine($"add {_uris[instance.Id]}"); observer.OnNext(new StreamAction(StreamAction.StreamActionType.ADD, address)); } } // Remove deleted instances // Check instance in cache but not running var instancesToRemove = (from kv in _uris where !runningInstances.Any(i => i.Id == kv.Key) select kv).ToList(); foreach (var kv in instancesToRemove) { if (_uris.Remove(kv.Key)) { Console.WriteLine($"delete {kv.Value}"); observer.OnNext(new StreamAction(StreamAction.StreamActionType.REMOVE, kv.Value)); } } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (Hud.Input.IsKeyDown(Keys.NumPad8)) // key to text attack instructions //if (Control.ModifierKeys == Keys.Control && Hud.Input.IsKeyDown(Keys.NumPad8)) { Console.Beep(200, 150); if (TextMsg) { Hud.Sound.Speak("Text Instructions end!"); //Hud.Sound.Speak("문자 안내 끝!"); TextMsg = false; } else { Hud.Sound.Speak("Text Instructions start!"); //Hud.Sound.Speak("문자 안내 시작!"); TextMsg = true; } } if (Hud.Input.IsKeyDown(Keys.NumPad9)) // key to speak attack instructions //if (Control.ModifierKeys == Keys.Control && Hud.Input.IsKeyDown(Keys.NumPad9)) { Console.Beep(200, 150); if (Speak) { Hud.Sound.Speak("Attack Instructions end!"); //Hud.Sound.Speak("공격 안내 끝!"); Speak = false; } else { Hud.Sound.Speak("Attack Instructions start!"); //Hud.Sound.Speak("공격 안내 시작!"); Speak = true; } } }
public override void Load(IController hud) { base.Load(hud); OriginalSheetDPS = 0f; OriginalSheetEHP = 0f; DPSGap = 0f; EHPGap = 0f; First = true; Show = true; ShowCont = ""; PressKeyEvent = Hud.Input.CreateKeyEvent(true, Key.F12, false, false, false); DpsLabelDecorator = new TopLabelDecorator(Hud) { TextFont = Hud.Render.CreateFont("tahoma", 9, 255, 255, 255, 255, true, false, false), BackgroundTexture1 = hud.Texture.ButtonTextureBlue, BackgroundTexture2 = hud.Texture.BackgroundTextureBlue, BackgroundTextureOpacity2 = 0.5f, TextFunc = () => ShowCont, HintFunc = () => "Dps, Ehp Real time Monitoring" }; }
public void OnKeyEvent(IKeyEvent keyEvent) { //noop }
public void OnKeyEvent(IKeyEvent keyEvent) { Barring = keyEvent.AltPressed; }
private bool TryHandleKeyEvent(IKeyEvent args) { if (!args.HasFocus) { return(false); } var editor = HeadlessEditor; var textBox = cText.TextBox; var layout = textBox.Layout; if (args.ComplexEventType == KeyEventType.TextInput) { editor.InputString(args.Text); undoRedo.OnChange(); return(true); } if (args.ComplexEventType == KeyEventType.Down) { switch (args.EventKey) { case Key.Left: { editor.MoveCursorSafe(editor.CursorPos - 1, args.KeyModifiers.HasFlag(KeyModifiers.Shift)); return(true); } case Key.Right: { editor.MoveCursorSafe(editor.CursorPos + 1, args.KeyModifiers.HasFlag(KeyModifiers.Shift)); return(true); } case Key.Up: { if (!layout.TryGetUp(editor.CursorPos, out var newPos)) { newPos = editor.CursorPos; } editor.MoveCursor(newPos, args.KeyModifiers.HasFlag(KeyModifiers.Shift)); return(true); } case Key.Down: { if (!layout.TryGetDown(editor.CursorPos, out var newPos)) { newPos = editor.CursorPos; } editor.MoveCursor(newPos, args.KeyModifiers.HasFlag(KeyModifiers.Shift)); return(true); } case Key.Enter: { editor.InputString("\n"); undoRedo.OnChange(); return(true); } case Key.Backspace: { editor.Erase(); undoRedo.OnChange(); return(true); } case Key.Tab: if (args.KeyModifiers == KeyModifiers.None) { editor.Tab(); } else if (args.KeyModifiers == KeyModifiers.Shift) { editor.ShiftTab(); } return(true); } } return(false); }
public void OnKeyEvent(IKeyEvent keyEvent) { if (Hud.Input.IsKeyDown(Keys.NumPad1)) { string value = ""; string output = ""; for (int i = 0; i < ChatWatchListOr.Length; i++) { ChatWatchListOr[i] = string.Empty; } for (int i = 0; i < ChatWatchListAnd.Length; i++) { ChatWatchListAnd[i] = string.Empty; } if (InputOK) { value = savedValue; } ClickTimer = new System.Timers.Timer(); ClickTimer.Interval = 50; ClickTimer.Elapsed += DoClick; ClickTimer.AutoReset = false; ClickTimer.Enabled = true; //var CursorPos = (Hud.Window.Size.Width / 2).ToString("0") + "," + (Hud.Window.Size.Height / 2 - 30).ToString("0"); //Process.Start("D:\\Game\\click.exe", CursorPos); if (InputBox("채팅 창 모니터", "Or : comma/space, And : ( Or )", ref value) == DialogResult.OK) { Console.Beep(200, 120); string sep = ", "; value = value.Trim(); if (value == string.Empty) { InputOK = false; return; } savedValue = value; Match match = Regex.Match(savedValue, @"(?<=\().+(?=\))"); // extract "And" condition words if (match.Success) { ChatWatchListAnd = match.Value.Split(sep.ToCharArray()); for (int i = 0; i < ChatWatchListAnd.Length; i++) { if (ChatWatchListAnd[i].Contains("/w")) { // |HOnlUserHdl:27e1a45-4433-3|h[김재훈]|h 님의 귓속말: 넵 ChatWatchListAnd[i] = whisperId; // "귓속말:" } } output = Regex.Replace(value, @"\(.+\) ", ""); // delete And condition for Or processing } else { output = value; } ChatWatchListOr = output.Split(sep.ToCharArray()); for (int i = 0; i < ChatWatchListOr.Length; i++) { if (ChatWatchListOr[i].Contains("/w")) { ChatWatchListOr[i] = whisperId; // "귓속말:" } } InputOK = true; } } }
public override void HandleKeyPressEvent(IKeyEvent evnt) { }
public void OnKeyEvent(IKeyEvent keyEvent) { IncludeSocketedGems = keyEvent.AltPressed; }
public void OnKeyEvent(IKeyEvent keyEvent) { settings.Hotkeys.InvokeIfExists(keyEvent, Hud); }
public void OnKeyEvent(IKeyEvent keyEvent) { if (Hud.Input.IsKeyDown(Keys.Escape)) { try { aTimer.Enabled = false; bTimer.Enabled = false; CountTimer.Enabled = false; } catch { } TimerStarted = false; Alarm = true; } if (Hud.Input.IsKeyDown(Keys.NumPad8)) // key to text attack instructions { Console.Beep(200, 150); if (TextMsg) { if (culture == "ko") { Hud.Sound.Speak("문자 안내 끝!"); } else { Hud.Sound.Speak("Text guide stops!"); } TextMsg = false; } else { if (culture == "ko") { Hud.Sound.Speak("문자 안내 시작!"); } else { Hud.Sound.Speak("Text guide starts!"); } TextMsg = true; } } if (Hud.Input.IsKeyDown(Keys.NumPad9)) // key to speak attack instructions //if (Control.ModifierKeys == Keys.Control && Hud.Input.IsKeyDown(Keys.NumPad9)) { Console.Beep(200, 150); if (Speak) { if (culture == "ko") { Hud.Sound.Speak("소리 안내 끝!"); } else { Hud.Sound.Speak("Sound guide stops!"); } Speak = false; } else { if (culture == "ko") { Hud.Sound.Speak("소리 안내 시작!"); } else { Hud.Sound.Speak("Sound guide starts!"); } Speak = true; } } }
public void OnKeyEvent(IKeyEvent keyEvent) { if (keyEvent.IsPressed && PressKeyEvent.Matches(keyEvent)) { Cursor.Position = new Point(Hud.Window.Size.Width / 2, Hud.Window.Size.Height / 2); Process.Start("D:\\Game\\click.exe"); string value = "0 to clear circle"; if (InputBox("Drawing Circle", "Yard,R,G,B,SW,Dash(d)", ref value) == DialogResult.OK) { string sep = ", "; value = value.Trim(); string[] CircleInfoList = value.Split(sep.ToCharArray()); var cnt = 0; bool Success; int number; UserDashStyle = false; foreach (string CircleInfo in CircleInfoList) { cnt++; string tmp = CircleInfo; switch (cnt) { case 1: Success = Int32.TryParse(tmp, out number); if ((Success && number == 0) || !Success) { Circle = false; } else { Circle = true; } if (Success && number >= 1 && number <= 60) { UserRadius = number; } else { UserRadius = 20; } break; case 2: Success = Int32.TryParse(tmp, out number); if (Success) { UserRGB_R = number; } else { UserRGB_R = 255; } break; case 3: Success = Int32.TryParse(tmp, out number); if (Success) { UserRGB_G = number; } else { UserRGB_G = 0; } break; case 4: Success = Int32.TryParse(tmp, out number); if (Success) { UserRGB_B = number; } else { UserRGB_B = 0; } break; case 5: float fnum; Success = float.TryParse(tmp, out fnum); if (Success && (fnum >= 1.0f && fnum <= 20.0f)) { UserStrokeWidth = fnum; } else { UserStrokeWidth = 2.0f; } break; case 6: var style = tmp.ToLower(); if (style == "d") { UserDashStyle = true; } break; } } if (UserRGB_R < 0 || UserRGB_R > 255 || UserRGB_G < 0 || UserRGB_G > 255 || UserRGB_B < 0 || UserRGB_B > 255) { UserRGB_R = 255; UserRGB_G = 0; UserRGB_B = 0; } Load(Hud); } } }