Beispiel #1
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     try
     {
         String cookie = this.listBoxAvailableCookies.SelectedItem.ToString();
         this.listBoxAvailableCookies.Items.Remove(cookie);
         CookiesSettings.AddRemoveCookie(true, cookie);
         if (this.listBoxCookiesToKeep.Items.Contains(cookie))
         {
             this.listBoxCookiesToKeep.Items.Add(cookie);
         }
     }
     catch (Exception ex)
     {
         ;
     }
 }
Beispiel #2
0
        public UCCookies()
        {
            InitializeComponent();

            var list = CookiesSettings.GetCookiesList();

            foreach (DataRow dr in list.Table.Rows)
            {
                this.listBoxCookiesToKeep.Items.Add(dr["Cookie"]);
            }

            var cookiesList = CookiesSettings.GetAvailableCookies();

            foreach (var item in cookiesList)
            {
                this.listBoxAvailableCookies.Items.Add(item);
            }
        }