Пример #1
0
        private void btn_AddProxy_Click(object sender, EventArgs e)
        {
            Proxy newProxy = new Proxy()
            {
                Name     = txt_Name.Text,
                Host     = txt_Host.Text,
                Port     = txt_Port.Text,
                UserName = txt_UserName.Text,
                Password = txt_Password.Text,
                Scheme   = txt_Scheme.Text
            };

            AddProxy_AddProxyClickEventArgs eventArgs = new AddProxy_AddProxyClickEventArgs()
            {
                Proxy = newProxy
            };


            if (this.AddProxyClick != null)
            {
                this.AddProxyClick(this, eventArgs);
            }

            ClearForm();
        }
Пример #2
0
 protected void UserControl_AddProxyClick(object sender, AddProxy_AddProxyClickEventArgs e)
 {
     ProxyList.Add(e.Proxy);
     LoadProxyGrid();
 }