Bugfixes
This commit is contained in:
@@ -54,7 +54,7 @@ namespace ErgometerLibrary
|
|||||||
using (File.Create(Path.Combine(GetSessionMetingen(session)))) ;
|
using (File.Create(Path.Combine(GetSessionMetingen(session)))) ;
|
||||||
using (File.Create(Path.Combine(GetSessionChat(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)
|
public static void WriteMetingen(int session, List<Meting> metingen)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace ErgometerLibrary
|
|||||||
public CommandType Type { get; set; }
|
public CommandType Type { get; set; }
|
||||||
public ResponseType Response { get; set; }
|
public ResponseType Response { get; set; }
|
||||||
public ValueType Value { get; set; }
|
public ValueType Value { get; set; }
|
||||||
public double SetValue { get; set; }
|
public int SetValue { get; set; }
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
public bool IsDoctor { get; set; }
|
public bool IsDoctor { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
@@ -71,7 +71,7 @@ namespace ErgometerLibrary
|
|||||||
}
|
}
|
||||||
|
|
||||||
//SETVALUE
|
//SETVALUE
|
||||||
public NetCommand(ValueType value, double val, int session)
|
public NetCommand(ValueType value, int val, int session)
|
||||||
{
|
{
|
||||||
Type = CommandType.VALUESET;
|
Type = CommandType.VALUESET;
|
||||||
Session = session;
|
Session = session;
|
||||||
@@ -167,13 +167,13 @@ namespace ErgometerLibrary
|
|||||||
switch (args[0])
|
switch (args[0])
|
||||||
{
|
{
|
||||||
case "time":
|
case "time":
|
||||||
return new NetCommand(ValueType.TIME, double.Parse(args[1]), session);
|
return new NetCommand(ValueType.TIME, int.Parse(args[1]), session);
|
||||||
case "power":
|
case "power":
|
||||||
return new NetCommand(ValueType.POWER, double.Parse(args[1]), session);
|
return new NetCommand(ValueType.POWER, int.Parse(args[1]), session);
|
||||||
case "energy":
|
case "energy":
|
||||||
return new NetCommand(ValueType.ENERGY, double.Parse(args[1]), session);
|
return new NetCommand(ValueType.ENERGY, int.Parse(args[1]), session);
|
||||||
case "distance":
|
case "distance":
|
||||||
return new NetCommand(ValueType.DISTANCE, double.Parse(args[1]), session);
|
return new NetCommand(ValueType.DISTANCE, int.Parse(args[1]), session);
|
||||||
default:
|
default:
|
||||||
throw new FormatException("Error in NetCommand: SetValue type not recognised");
|
throw new FormatException("Error in NetCommand: SetValue type not recognised");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user