示例#1
0
 private void Modify(ref CMacroFile cmf_drag, ref CMacroFile cmf_drop, DragEventArgs e)
 {
     #region Swap/Copy Drag & Drop MacroFiles and update
     if ((cmf_drag != null) && (cmf_drop != null))
     {
         if (e.Effect == DragDropEffects.Link)
         {
             Swap(ref cmf_drop, ref cmf_drag);
         }
         else if (e.Effect == DragDropEffects.Copy)
             cmf_drop.CopyFrom(cmf_drag);
     }
     else LogMessage.Log("....Modify(): cmf_drag: {0}  cmf_drop: {1}",
         (cmf_drag == null) ? "<NULL>" : cmf_drag.thisNode.Text,
         (cmf_drop == null) ? "<NULL>" : cmf_drop.thisNode.Text);
     #endregion
 }
示例#2
0
        private bool Swap(ref CMacroFile cmfe_drop, ref CMacroFile cmfe_drag)
        {
            if ((cmfe_drop == null) || (cmfe_drag == null))
                return false;

            CMacroFile tmp = new CMacroFile(this._ATPhraseLoader);
            tmp.CopyFrom(cmfe_drop);
            cmfe_drop.CopyFrom(cmfe_drag);
            cmfe_drag.CopyFrom(tmp);
            return true;
        }