Example #1
0
 public Contact(NameIPPair pair)
 {
     this.Pair = pair;
     InitializeComponent();
     Saved       = false;
     ContactName = pair.Name;
     IP          = pair.IP;
     DataContext = this;
 }
Example #2
0
        private void AddContactFromPair(NameIPPair c, bool saved)
        {
            Contact contact = new Contact(c);

            contact.Delete += contact_Delete;
            contact.Saved   = saved;
            contact.Ban    += contact_Ban;
            contact.Pardon += contact_Pardon;
            contact.PingAndView();
            contact.SendFile += sender.SendFile;
            contact.Banned    = Properties.Settings.Default.BannedIPs.Contains(contact.IP.ToString());
            contacts.Items.Add(contact);
        }