private int CountBytesInCommand(CommandMessenger.Command command, bool printLfCr) { var bytes = command.CommandString().Length; // Command + command separator //var bytes = _cmdMessenger.CommandToString(command).Length + 1; // Command + command separator if (printLfCr) { bytes += Environment.NewLine.Length; // Add bytes for carriage return ('\r') and /or a newline ('\n') } return(bytes); }
// Tools private static int CountBytesInCommand(Command command, bool printLfCr) { var bytes = command.CommandString().Length; // Command + command separator if (printLfCr) bytes += Environment.NewLine.Length; // Add bytes for carriage return ('\r') and /or a newline ('\n') return bytes; }
private static String FormatCommand(CommandMessenger.Command c) { return(String.Format("{0} - {1}", Enum.GetName(typeof(Command), c.CmdId), String.Join(" ", c.Arguments))); }
public NewLineArgs(Command command) { Command = command; }
public CommandEventArgs(Command command) { Command = command; }