Exemple #1
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            if (lstConfigurations.SelectedItem == null)
            {
                return;
            }

            ProxyConfigWrapper config = (ProxyConfigWrapper)lstConfigurations.SelectedItem;

            Configuration.Proxies.Remove(config.Content);
            lstConfigurations.Items.Remove(config);
        }
Exemple #2
0
        private void lstConfigurations_SelectedValueChanged(object sender, EventArgs e)
        {
            ProxyConfigWrapper config = (ProxyConfigWrapper)lstConfigurations.SelectedItem;

            if (config == null)
            {
                return;
            }
            txtName.Text                   = config.Content.Name;
            txtOwnIP.Text                  = config.Content.OwnIP;
            txtProxy.Text                  = config.Content.Proxy;
            chkBypassLocal.Checked         = config.Content.BypassLocal;
            txtAdditionalExceptions.Text   = config.Content.AdditionalExceptions;
            cmbDefaultPrinter.SelectedItem = config.Content.DefaultPrinter != null &&
                                             cmbDefaultPrinter.Items.Contains(config.Content.DefaultPrinter) ?
                                             config.Content.DefaultPrinter : NO_PRINTER;
        }