[EDIT] made seperate method for sending message
This commit is contained in:
@@ -68,12 +68,17 @@ namespace DoctorApp.ViewModels
|
||||
|
||||
Chat = new RelayCommand<object>((parameter) =>
|
||||
{
|
||||
client.sendMessage(DataParser.getChatJson(PatientInfo.Username, ((TextBox)parameter).Text));
|
||||
PatientInfo.ChatLog.Add(DateTime.Now + ": " + ((TextBox)parameter).Text);
|
||||
SendMessageToClient(PatientInfo.Username, ((TextBox)parameter).Text);
|
||||
});
|
||||
|
||||
//TODO RelayCommand ChatToAll
|
||||
|
||||
ChatToAll = new RelayCommand<object>((parameter) =>
|
||||
{
|
||||
//todo save clientinfoviewmodels in mainviewmodel
|
||||
//todo send message to client of every clientinfoviewmodel
|
||||
});
|
||||
|
||||
SetResistance = new RelayCommand<object>((parameter) =>
|
||||
{
|
||||
Debug.WriteLine("resistance");
|
||||
@@ -83,6 +88,12 @@ namespace DoctorApp.ViewModels
|
||||
|
||||
}
|
||||
|
||||
public void SendMessageToClient(string username, string text)
|
||||
{
|
||||
client.sendMessage(DataParser.getChatJson(username, text));
|
||||
PatientInfo.ChatLog.Add(DateTime.Now + ": " + text);
|
||||
}
|
||||
|
||||
public void BPMData(byte [] bytes)
|
||||
{
|
||||
//TODO
|
||||
|
||||
Reference in New Issue
Block a user