public void RecordMove(LastMacro state, string direction, MoveScope scope, bool extend) { string macroString = ""; macroString += "ActiveDocument.Object.Move"; macroString += direction; // Get the number of times this macro type has been recorded already // (if any) and then add one to get the current count macroString += "(" + (int)scope + ", " + (m_Recorder.GetTimesPreviouslyRecorded(state) + 1) + ", " + (int)(extend ? tom.tomConstants.tomExtend : tom.tomConstants.tomMove) + ")"; m_Recorder.RecordBatchedLine(state, macroString); }
public static IMoveDescriptor PopulateMoveDescriptor(MoveScope moveScope, IDeployDescriptor deploymentDescriptor) { var deploymentMap = deploymentDescriptor.InstancesMap(); int shardsCount = 0; foreach (var key in deploymentMap.Keys) { shardsCount += deploymentMap[key]; } switch (moveScope) { case MoveScope.Local: return(MoveDescriptor.MoveBase(shardsCount, shardsCount)); case MoveScope.Global: return(MoveDescriptor.MoveBase(-1, shardsCount)); default: return(MoveDescriptor.MoveBase(0, shardsCount)); } }
public void RecordMove(LastMacro state, string direction, MoveScope scope, bool extend) { var macroString = string.Empty; macroString += "ActiveDocument.Object.Move"; macroString += direction; // Get the number of times this macro type has been recorded already // (if any) and then add one to get the current count macroString += "(" + (int) scope + ", " + (m_Recorder.GetTimesPreviouslyRecorded(state) + 1) + ", " + (int) (extend ? tom.tomConstants.tomExtend : tom.tomConstants.tomMove) + ")"; m_Recorder.RecordBatchedLine(state, macroString); }