private void DrawDispImage(PaintEventArgs e, Rectangle rect) { Seat seat = (Seat)base.Tag; Image controlImg = EditSeatItem.GetControlImg(seat._seatFlag); if (this._Rotation == 180) { Point point = new Point(rect.X, rect.Bottom); Point point2 = new Point(rect.Right, rect.Bottom); Point point3 = new Point(rect.X, rect.Y); Point[] destPoints = new Point[] { point, point2, point3 }; e.Graphics.DrawImage(controlImg, destPoints); } else { e.Graphics.DrawImage(controlImg, rect); } if (this._displayText) { if (seat._seatFlag == "0" || seat._seatFlag == "1" || seat._seatFlag == "2" || seat._seatFlag == "5" || seat._seatFlag == "4") { if (this._seatStatus != BHSeatControl.BHSeatStatus.Success) { this.DrawDisplayText(e, base.ClientRectangle, this.Text, this._Rotation); } } } }
private void DrawDispImage(PaintEventArgs e, Rectangle rect) { if (base.Tag == null) { Pen pen = new Pen(Color.Black, 4f); e.Graphics.DrawRectangle(pen, rect); pen.Dispose(); } else { Seat seat = (Seat)base.Tag; if (seat._IsUsedBackColor) { if (seat._BackColor != 0) { Color color = Color.FromArgb(seat._BackColor & 255, (seat._BackColor & 65280) >> 8, (seat._BackColor & 16711680) >> 16); SolidBrush solidBrush = new SolidBrush(color); e.Graphics.FillRectangle(solidBrush, rect); solidBrush.Dispose(); } } Image controlImg = EditSeatItem.GetControlImg(seat._seatFlag); if (this._Rotation == 180) { Point point = new Point(rect.X, rect.Bottom); Point point2 = new Point(rect.Right, rect.Bottom); Point point3 = new Point(rect.X, rect.Y); Point[] destPoints = new Point[] { point, point2, point3 }; e.Graphics.DrawImage(controlImg, destPoints); } else { e.Graphics.DrawImage(EditSeatItem.GetControlImg(seat._seatFlag), rect); } if (this._seatStatus == BHSeatControl.BHSeatStatus.Lock || this._seatStatus == BHSeatControl.BHSeatStatus.SpecialLock || this._seatStatus == BHSeatControl.BHSeatStatus.PrSuccess || this._seatStatus == BHSeatControl.BHSeatStatus.Success) { this.DrawExtendImg(e, rect, seat._seatStatusFlag); } if (this._seatStatus == BHSeatControl.BHSeatStatus.Selected) { this.DrawSelectBorder(e, base.ClientRectangle); } if (this._displayText) { if (seat._seatFlag == "0" || seat._seatFlag == "1" || seat._seatFlag == "2" || seat._seatFlag == "5" || seat._seatFlag == "4") { if (seat._seatStatusFlag == "0" || seat._seatStatusFlag == "5") { this.DrawDisplayText(e, rect, seat._seatColumn, this._Rotation); } } } } }
private void DrawDispImageBox(PaintEventArgs e, Rectangle rect) { if (base.Image == null) { Pen pen = new Pen(Color.Black, 4f); e.Graphics.DrawRectangle(pen, rect); pen.Dispose(); } else { Seat seat = (Seat)base.Tag; int num = 10000; int num2 = 10000; this.GetMinLeftAndTopSize(seat._brotherList, ref num, ref num2); foreach (Seat current in seat._brotherList) { Image controlImg = EditSeatItem.GetControlImg(current._seatFlag); Rectangle rect2 = new Rectangle(rect.X + current._seatPosX - num, rect.Y + current._seatPosY - num2, current._seatWidth, current._seatHeight); if (this._Rotation == 180) { Point point = new Point(rect2.X, rect2.Bottom); Point point2 = new Point(rect2.Right, rect2.Bottom); Point point3 = new Point(rect2.X, rect2.Y); Point[] destPoints = new Point[] { point, point2, point3 }; e.Graphics.DrawImage(controlImg, destPoints); } else { e.Graphics.DrawImage(controlImg, rect2); } if (this._displayText) { if (seat._seatFlag == "0" || seat._seatFlag == "1" || seat._seatFlag == "2" || seat._seatFlag == "5" || seat._seatFlag == "4") { if (this._seatStatus != BHSeatControl.BHSeatStatus.Success) { this.DrawDisplayText(e, rect2, current._seatDisplay, this._Rotation); } } } } Pen pen2 = new Pen(this.BoxBorderColor, 6f); e.Graphics.DrawRectangle(pen2, rect); pen2.Dispose(); } }
private void DrawDispImageBox(PaintEventArgs e, Rectangle rect) { if (base.Image == null) { Pen pen = new Pen(Color.Black, 4f); e.Graphics.DrawRectangle(pen, rect); pen.Dispose(); } else { Seat seat = (Seat)base.Tag; int num = 10000; int num2 = 10000; this.GetMinLeftAndTopSize(seat._brotherList, ref num, ref num2); int num3 = 0; foreach (Seat current in seat._brotherList) { Image controlImg = EditSeatItem.GetControlImg(current._seatFlag); Rectangle rect2 = new Rectangle(rect.X + current._seatPosX - num, rect.Y + current._seatPosY - num2, current._seatWidth, current._seatHeight); if (current._IsUsedBackColor) { if (current._BackColor != 0) { Color color = Color.FromArgb(current._BackColor & 255, (current._BackColor & 65280) >> 8, (current._BackColor & 16711680) >> 16); SolidBrush solidBrush = new SolidBrush(color); e.Graphics.FillRectangle(solidBrush, rect2); solidBrush.Dispose(); } } if (this._Rotation == 180) { Point point = new Point(rect2.X, rect2.Bottom); Point point2 = new Point(rect2.Right, rect2.Bottom); Point point3 = new Point(rect2.X, rect2.Y); Point[] destPoints = new Point[] { point, point2, point3 }; e.Graphics.DrawImage(controlImg, destPoints); } else { e.Graphics.DrawImage(EditSeatItem.GetControlImg(current._seatFlag), rect2); } if (current._seatStatusFlag == "1" || current._seatStatusFlag == "2" || current._seatStatusFlag == "3" || current._seatStatusFlag == "4") { this.DrawExtendImg(e, rect2, current._seatStatusFlag); } if (current._seatStatusFlag == "5") { this.DrawSelectBorder(e, new Rectangle(rect2.Left + 3, rect2.Top + 4, rect2.Width - 6, rect2.Height - 8), 3); num3++; } if (this._displayText) { if (current._seatFlag == "0" || current._seatFlag == "1" || current._seatFlag == "2" || current._seatFlag == "5" || current._seatFlag == "4") { if (current._seatStatusFlag == "0" || current._seatStatusFlag == "5") { this.DrawDisplayText(e, rect2, current._seatColumn, this._Rotation); } } } } Pen pen2 = new Pen(this._BoxBorderColor, 6f); e.Graphics.DrawRectangle(pen2, rect); pen2.Dispose(); if (num3 == seat._brotherList.Count) { this.DrawSelectBorder(e, base.ClientRectangle); } } }
public bool SetSelectItemsType_One(BHSeatControl bh, BHSeatControl.BHSeatType bhSeatType) { bool result; if (this._listControlSelect.Count <= 0) { result = false; } else { foreach (Control current in this._listControlSelect) { if (bh.Name == current.Name) { ((BHSeatControl)current).SeatType = bhSeatType; Seat seat = (Seat)current.Tag; seat._seatFlag = EditSeatItem.GetString_ByControlFlag(bhSeatType); current.Tag = seat; ((BHSeatControl)current).Image = (((BHSeatControl)current).DispImageMode ? EditSeatItem.GetControlImg(seat._seatFlag) : null); result = true; return(result); } } result = false; } return(result); }