Пример #1
0
        public bool SetSelectItemsStatus_One(BHSeatControl bh, BHSeatControl.BHSeatStatus bhSeatStatus)
        {
            bool result;

            if (this._listControlSelect.Count <= 0)
            {
                result = false;
            }
            else
            {
                foreach (Control current in this._listControlSelect)
                {
                    if (bh.Name == current.Name)
                    {
                        ((BHSeatControl)current).SeatStatus = bhSeatStatus;
                        Seat seat = (Seat)current.Tag;
                        seat._seatStatusFlag = EditSeatItem.GetControlStatus_ByFlag(bhSeatStatus);
                        current.Tag          = seat;
                        ((BHSeatControl)current).ExtendImage = (((BHSeatControl)current).DispImageMode ? EditSeatItem.GetControlExtendImg(seat._seatStatusFlag) : null);
                        result = true;
                        return(result);
                    }
                }
                result = false;
            }
            return(result);
        }
Пример #2
0
 public void SetSelectItemsStatus_All(BHSeatControl.BHSeatStatus bhSeatStatus)
 {
     foreach (Control current in this._listControlSelect)
     {
         ((BHSeatControl)current).SeatStatus = bhSeatStatus;
         Seat seat = (Seat)current.Tag;
         seat._seatStatusFlag = EditSeatItem.GetControlStatus_ByFlag(bhSeatStatus);
         current.Tag          = seat;
         ((BHSeatControl)current).ExtendImage      = (((BHSeatControl)current).DispImageMode ? EditSeatItem.GetControlExtendImg(seat._seatStatusFlag) : null);
         ((BHSeatControl)current).CursorSelectedIt = false;
     }
     this._listControlSelect.Clear();
     this._CurrentSelectControl = null;
 }
Пример #3
0
        public static string GetControlStatus_ByFlag(BHSeatControl.BHSeatStatus BHSeatStatusFlag)
        {
            string result;

            if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.Empty)
            {
                result = "0";
            }
            else
            {
                if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.Lock)
                {
                    result = "1";
                }
                else
                {
                    if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.SpecialLock)
                    {
                        result = "2";
                    }
                    else
                    {
                        if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.PrSuccess)
                        {
                            result = "3";
                        }
                        else
                        {
                            if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.Success)
                            {
                                result = "4";
                            }
                            else
                            {
                                if (BHSeatStatusFlag == BHSeatControl.BHSeatStatus.Selected)
                                {
                                    result = "5";
                                }
                                else
                                {
                                    result = "0";
                                }
                            }
                        }
                    }
                }
            }
            return(result);
        }