Ejemplo n.º 1
0
 public PointSwitchBase()
 {
     this.m_PointPlus = new Point(0.0, 0.0);
     this.m_PointMinus = new Point(0.0, 0.0);
     this.m_PointCore = new Point(0.0, 0.0);
     this.m_PointPeak = new Point(0.0, 0.0);
     this.BoundsPlus = new Rectangle(0, 0, 0, 0);
     this.BoundsMinus = new Rectangle(0, 0, 0, 0);
     this.m_alTrainsPeakToSink = new ArrayList();
 }
Ejemplo n.º 2
0
 public Element()
 {
     this.m_strID = "";
     this.BaseWidth = 3;
     this.IconMode = false;
     this.Tag = null;
     this.m_Connections = new ArrayList();
     this.ForeColor = Colors.get_Black();
     this.Bounds = new Rectangle(0, 0, 0, 0);
     this.Center = new Point(0.0, 0.0);
     this.Initialize();
 }
Ejemplo n.º 3
0
 public override void SetLocation(Rectangle r)
 {
     this.BasePoint = new Point((double) r.X, (double) r.Y);
 }
Ejemplo n.º 4
0
 public override void SetLocation(Rectangle r)
 {
     this.PointPlus = new Point((double) r.X, (double) r.Y);
     this.PointMinus = new Point((double) (r.X + r.Width), (double) r.Y);
 }
Ejemplo n.º 5
0
 public abstract void SetLocation(Rectangle r);
Ejemplo n.º 6
0
 public override void SetLocation(Rectangle r)
 {
     this.PointCore = new Point((double) (r.X + (r.Width >> 1)), (double) r.Y);
     this.PointPeak = new Point((double) r.X, (double) r.Y);
     this.PointMinus = new Point((double) (r.X + r.Width), (double) r.Y);
     this.PointPlus = new Point((double) (r.X + r.Width), (double) (r.Y + r.Height));
 }
Ejemplo n.º 7
0
 public bool IntersectsWith(Rectangle rect)
 {
     return ((((rect.X < (this.X + this.Width)) && (this.X < (rect.X + rect.Width))) && (rect.Y < (this.Y + this.Height))) && (this.Y < (rect.Y + rect.Height)));
 }
Ejemplo n.º 8
0
 static Rectangle()
 {
     Empty = new Rectangle();
 }
Ejemplo n.º 9
0
 public void Intersect(Rectangle rect)
 {
     Rectangle rectangle = Intersect(rect, this);
     this.X = rectangle.X;
     this.Y = rectangle.Y;
     this.Width = rectangle.Width;
     this.Height = rectangle.Height;
 }
Ejemplo n.º 10
0
 public bool Contains(Rectangle rect)
 {
     return ((((this.X <= rect.X) && ((rect.X + rect.Width) <= (this.X + this.Width))) && (this.Y <= rect.Y)) && ((rect.Y + rect.Height) <= (this.Y + this.Height)));
 }
Ejemplo n.º 11
0
 public static Rectangle Union(Rectangle a, Rectangle b)
 {
     int num = Math.Min(a.X, b.X);
     int num2 = Math.Max((int) (a.X + a.Width), (int) (b.X + b.Width));
     int num3 = Math.Min(a.Y, b.Y);
     int num4 = Math.Max((int) (a.Y + a.Height), (int) (b.Y + b.Height));
     return new Rectangle(num, num3, num2 - num, num4 - num3);
 }
Ejemplo n.º 12
0
 public static Rectangle Intersect(Rectangle a, Rectangle b)
 {
     int num = Math.Max(a.X, b.X);
     int num2 = Math.Min((int) (a.X + a.Width), (int) (b.X + b.Width));
     int num3 = Math.Max(a.Y, b.Y);
     int num4 = Math.Min((int) (a.Y + a.Height), (int) (b.Y + b.Height));
     if ((num2 >= num) && (num4 >= num3))
     {
         return new Rectangle(num, num3, num2 - num, num4 - num3);
     }
     return Empty;
 }
Ejemplo n.º 13
0
 public static Rectangle Inflate(Rectangle rect, int x, int y)
 {
     Rectangle rectangle = rect;
     rectangle.Inflate(x, y);
     return rectangle;
 }
Ejemplo n.º 14
0
 public override void SetLocation(Rectangle r)
 {
     this.PointCenter = new Point((double) r.X, (double) r.Y);
 }