Exemple #1
0
            public override bool Equals(object obj)
            {
                myProxy other = obj as myProxy;

                return((other != null) &&
                       (Name == other.Name) &&
                       (Ip == other.Ip) &&
                       (Port == other.Port));
            }
Exemple #2
0
        private void RefreshActiveProxy()
        {
            myProxy activeProxy = psm.GetAvtiveProxy();

            if (activeProxy != null)
            {
                txt_avtiveIP.Text   = activeProxy.Ip;
                txt_avtivePort.Text = activeProxy.Port;
            }
            else
            {
                txt_avtiveIP.Text   = "";
                txt_avtivePort.Text = "";
            }
        }
Exemple #3
0
        private void cmd_saveProxy_Click(object sender, EventArgs e)
        {
            var newProxy = new myProxy(txt_proxyName.Text, txt_ip.Text, txt_port.Text);

            while (list.Contains(newProxy))
            {
                list.Remove(newProxy);
            }

            list.Insert(0, newProxy);

            var bindingList = new BindingList <myProxy>(list);
            var source      = new BindingSource(bindingList, null);

            dataGridView1.DataSource = source;
        }