示例#1
0
 public static bool Action( MacroAction a )
 {
     if ( m_Current != null )
         return m_Current.Action( a );
     else
         return false;
 }
示例#2
0
 public override bool CheckMatch(MacroAction a)
 {
     if (!(a is WaitForTargetAction))
         return false;
     Target();
     return true;
 }
示例#3
0
        public MacroInsertIf( MacroAction a )
        {
            m_Action = a;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            foreach ( Counter c in Counter.List )
                varList.Items.Add( c.Name );
        }
示例#4
0
        public MacroInsertWait( MacroAction a )
        {
            m_Action = a;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
示例#5
0
文件: Macro.cs 项目: WildGenie/Razor
        // returns true if the were waiting for this action
        public bool Action( MacroAction action )
        {
            if ( m_Recording )
            {
                action.Parent = this;
                m_Actions.Insert( m_CurrentAction, action );
                if ( m_ListBox != null )
                    m_ListBox.Items.Insert( m_CurrentAction, action );
                m_CurrentAction++;

                return false;
            }
            else if ( m_Playing && m_Wait != null && m_Wait.CheckMatch( action ) )
            {
                m_Wait = null;
                ExecNext();
                return true;
            }

            return false;
        }
示例#6
0
 public override bool CheckMatch( MacroAction a )
 {
     return (a is WaitForTargetAction);
 }
示例#7
0
        public override bool CheckMatch(MacroAction a)
        {
            if ( a is WaitForMenuAction )
            {
                if ( m_MenuID == 0 || ((WaitForMenuAction)a).m_MenuID == m_MenuID )
                    return true;
            }

            return false;
        }
示例#8
0
 public virtual bool CheckMatch( MacroAction a )
 {
     return false; // a.GetType() == this.GetType();
 }
示例#9
0
文件: Macro.cs 项目: WildGenie/Razor
 public void Insert( int idx, MacroAction a )
 {
     a.Parent = this;
     if ( idx < 0 || idx > m_Actions.Count )
         idx = m_Actions.Count;
     m_Actions.Insert( idx, a );
 }
示例#10
0
文件: Macro.cs 项目: WildGenie/Razor
 public void Convert( MacroAction old, MacroAction newAct )
 {
     for (int i=0;i<m_Actions.Count;i++)
     {
         if ( m_Actions[i] == old )
         {
             m_Actions[i] = newAct;
             newAct.Parent = this;
             Update();
             break;
         }
     }
 }