private void leftmousefriend(object sender, EventArgs e) { List <Service.Profile> fr = ShopWindows.r.ToList(); int i = Lvfriend.SelectedIndex; //Service.Profile d = fr.FirstOrDefault(o => o.ID ==i); if (i != -1) { // client.AddToBlacklist(MainWindow.shopWindows.profile.ID, fr[i].ID); // client.RemoveFromBlacklist(MainWindow.shopWindows.profile.ID, fr[i].ID); profilefriend r = new profilefriend(ShopWindows.client.CheckProfile(fr[i].ID)); r.Left = this.Left; r.Top = this.Top; r.Show(); MainWindow.shopWindows.Visibility = Visibility.Hidden; } }
private void leftmousefriend(object sender, EventArgs e) { // List<Service.Profile> fr = MainWindow.shopWindows.profile.FriendReqests.ToList(); int i = Lvfriendnew.SelectedIndex; //Service.Profile d = fr.FirstOrDefault(o => o.ID ==i); if (i != -1) { // client.AddToBlacklist(MainWindow.shopWindows.profile.ID, fr[i].ID); // ShopWindows.client.RemoveFromBlacklist(MainWindow.shopWindows.profile.ID, fr[i].ID); profilefriend r = new profilefriend(ShopWindows.client.CheckProfile(ShopWindows.frmail[i].IDSender)); r.Left = this.Left; r.Top = this.Top; r.Show(); r.btnChat.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); this.Close(); MainWindow.shopWindows.Visibility = Visibility.Hidden; } }
private void leftmousefriend(object sender, EventArgs e) { List <Service.Profile> fr = tv.Friends.ToList(); int i = Lv.SelectedIndex; //Service.Profile d = fr.FirstOrDefault(o => o.ID ==i); if (i != -1) { if (fr[i].ID != Sender.ID) { profilefriend r = new profilefriend(ShopWindows.client.CheckProfile(fr[i].ID)); r.Left = this.Left; r.Top = this.Top; r.Show(); } else { MainWindow.shopWindows.Visibility = Visibility.Visible; MainWindow.shopWindows.Refresh.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } this.Close(); } }