-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinePlanForm.cs
More file actions
65 lines (60 loc) · 2.31 KB
/
LinePlanForm.cs
File metadata and controls
65 lines (60 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TrainTimetable
{
public partial class LinePlanForm : Form
{
public LinePlanForm()
{
InitializeComponent();
}
public void DrawLinePlanPicture()
{
pictureBox1.Size = new Size(TD_Width, TD_Height);
Graphics gs;
gs = Graphics.FromImage(bmp);
int ix = dm.stationList.Count();
List<double> staMile = new List<double>();
pictureBox1.BackgroundImage = null;
gs.Clear(this.pictureBox1.BackColor);
if (UpGraph == true && DownGraph == true)
{
double total1 = dm.stationMileList.Last();
pt.TimetableFrame(this.bmp.Width, 0, this.bmp.Height, total1, dm.stationMileList, gs, dm.stationStringList);
pt.TrainLine(gs, dm.upTrainList, dm.stationStringList);
pt.TrainLine(gs, dm.downTrainList, dm.stationStringList);
}
else if (UpGraph == true && DownGraph == false)
{
double total1 = dm.stationMileList.Last();
pt.TimetableFrame(this.bmp.Width, 0, this.bmp.Height, total1, dm.stationMileList, gs, dm.stationStringList);
pt.TrainLine(gs, dm.upTrainList, dm.stationStringList);
}
else if (UpGraph == false && DownGraph == true)
{
double total1 = dm.stationMileList.Last();
pt.TimetableFrame(this.bmp.Width, 0, this.bmp.Height, total1, dm.stationMileList, gs, dm.stationStringList);
pt.TrainLine(gs, dm.downTrainList, dm.stationStringList);
}
else
{
double total1 = dm.stationMileList.Last();
pt.TimetableFrame(this.bmp.Width, 0, this.bmp.Height, total1, dm.stationMileList, gs, dm.stationStringList);
}
this.pictureBox1.BackgroundImage = bmp;
}
private void LinePlanForm_Load(object sender, EventArgs e)
{
}
private void 绘制开行方案ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}