private void EndOfBeursfuif() { MainActionCommand(); foreach (var client in _beursfuifData.Clients) { KickClientMessage kickClientMessage = new KickClientMessage() { Reason = KickWasKickedReason.END_OF_PARTY, ClientId = client.Id }; base.MessengerInstance.Send<KickClientMessage>(kickClientMessage); } SendLogMessage("Beursfuif has ended", LogType.SETTINGS_VM | LogType.GOOD_NEWS); SendToastMessage("Beursfuif completed", "De fuif is gedaan"); //TODO, disable restart fuif button _beursfuifData.EndOfBeursfuif(); MainActionButtonCommand.CanExecute(true); }
private void KickClient(KickClientMessage msg) { PointInCode("ClientsViewModel: KickClient"); Client client = Clients.FirstOrDefault(x => x.Id == msg.ClientId); if (client != null) { _server.KickClient(client.Id); SendToastMessage("Client was kicked",client.Name + " was kicked because " + msg.Reason); } }