diff --git a/DoctorApp/DoctorApp.csproj b/DoctorApp/DoctorApp.csproj
index 152865f..2ff8d95 100644
--- a/DoctorApp/DoctorApp.csproj
+++ b/DoctorApp/DoctorApp.csproj
@@ -1,29 +1,32 @@
-
- WinExe
- netcoreapp3.1
- true
-
+
+ WinExe
+ netcoreapp3.1
+ true
+ doctor.ico
+
-
- true
-
+
+
+
-
- true
-
+
+
+ Always
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/DoctorApp/Models/PatientInfo.cs b/DoctorApp/Models/PatientInfo.cs
new file mode 100644
index 0000000..c7ed295
--- /dev/null
+++ b/DoctorApp/Models/PatientInfo.cs
@@ -0,0 +1,25 @@
+using System.Collections.ObjectModel;
+using Util;
+
+namespace DoctorApp.Models
+{
+ class PatientInfo : ObservableObject
+ {
+ public ObservableCollection ChatLog { get; set; }
+ public string Username { get; set; }
+
+ public string Status { get; set; }
+
+ public int Speed { get; set; }
+
+ public int BPM { get; set; }
+
+ public int Resistance { get; set; }
+ public int Acc_Power { get; set; }
+
+ public int Curr_Power { get; set; }
+
+ public int Distance { get; set; }
+
+ }
+}
diff --git a/DoctorApp/Utils/Client.cs b/DoctorApp/Utils/Client.cs
index 00f3832..bbd3674 100644
--- a/DoctorApp/Utils/Client.cs
+++ b/DoctorApp/Utils/Client.cs
@@ -82,7 +82,6 @@ namespace DoctorApp.Utils
string identifier;
bool isJson = DataParser.getJsonIdentifier(messageBytes, out identifier);
- Debug.WriteLine("doctor " + Encoding.ASCII.GetString(payloadbytes));
if (isJson)
{
switch (identifier)
diff --git a/DoctorApp/ViewModels/ClientInfoViewModel.cs b/DoctorApp/ViewModels/ClientInfoViewModel.cs
index d186d78..0e98724 100644
--- a/DoctorApp/ViewModels/ClientInfoViewModel.cs
+++ b/DoctorApp/ViewModels/ClientInfoViewModel.cs
@@ -1,4 +1,5 @@
-using DoctorApp.Utils;
+using DoctorApp.Models;
+using DoctorApp.Utils;
using GalaSoft.MvvmLight.Command;
using System;
using System.Collections.Generic;
@@ -11,7 +12,7 @@ using Util;
namespace DoctorApp.ViewModels
{
-
+
class ClientInfoViewModel : ObservableObject
{
public ObservableCollection ChatLog { get; set; }
@@ -45,26 +46,29 @@ namespace DoctorApp.ViewModels
public MainWindowViewModel MainWindowViewModel { get; set; }
private Client client;
- public ClientInfoViewModel(MainWindowViewModel mainWindowViewModel)
+ public ClientInfoViewModel(MainWindowViewModel mainWindowViewModel, string username)
{
MainWindowViewModel = mainWindowViewModel;
- ChatLog = new ObservableCollection();
+ this.PatientInfo = new PatientInfo() { Username = username, Status = "Waiting to start" };
+ PatientInfo.ChatLog = new ObservableCollection();
client = mainWindowViewModel.client;
- StartSession = new RelayCommand(()=>{
- client.sendMessage(DataParser.getStartSessionJson(Username));
- Status = "Session started";
+ StartSession = new RelayCommand(() =>
+ {
+ client.sendMessage(DataParser.getStartSessionJson(PatientInfo.Username));
+ PatientInfo.Status = "Session started";
});
- StopSession = new RelayCommand(() => {
- client.sendMessage(DataParser.getStopSessionJson(Username));
- Status = "Session stopped, waiting to start again.";
+ StopSession = new RelayCommand(() =>
+ {
+ client.sendMessage(DataParser.getStopSessionJson(PatientInfo.Username));
+ PatientInfo.Status = "Session stopped, waiting to start again.";
});
Chat = new RelayCommand