[ADD] added checking of all folders in username directory

This commit is contained in:
Sem van der Hoeven
2020-10-29 20:35:21 +01:00
parent b98ac77261
commit baf89dac3f
4 changed files with 64 additions and 25 deletions

View File

@@ -125,13 +125,17 @@ namespace DoctorApp.Utils
{
// read the .bin file that is in the message
// update the view
//Debug.WriteLine($"[DOCTOR CLIENT] Got raw bike data: " + Encoding.ASCII.GetString(payloadbytes));
MainViewModel.TransferDataToClientBike(payloadbytes);
}
else if (DataParser.isRawDataBPMDoctor(messageBytes))
{
MainViewModel.TransferDataToClientBPM(payloadbytes);
}
else if (DataParser.IsHistoricBikeData(messageBytes))
{
Debug.WriteLine("[DOCTOR CLIENT] got historic bike data: " + Encoding.ASCII.GetString(payloadbytes));
}
Array.Copy(totalBuffer, expectedMessageLength, totalBuffer, 0, (totalBufferReceived - expectedMessageLength)); //maybe unsafe idk
totalBufferReceived -= expectedMessageLength;
expectedMessageLength = BitConverter.ToInt32(totalBuffer, 0);

View File

@@ -86,7 +86,7 @@ namespace DoctorApp.ViewModels
// request the historic data from the server
this.SaveHistoricData = new RelayCommand<object>((parameter) =>
{
this.client.sendMessage(DataParser.GetGetFileMessage(PatientInfo.Username, DateTime.Now));
this.client.sendMessage(DataParser.GetGetFileMessage(PatientInfo.Username));
// data is stored on the server
// send request to server that we want to get the current historic data from the patient
// server sends this back