Merge branch 'develop' of https://github.com/SemvdH/Proftaak-RH-B4 into develop
This commit is contained in:
@@ -167,6 +167,12 @@ namespace ClientApp.Utils
|
||||
engineConnection.DoctorMessage = DataParser.getChatMessageFromJson(payloadbytes);
|
||||
Debug.WriteLine("received message from doctor");
|
||||
break;
|
||||
case DataParser.NEW_CONNECTION:
|
||||
this.LoginViewModel.DoctorConnected(DataParser.getUsernameFromJson(payloadbytes));
|
||||
break;
|
||||
case DataParser.DISCONNECT:
|
||||
this.LoginViewModel.DoctorDisconnected(DataParser.getUsernameFromJson(payloadbytes));
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine($"Received json with identifier {identifier}:\n{Encoding.ASCII.GetString(payloadbytes)}");
|
||||
break;
|
||||
|
||||
@@ -42,5 +42,15 @@ namespace ClientApp.ViewModels
|
||||
this.MainWindowViewModel.SelectedViewModel = new MainViewModel(MainWindowViewModel);
|
||||
}
|
||||
}
|
||||
|
||||
internal void DoctorConnected(string name)
|
||||
{
|
||||
this.MainWindowViewModel.InfoModel.DoctorConnected = true;
|
||||
}
|
||||
|
||||
internal void DoctorDisconnected(string name)
|
||||
{
|
||||
this.MainWindowViewModel.InfoModel.DoctorConnected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user