示例#1
0
 public AddMacroCommandAction(IMacro macro, IMacroCommand command)
 {
     m_Macro        = macro;
     m_MacroElement = macro.AddElement(command);
     m_Index        = macro.GetElements().Count - 1;
     macro.RemoveElement(m_MacroElement.Id);
 }
示例#2
0
        public ReplaceMacroCommandAction(IMacro macro, int oldCommandId, IMacroCommand newCommand)
        {
            m_Macro      = macro;
            m_OldElement = macro.GetElement(oldCommandId);
            IList <IMacroElement> elements = m_Macro.GetElements();

            for (int i = 0; i < elements.Count; ++i)
            {
                if (elements[i] == m_OldElement)
                {
                    m_Index = i;
                    break;
                }
            }
            m_NewElement = macro.AddElement(newCommand);
            macro.RemoveElement(m_NewElement.Id);
        }
示例#3
0
 private void elementsGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     FireElementDoubleClick(m_Container.GetElements()[e.RowIndex]);
 }