Example #1
0
 private void lv_friends_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (this.lv_friends.SelectedItems.Count > 0)
     {
         ListViewItem lvitem = this.lv_friends.SelectedItems[0];
         string       toUID  = lvitem.Text;
         string       toname = lvitem.SubItems[1].Text;
         string       toips  = lvitem.Tag.ToString();
         Talking      t      = isHaveTalk(toUID);
         if (t != null)
         {
             t.Focus();
         }
         else
         {
             this.lv_friends.SelectedItems[0].SubItems[0].BackColor = Color.Transparent;
             Talking talk = new Talking();
             talk.UID      = toUID;
             talk.UserName = Username;
             talk.ToName   = toname;
             talk.Br       = Br;
             talk.Bw       = Bw;
             TalkList.Add(talk);
             talk.Show();
         }
     }
 }
Example #2
0
 public static void RemoveTalking(Talking _talk)
 {
     foreach (Talking tk in TalkList)
     {
         if (tk.UID == _talk.UID)
         {
             TalkList.Remove(_talk);
             return;
         }
     }
 }