Exemplo n.º 1
0
        // Choose, open, and process the binary file
        private void OpenBinaryFileBtn_Click(object sender, EventArgs e)
        {
            string         fileName = "";
            biorecord      brec     = new biorecord();
            OpenFileDialog OpenDlg  = new OpenFileDialog();

            if (DialogResult.Cancel != OpenDlg.ShowDialog())
            {
                fileName = OpenDlg.FileName;
                brec.ProcessBinaryFile(fileName);
            }
        }
Exemplo n.º 2
0
        // Choose, open and process the text file
        private void OpenTextFileBtn_Click(object sender, EventArgs e)
        {
            string    fileName = "";
            biorecord brec     = new biorecord();

            OpenFileDialog OpenDlg = new OpenFileDialog();

            if (DialogResult.Cancel != OpenDlg.ShowDialog())
            {
                fileName = OpenDlg.FileName;
                List <string[]> arr = brec.ProcessTextFile(fileName);
                richTextBox.Clear();

                for (int i = 0; i < arr.Count; i++)
                {
                    for (int j = 0; j < arr[i].Length; j++)
                    {
                        richTextBox.AppendText(arr[i][j] + " ");
                    }
                    richTextBox.AppendText("\n");
                }
            }
        }