private void btn_add_roomowners_Click(object sender, EventArgs e) { FindFriendForm _FindFriendForm = new FindFriendForm(XMPPConn); _FindFriendForm.ISSelect = true; DialogResult result = _FindFriendForm.ShowDialog(); if (result == DialogResult.OK) { list_roomconfig_roomowners.Items.Add(_FindFriendForm.SelectJid.Bare.ToString()); } _FindFriendForm.Dispose(); }
/// <summary> /// 查找好友事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void find_Btn_MouseClick(object sender, MouseEventArgs e) { //for (int i = 0; i < 50; i++) //{ // new TChatForm().Show(); //} if (FindMouseClick != null) FindMouseClick(sender, e); else { if (_FindFriendForm == null) { _FindFriendForm = new FindFriendForm(XmppCon); try { _FindFriendForm.Show(); } catch (Exception) { } } else if (_FindFriendForm.IsDisposed) { _FindFriendForm = new FindFriendForm(XmppCon); try { _FindFriendForm.Show(); } catch (Exception) { } } else { try { _FindFriendForm.Show(); } catch (Exception) { } } } }
private void btn_find_MouseClick(object sender, MouseEventArgs e) { if (findFriendForm == null || findFriendForm.IsDisposed) { findFriendForm = new FindFriendForm(XmppCon); } try { findFriendForm.Show(); findFriendForm.Activate(); } catch (Exception) { } }