private void ActiveUsersTextBox_Click(object sender, EventArgs e) { PrivateChatForm form = new PrivateChatForm(ActiveUsersTextBox.SelectedItems[0].Text); form.Show(); //MessageBox.Show(ActiveUsersTextBox.SelectedItems[0].Text); }
public void OpenPrivateChatForm(string sender, string message) { Console.WriteLine("Otwieram okno prywatnego czatu"); PrivateChatForm form = new PrivateChatForm(); form.PrivateChatTextBox.Text += $"{sender}: {message}{Environment.NewLine}"; form.Show(); }
private void ActiveUsersTextBox_MouseDoubleClick(object sender, MouseEventArgs e) { // Pobranie indeksu wybranego elementu var index = ActiveUsersTextBox.SelectedIndices[0]; PrivateChatForm form = new PrivateChatForm(ActiveUsersTextBox.SelectedIndices[0].ToString()); form.Show(); /*if (ActiveUsersTextBox.SelectedItem != null) * { * PrivateChatForm form = new PrivateChatForm(ActiveUsersTextBox.SelectedItem.ToString()); * form.Show(); * ActiveUsersTextBox.ClearSelected(); * }*/ }
public PublicChatForm() { pChat = new PrivateChatForm(this); InitializeComponent(); }