Exemplo n.º 1
0
 private void OpenInputBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (openFileDialog.ShowDialog() == DialogResult.OK)
         {
             FileTools file = new FileTools(openFileDialog.FileName);
             file.BinReaderOpen();
             Input.Text = String.Join(" ", file.ReadBinListDouble());
             file.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error");
     }
 }
Exemplo n.º 2
0
 private void OpnBtn_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             FileTools file = new FileTools(openFileDialog.FileName);
             file.BinReaderOpen();
             list = file.ReadBinStudentList();
             SetDGV();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error");
         }
     }
 }
Exemplo n.º 3
0
 private void OpenOutputFile_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             FileTools file = new FileTools(openFileDialog.FileName);
             file.BinReaderOpen();
             StringBuilder sb = new StringBuilder();
             while (!file.End)
             {
                 sb.AppendLine(String.Join(" ", file.ReadBinListDouble()));
             }
             Output.Text = sb.ToString();
             file.Close();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error");
         }
     }
 }