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);
        }
Ejemplo n.º 2
0
 // 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;
 }
Ejemplo n.º 3
0
 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;
 }