private void button3_Click(object sender, EventArgs e) { MacroEvent macroEvent = (MacroEvent)listBoxEvents.SelectedItem; manager.removeEvent(macroEvent); bs.ResetBindings(false); }
private void work(bool repeat) { if (macros.Count == 0) { working = false; Thread.CurrentThread.Abort(); } int currentEvent = 0; while (working) { MacroEvent e = macros[currentEvent]; currentWorkIndex = currentEvent; e.doAction(ref working); currentEvent++; if (currentEvent >= macros.Count) { currentEvent = 0; if (!repeat) { working = false; Thread.CurrentThread.Abort(); } } } }
private void CurrentMacro_OnKeyTrigger(MacroEvent Event) { string eventValue = Event.ToXml().Replace("<MacroKeyUpEvent>", ""). Replace("</MacroKeyUpEvent>", ""). Replace("<VirtualKeyCode>", ""). Replace("</VirtualKeyCode>", ""); var item = new ListViewItem(Event.ToString()); item.SubItems.Add("Key Pressed: " + VirtualKeyCode.GetKeyData(Convert.ToInt32(eventValue))); MacroLogLV.Items.Add(item); }
private void CurrentMacro_OnMouseTrigger(MacroEvent Event) { string eventValue = Event.ToXml().Replace("<MacroMouseUpEvent>", ""). Replace("</MacroMouseUpEvent>", ""). Replace("<Location>", "Location: "). Replace("</Location>", ""). Replace("<Button>", ", Button: "). Replace("</Button>", ""); var item = new ListViewItem(Event.ToString()); item.SubItems.Add(eventValue); MacroLogLV.Items.Add(item); }
public void removeEvent(MacroEvent e) { macros.Remove(e); }
public void addEvent(MacroEvent e) { macros.Add(e); }