private void SendMessage() { Message message = new Message(MainWindowViewModel.ClientUser, MessageText); MessageRequest messageRequest = new MessageRequest(message); DataTransferHelper.SendRequestToServer(MainWindowViewModel.Client, messageRequest); }
private void SignUp() { MainWindowViewModel.SettingsManager.Settings.ServerIPAddress = IPAddress; MainWindowViewModel.SettingsManager.ApplySettings(); MainWindowViewModel.Connect(); if (!MainWindowViewModel.IsConnected) { return; } RegistrationRequest registrationRequest = new RegistrationRequest(UserName, Password); DataTransferHelper.SendRequestToServer(MainWindowViewModel.Client, registrationRequest); }
public static void Disconnect() { if (!IsConnected) { return; } Request disconnectRequest = new SignOutRequest(); DataTransferHelper.SendRequestToServer(Client, disconnectRequest); Client?.Close(); IsConnected = false; }
private void SignOut() { SignOutRequest signOutRequest = new SignOutRequest(); DataTransferHelper.SendRequestToServer(MainWindowViewModel.Client, signOutRequest); }