コード例 #1
0
        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);
        }
コード例 #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;
 }
コード例 #3
0
 private static String FormatCommand(CommandMessenger.Command c)
 {
     return(String.Format("{0} - {1}", Enum.GetName(typeof(Command), c.CmdId), String.Join(" ", c.Arguments)));
 }
コード例 #4
0
 public NewLineArgs(Command command)
 {
     Command = command;
 }
コード例 #5
0
 public CommandEventArgs(Command command)
 {
     Command = command;
 }