public void ReceiveMeasurement(Measurement measurement, string physcianName, string sessionType, string username) { UserClient userClient = (UserClient)server.GetUserFromPhysician(username); if (sessionType.Equals("Create")) { userClient.addSession(DateTime.Now); } else if (sessionType.Equals("CreateTest")) { userClient.StartNewTest(); } else if (sessionType.Equals("AddToTest")) { userClient.AddToLatestTest(measurement); } else { userClient.addMeasurement(measurement); //ServerClient physician = server.getPhysicianClient(physcianName); //if (physician != null) //{ // Console.WriteLine("sending new user " + user.isOnline); // NetworkFlow.SendPacket(new PacketGiveUserResponse(user), server.getPhysicianClient(((UserClient)user).physician).stream); //} } }
public void addClient(UserClient client) { clients.Add(client); }