Beispiel #1
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            PostData Require = new PostData();

            Require.InData = "action=search" +
                             "&&username="******"&&password="******"&&filename=" + SearchInput.Text;
            string response = Require.postPackge();

            //ResourceGridView.Dispose();
            string[] tmp = response.Split('#');
            int      len = tmp.Length - 1;

            string[,] info = new string[len, 4];
            ResourceGridView.ColumnCount = 4;
            ResourceGridView.RowCount    = len;
            for (int i = 0; i < ResourceGridView.RowCount; i++)
            {
                string[] buff = tmp[i].Split('&');
                for (int j = 0; j < ResourceGridView.ColumnCount; j++)
                {
                    info[i, j] = buff[j];
                }
            }
            for (int i = 0; i < ResourceGridView.RowCount; i++)
            {
                for (int j = 0; j < ResourceGridView.ColumnCount; j++)
                {
                    ResourceGridView.Rows[i].Cells[j].Value = info[i, j];
                }
            }
            ResourceGridView.Show();
        }