This commit is contained in:
2015-10-09 11:17:48 +02:00
parent 043fb6b6ef
commit 3963aa8bb0
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ namespace ErgometerLibrary
using (File.Create(Path.Combine(GetSessionMetingen(session)))) ;
using (File.Create(Path.Combine(GetSessionChat(session)))) ;
File.WriteAllText(GetSessionFile(session), naam + "\n" + Helper.Now);
File.WriteAllText(GetSessionFile(session), naam + Environment.NewLine + Helper.Now);
}
public static void WriteMetingen(int session, List<Meting> metingen)
+6 -6
View File
@@ -17,7 +17,7 @@ namespace ErgometerLibrary
public CommandType Type { get; set; }
public ResponseType Response { get; set; }
public ValueType Value { get; set; }
public double SetValue { get; set; }
public int SetValue { get; set; }
public string DisplayName { get; set; }
public bool IsDoctor { get; set; }
public string Password { get; set; }
@@ -71,7 +71,7 @@ namespace ErgometerLibrary
}
//SETVALUE
public NetCommand(ValueType value, double val, int session)
public NetCommand(ValueType value, int val, int session)
{
Type = CommandType.VALUESET;
Session = session;
@@ -167,13 +167,13 @@ namespace ErgometerLibrary
switch (args[0])
{
case "time":
return new NetCommand(ValueType.TIME, double.Parse(args[1]), session);
return new NetCommand(ValueType.TIME, int.Parse(args[1]), session);
case "power":
return new NetCommand(ValueType.POWER, double.Parse(args[1]), session);
return new NetCommand(ValueType.POWER, int.Parse(args[1]), session);
case "energy":
return new NetCommand(ValueType.ENERGY, double.Parse(args[1]), session);
return new NetCommand(ValueType.ENERGY, int.Parse(args[1]), session);
case "distance":
return new NetCommand(ValueType.DISTANCE, double.Parse(args[1]), session);
return new NetCommand(ValueType.DISTANCE, int.Parse(args[1]), session);
default:
throw new FormatException("Error in NetCommand: SetValue type not recognised");
}