Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            MacroEvent macroEvent = (MacroEvent)listBoxEvents.SelectedItem;

            manager.removeEvent(macroEvent);
            bs.ResetBindings(false);
        }
Exemplo n.º 2
0
        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();
                    }
                }
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public void removeEvent(MacroEvent e)
 {
     macros.Remove(e);
 }
Exemplo n.º 6
0
 public void addEvent(MacroEvent e)
 {
     macros.Add(e);
 }