《C#程序设计课程设计-公交路线查询.docVIP

  • 39
  • 0
  • 约3.31万字
  • 约 30页
  • 2016-08-17 发布于贵州
  • 举报

《C#程序设计课程设计-公交路线查询.doc

《C#程序设计课程设计-公交路线查询

太湖学院 《C#程序设计》课程设计 题目: 《公交路线查询》 机 电 学院 计算机科学与技术 专业 学 号: 学生姓名: 班 级: 计科84 成 绩: 2012年 1月 ㈠需求分析㈡概要设计using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace bus { public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { if (radioButton1.Checked) { Form1 f=new Form1(); f.Show(); this.Hide(); } if(radioButton2.Checked) { Form2 f = new Form2(); f.Show(); this.Hide(); } } private void button2_Click(object sender, EventArgs e) { Application.Exit(); } private void radioButton1_CheckedChanged(object sender, EventArgs e) { } } } 查询模块: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace bus { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public int n = 0; private void button1_Click(object sender, EventArgs e) { string []bus = new string[10]; FileStream fs = new FileStream(C:\\Documents and Settings\\Administrator\\桌面\\buses\\bus\\MyFile.txt, FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); for (int i = 0; i bus.Length; i++) { bus[i] = sr.ReadLine(); if (bus[i] == null) { n++;

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档