From f397b8a2db156131d53af2adba0139b5fbfc6caf Mon Sep 17 00:00:00 2001 From: Aareschluchtje Date: Tue, 20 Oct 2015 12:08:26 +0200 Subject: [PATCH] Changed Sessiondata --- ErgometerLibrary/NetCommand.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ErgometerLibrary/NetCommand.cs b/ErgometerLibrary/NetCommand.cs index 7b5dc52..d4e0c52 100644 --- a/ErgometerLibrary/NetCommand.cs +++ b/ErgometerLibrary/NetCommand.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Microsoft.Win32; namespace ErgometerLibrary { @@ -38,11 +39,11 @@ namespace ErgometerLibrary } //SESSIONDATA - public NetCommand(string name, bool foo, int session) + public NetCommand(string name, double timestamp, int session) { Type = CommandType.SESSIONDATA; Session = session; - Timestamp = Helper.Now; + Timestamp = timestamp; DisplayName = name; } @@ -189,10 +190,10 @@ namespace ErgometerLibrary private static NetCommand ParseSessionData(int session, string[] args) { - if (args.Length != 1) + if (args.Length != 2) throw new MissingFieldException("Error in NetCommand: Session Data is missing arguments"); - NetCommand temp = new NetCommand(args[0], false, session); + NetCommand temp = new NetCommand(args[0], double.Parse(args[1]), session); return temp; } @@ -378,7 +379,7 @@ namespace ErgometerLibrary command += "10»ses" + Session + "»" + Length.ToString().ToLower() + "»" + LengthValue; break; case CommandType.SESSIONDATA: - command += "11»ses" + Session + "»" + DisplayName; + command += "11»ses" + Session + "»" + DisplayName + "»" + Timestamp; break; case CommandType.ERROR: command += "ERROR IN NETCOMMAND";