public Login() { InitializeComponent(); newChat = new Chat(); }
public Registration(Chat c) { InitializeComponent(); chat = c; }
private void SendMessageButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(NewMessageTextbox.Text)) { return; } var newChat = new Chat(); newChat.User = MyUser.Username; newChat.TimeSubmitted = DateTime.Now; newChat.ChatMessage = NewMessageTextbox.Text; newChat.RoomName = RoomName; MyClient.SubmitChat(newChat); NewMessageTextbox.Text = ""; }