Merge remote-tracking branch 'origin/develop' into dataOnTabs

This commit is contained in:
fabjuuuh
2020-10-19 11:14:57 +02:00
11 changed files with 90 additions and 76 deletions

View File

@@ -22,19 +22,14 @@ namespace DoctorApp.ViewModels
{
this.MainWindowViewModel = mainWindowViewModel;
client = this.MainWindowViewModel.client;
Tabs= new ObservableCollection<ClientInfoViewModel>();
Tabs = new ObservableCollection<ClientInfoViewModel>();
}
public void NewConnectedUser(string username)
{
System.Diagnostics.Debug.WriteLine("CREATING TAB FOR " + username);
App.Current.Dispatcher.Invoke((Action)delegate
{
Tabs.Add(new ClientInfoViewModel(MainWindowViewModel)
{
Username = username,
Status = "Waiting to start"
});
Tabs.Add(new ClientInfoViewModel(MainWindowViewModel, username));
});
}
@@ -44,7 +39,7 @@ namespace DoctorApp.ViewModels
{
foreach (ClientInfoViewModel item in Tabs)
{
if (item.Username == username)
if (item.PatientInfo.Username == username)
{
Tabs.Remove(item);
break;