コード例 #1
0
 private void AbrirToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     openFileDialog.ShowDialog();
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         string path = openFileDialog.FileName;
         table = new Background.CSV(path, ',');
         MessageBoxButtons buttons = MessageBoxButtons.OK;
         string[]          test    = table.GetLineValues(0);
         MessageBox.Show(test[0], "", buttons);
     }
 }
コード例 #2
0
        public IndexTable(CSV table)
        {
            int i;
            var buffer = table.GetLineValues(0);

            for (i = 1; i < buffer.Length; i++)
            {
                index.Add(buffer[i]);
            }

            i = 1;
            while (table.GetLineValues(i) != null)
            {
                buffer = table.GetLineValues(i);
                cities.Add(buffer[0]);

                for (int j = 1; i < buffer.Length; j++)
                {
                    float[] aux = new float[buffer.Length - 1];
                    aux[j - 1] = float.Parse(buffer[j]);
                }
            }
        }