资源简介
售票系统是基于visual studio 完成的
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace TrainSystem
{
[Serializable]
public class CustomPoint
{
public CustomPoint()
{
this.x = 0;
this.y = 0;
}
public CustomPoint(int x int y)
{
this.x = (float)x;
this.y = (float)y;
}
public CustomPoint(float x float y)
{
this.x = x;
this.y = y;
}
#region 属性
private float x;
///
/// 点的X坐标
///
public float X
{
get { return x; }
set { x = value; }
}
private float y;
///
/// 点的Y坐标
///
public float Y
{
get { return y; }
set { y = value; }
}
private Color backColor = Color.FromArgb(0 255 0);
///
/// 背景色
///
public Color BackColor
{
get { return backColor; }
set { backColor = value; }
}
private bool selected = false;
///
/// 是否选中
///
public bool Selected
{
get { return selected; }
set { selected = value; }
}
///
/// 该点对应的矩形区域(+-4像素)
///
public CustomRectangle PositionRect
{
get { return new CustomRectangle(x - 3 y - 3 6 6); }
}
#endregion
#region 方法
///
/// 返回一个克隆的对象
///
///
public CustomPoint Clone()
{
CustomPoint pt = new CustomPoint(x y);
pt.backColor = backColor;
return pt;
}
///
/// 绘制该控制点
///
///
public void Draw(Graphics g)
{
DrawBorderHandler(g PositionRect backColor);
if (selected)
{
//选中时边框变粗
CustomRectangle rect = new CustomRectangle(x - 4 y - 4 8 8);
g.DrawRectangle(new Pen(Color.Black) rect.ToRectangle());
}
}
///
/// 绘制菱形控制点
///
///
public void DrawDiamond(Graphics g)
{
g.SmoothingMode = SmoothingMode.Default;
PointF[] pts = new PointF[] { new PointF(x y - 4) new PointF(x - 4 y) new PointF(x y + 4) new PointF(x + 4 y) };
g.FillPolygon(new SolidBrush(backColor) pts);
g.DrawPolygon(new Pen(Color.Black) pts);
g.SmoothingMode = SmoothingM
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2638 2008-05-25 12:43 火车售票系统 visual studio\TrainSystem\MainTrain.sql
文件 922 2008-05-15 16:47 火车售票系统 visual studio\TrainSystem\TrainSystem.sln
..A..H. 37888 2011-03-15 20:15 火车售票系统 visual studio\TrainSystem\TrainSystem.suo
文件 692 2009-11-24 16:06 火车售票系统 visual studio\TrainSystem\TrainSystem\app.config
文件 4945 2009-11-25 17:39 火车售票系统 visual studio\TrainSystem\TrainSystem\CustomPoint.cs
文件 9390 2009-11-25 17:39 火车售票系统 visual studio\TrainSystem\TrainSystem\CustomRectangle.cs
文件 28048 2009-11-23 17:17 火车售票系统 visual studio\TrainSystem\TrainSystem\Form1.cs
文件 108487 2009-11-23 17:17 火车售票系统 visual studio\TrainSystem\TrainSystem\Form1.Designer.cs
文件 88597 2009-11-23 17:17 火车售票系统 visual studio\TrainSystem\TrainSystem\Form1.resx
文件 7721 2009-11-26 18:06 火车售票系统 visual studio\TrainSystem\TrainSystem\Form2.cs
文件 12219 2009-11-26 18:06 火车售票系统 visual studio\TrainSystem\TrainSystem\Form2.Designer.cs
文件 60206 2009-11-26 18:06 火车售票系统 visual studio\TrainSystem\TrainSystem\Form2.resx
文件 1847 2009-11-21 14:04 火车售票系统 visual studio\TrainSystem\TrainSystem\Form3.cs
文件 5403 2009-11-21 14:04 火车售票系统 visual studio\TrainSystem\TrainSystem\Form3.Designer.cs
文件 6008 2009-11-21 14:04 火车售票系统 visual studio\TrainSystem\TrainSystem\Form3.resx
文件 2282 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form4.cs
文件 8137 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form4.Designer.cs
文件 5814 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form4.resx
文件 1320 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form5.cs
文件 6405 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form5.Designer.cs
文件 5814 2009-11-25 23:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form5.resx
文件 33040 2009-11-26 10:14 火车售票系统 visual studio\TrainSystem\TrainSystem\Form6.cs
文件 145854 2009-11-26 09:23 火车售票系统 visual studio\TrainSystem\TrainSystem\Form6.Designer.cs
文件 19556 2009-11-26 09:23 火车售票系统 visual studio\TrainSystem\TrainSystem\Form6.resx
文件 8753 2009-11-26 18:46 火车售票系统 visual studio\TrainSystem\TrainSystem\MainForm.cs
文件 13103 2009-11-26 18:46 火车售票系统 visual studio\TrainSystem\TrainSystem\MainForm.Designer.cs
文件 103916 2009-11-26 18:46 火车售票系统 visual studio\TrainSystem\TrainSystem\MainForm.resx
文件 664 2009-11-23 15:37 火车售票系统 visual studio\TrainSystem\TrainSystem\Program.cs
文件 3242 2009-11-21 16:51 火车售票系统 visual studio\TrainSystem\TrainSystem\Sql.cs
文件 10462 2009-11-26 18:09 火车售票系统 visual studio\TrainSystem\TrainSystem\Tra.ico
............此处省略97个文件信息
- 上一篇:DC2.0、3.5母座的封装Image1
- 下一篇:Ansys 理论手册
评论
共有 条评论