示例#1
0
        public void RecordMacro()
        {
            InputDetection.InputDetected    += InputDetection_InputDetected1;
            InputDetection.MouseMoveInterval = (int)nudMouseMoveInterval.Value;
            InputDetection.EnableMouseMoveDetection(cbMouseMoveRecord.Checked);

            m_lastCommandTime = DateTime.MinValue;
        }
示例#2
0
        public void StopRecordMacro()
        {
            InputDetection.InputDetected -= InputDetection_InputDetected1;
            InputDetection.EnableMouseMoveDetection(false);

            for (int i = 0; i < 4 && m_node.Nodes.Count - 1 >= 0; i++)
            {
                m_node.Nodes.RemoveAt(m_node.Nodes.Count - 1);
            }
        }
示例#3
0
文件: Macro.cs 项目: nordie92/Makru
 public void RemoveActivators()
 {
     foreach (Activator a in Nodes[0].Nodes)
     {
         if (a.GetType() == typeof(ActivatorShortcut))
         {
             InputDetection.RemoveShortcut((a as ActivatorShortcut).Shortcut);
         }
     }
 }
示例#4
0
 public static void RemoveEvents(TreeNode rootNode)
 {
     if (rootNode.GetType() == typeof(ActivatorShortcut))
     {
         InputDetection.RemoveShortcut((rootNode as ActivatorShortcut).Shortcut);
     }
     else
     {
         foreach (TreeNode tn2 in rootNode.Nodes)
         {
             RemoveEvents(tn2);
         }
     }
 }
示例#5
0
        public ActivatorShortcut(Shortcut shortcut, bool loopexecution, Macro makro)
        {
            Shortcut      = shortcut;
            LoopexEcution = loopexecution;
            m_makro       = makro;

            m_shortcut.ShortcutPressed += M_shortcut_ShortcutPressed;
            InputDetection.RegistarteShortcut(m_shortcut);

            Text = "Shortcut \"";
            for (int i = 0; i < m_shortcut.Keys.Count; i++)
            {
                Text += (i > 0 ? " + " : "") + m_shortcut.Keys[i].ToString();
            }
            Text += "\"";

            ImageKey         = "key";
            SelectedImageKey = "key";
            Name             = "activator";
        }
示例#6
0
文件: Macros.cs 项目: nordie92/Makru
 public Macros()
 {
     InputDetection.SubscribeGlobal();
 }