using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
namespace WindowsFormsApplication5
{
struct Arcs
{
public int u;
public int v;
public double s;
public double t;
public Arcs(int u1, int v1, double s1, double t1)
{
u = u1;
v = v1;
s = s1;
t = t1;
}
}
public partial class Form1 : Form
{
ArrayList myData;
public Form1()
{
InitializeComponent();
myData = new ArrayList();
}
public void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog();
string fname = ofd.FileName;
String line;
try
{
StreamReader sr = new StreamReader(fname);
string[] data = File.ReadAllLines(fname);
int[] num = new int[4];
textBox2.Text = data[0];
textBox3.Text = data[2];
textBox4.Text = data[1];
textBox5.Text = data[3];
textBox6.Text = ofd.FileName;
line = sr.ReadLine();
while (line != null)
{
string[] words = line.Split(' ', '\b');
Arcs a = new Arcs(Convert.ToInt32(words[0]),Convert.ToInt32(words[1],Convert.Todouble32(words[2],Convert.Todouble32(words[3]);
//int aa = Convert.ToInt32(words[0]);
// myData.Add(a);
//textBox1.Text += line + "\r\n";
//textBox1.Text += words[2] + "\r\n";
line = sr.ReadLine();
}
sr.Close();
}
catch (Exception)
{
}
finally
{
}
}
}
}