예제 #1
0
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            string file = CustDialogs.ReturnFilePath();

            if (file == "")
            {
                return;
            }
            LoadList(file);
            cboList.Text = file;
        }
예제 #2
0
        private void LoadList(string path)
        {
            StreamReader sr = CustDialogs.ReturnStream(path);

            dgvList.Rows.Clear();
            do
            {
                string[] line  = sr.ReadLine().Split(',');
                var      index = dgvList.Rows.Add();
                dgvList.Rows[index].Cells[0].Value = line[0];
                dgvList.Rows[index].Cells[1].Value = line[1];
                dgvList.Rows[index].Cells[2].Value = line[2];
                dgvList.Rows[index].Cells[3].Value = line[3];
            } while (sr.EndOfStream != true);
        }