예제 #1
0
 private void ofdCSV_FileOk(object sender, CancelEventArgs e)
 {
     alunos = new List <AlunoData>();
     string[] lines = File.ReadAllLines(ofdCSV.FileName);
     foreach (string line in lines)
     {
         AlunoData aluno = new AlunoData();
         aluno.name      = line.Split(';')[0];
         aluno.numero    = line.Split(';')[1];
         aluno.stdClass  = line.Split(';')[2];
         aluno.processId = line.Split(';')[3];
         alunos.Add(aluno);
     }
 }
예제 #2
0
 public Form1(AlunoData aluno, Bitmap background, string photoFolder)
 {
     InitializeComponent();
     this.aluno      = aluno;
     label1.Text     = aluno.name;
     label2.Text     = aluno.stdClass;
     stdNrLabel.Text = aluno.numero;
     this.Size       = new Size(500, 300);
     try
     {
         pictureBox1.Image    = Image.FromFile(photoPath(aluno.processId, photoFolder));
         pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     }
     catch (Exception) { }
     //this.Location = new Point(this.ClientSize.Width / 2, this.ClientSize.Height / 2);
     pictureBox2.Image = background;
 }