Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void buttonAbrirArquivo_Click(object sender, EventArgs e)
- {
- if (openFileDialogPontos.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- try
- {
- StreamReader arq = new StreamReader(openFileDialogPontos.FileName);
- string linha;
- while ((linha = arq.ReadLine()) != null)
- {
- string[] valores = linha.Split();
- float t = float.Parse(valores[0]);
- float s = float.Parse(valores[1]);
- Ponto p = new Ponto(t, s);
- reta.InserePonto(p);
- }
- MostraPontosGrafico();
- MostraAjusteGrafico();
- }
- catch
- {
- MessageBox.Show("Erro no arquivo de entrada!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement