[
ADD] added message sending to all clients, doesn't work yet
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user