ADD] added message sending to all clients, doesn't work yet
This commit is contained in:
Sem van der Hoeven
2020-10-27 21:24:47 +01:00
parent fab3ed7705
commit cda8b47ca3
5 changed files with 18 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ namespace DoctorApp.ViewModels
Debug.WriteLine("new tab with name " + username);
App.Current.Dispatcher.Invoke((Action)delegate
{
Tabs.Add(new ClientInfoViewModel(MainWindowViewModel, username));
Tabs.Add(new ClientInfoViewModel(this,MainWindowViewModel, username));
});
}
@@ -72,6 +72,15 @@ namespace DoctorApp.ViewModels
}
}
}
internal void SendToAllClients(string text)
{
Debug.WriteLine("[MAINVIEWMODEL] Sending message to all clients: " + text);
foreach (ClientInfoViewModel item in Tabs)
{
item.SendMessageToClient(item.PatientInfo.Username, text);
}
}
}