Beispiel #1
0
        private void LoadDecoders()
        {
            decoderView.Rows.Clear();
            List <Decoder> list = FileOperation <Decoder> .ReadFile();

            foreach (Decoder d in list)
            {
                DataGridViewRow r = new DataGridViewRow();
                r.CreateCells(decoderView);
                r.Cells[0].Value = "";
                r.Cells[1].Value = d.DecoderName;
                r.Cells[2].Value = d.Ipaddr;
                r.Cells[3].Value = d.Username;
                r.Cells[4].Value = d.Password;
                r.Cells[5].Value = d.SerialNo;
                decoderView.Rows.Add(r);
            }
            decoderView.Refresh();
            foreach (DataGridViewRow dr in decoderView.Rows)
            {
                dr.Cells[0].Value = dr.Index + 1;
            }
        }