public ProxyGroupItem(ProxyGroup proxyGroup, MainWindow parentwindow)
 {
     InitializeComponent();
     group_id_show.Text    = proxyGroup.group_id;
     group_name_show.Text  = proxyGroup.group_name;
     group_count_show.Text = proxyGroup.group_count.ToString();
     group      = proxyGroup;
     mainwindow = parentwindow;
 }
        public List <ProxyGroup> ReadData_proxy_group()
        {
            List <ProxyGroup> result = new List <ProxyGroup>();
            SQLiteDataReader  sqlite_datareader;
            SQLiteCommand     sqlite_cmd;

            sqlite_cmd             = sqlite_conn.CreateCommand();
            sqlite_cmd.CommandText = "SELECT * FROM proxy_group";
            sqlite_datareader      = sqlite_cmd.ExecuteReader();
            while (sqlite_datareader.Read())
            {
                string     get_id     = sqlite_datareader.GetString(0);
                string     name       = sqlite_datareader.GetString(1);
                string     proxy_text = sqlite_datareader.GetString(2);
                ProxyGroup result_one = new ProxyGroup();
                result_one.group_id   = get_id;
                result_one.group_name = name;
                result_one.proxylist  = new List <MyProxy>();
                string[] temps = proxy_text.Split(';');
                foreach (string temp in temps)
                {
                    try
                    {
                        MyProxy myProxy = new MyProxy();
                        myProxy.url  = temp.Split(':')[0];
                        myProxy.port = temp.Split(':')[1];
                        myProxy.user = temp.Split(':')[2];
                        myProxy.pass = temp.Split(':')[3];
                        result_one.proxylist.Add(myProxy);
                    }
                    catch
                    {
                    }
                }
                result_one.group_count = result_one.proxylist.Count;
                result.Add(result_one);
            }
            return(result);
        }