Ejemplo n.º 1
0
 /// <summary>
 /// Executes recorded macro
 /// </summary>
 /// <returns></returns>
 public void ExecuteMacros()
 {
     IsRecording = false;
     UnderlayingControl.BeginUpdate();
     UnderlayingControl.Selection.BeginUpdate();
     UnderlayingControl.BeginAutoUndo();
     foreach (var item in macro)
     {
         if (item is Keys)
         {
             UnderlayingControl.ProcessKey((Keys)item);
         }
         if (item is KeyValuePair <char, Keys> )
         {
             var p = (KeyValuePair <char, Keys>)item;
             UnderlayingControl.ProcessKey(p.Key, p.Value);
         }
     }
     UnderlayingControl.EndAutoUndo();
     UnderlayingControl.Selection.EndUpdate();
     UnderlayingControl.EndUpdate();
 }