public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SeatClientV3.OperateResult.SystemObject clientobject = SeatClientV3.OperateResult.SystemObject.GetInstance();
            SeatFormImageBrush imageBrush = SeatFormImageBrush.GetInstance(clientobject.ClientSetting.DeviceSetting.BackImgage);

            SeatManage.EnumType.OrnamentType noteType = (SeatManage.EnumType.OrnamentType)value;
            switch (noteType)
            {
            case SeatManage.EnumType.OrnamentType.AirConditioning:
                return(imageBrush.NoteAirConditioning);

            case SeatManage.EnumType.OrnamentType.Bookshelf:
                return(imageBrush.NoteBookshelf);

            case SeatManage.EnumType.OrnamentType.Door:
                return(imageBrush.NotenoteDoor);

            case SeatManage.EnumType.OrnamentType.PCTable:
                return(imageBrush.NotePCTableg);

            case SeatManage.EnumType.OrnamentType.Pillar:
                return(imageBrush.NotePillar);

            case SeatManage.EnumType.OrnamentType.Plant:
                return(imageBrush.NotePlant);

            case SeatManage.EnumType.OrnamentType.Roundtable:
                return(imageBrush.NoteRoundtable);

            case SeatManage.EnumType.OrnamentType.Steps:
                return(imageBrush.NoteSteps);

            case SeatManage.EnumType.OrnamentType.Table:
                return(imageBrush.NoteTable);

            case SeatManage.EnumType.OrnamentType.Wall:
                return(imageBrush.NoteWall);

            case SeatManage.EnumType.OrnamentType.Window:
                return(imageBrush.NoteWindow);

            case SeatManage.EnumType.OrnamentType.Elevator:
                return(imageBrush.NoteElevator);

            case SeatManage.EnumType.OrnamentType.Stairway:
                return(imageBrush.NoteStairway);

            default:
                return(imageBrush.Noteblank);
            }
        }
Пример #2
0
 public static SeatFormImageBrush GetInstance(Dictionary <string, string> bitmapResource)
 {
     if (MyImageBrushs == null)
     {
         lock (_object)
         {
             if (MyImageBrushs == null)
             {
                 return(MyImageBrushs = new SeatFormImageBrush(bitmapResource));
             }
         }
     }
     return(MyImageBrushs);
 }
        public ImageBrush SeatImage(SeatManage.EnumType.SeatUsedState seatImageState)
        {
            SeatClientV3.OperateResult.SystemObject clientobject = SeatClientV3.OperateResult.SystemObject.GetInstance();
            SeatFormImageBrush imageBrush = SeatFormImageBrush.GetInstance(clientobject.ClientSetting.DeviceSetting.BackImgage);
            ImageBrush         ib         = new ImageBrush();

            switch (seatImageState)
            {
            case SeatManage.EnumType.SeatUsedState.None:
            case SeatManage.EnumType.SeatUsedState.NoPowerFree:
                ib.ImageSource = imageBrush.ImgFreeSeat.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.HasPowerFree:
                ib.ImageSource = imageBrush.ImgFreeSeatPW.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.HasPowerLeave:
                ib.ImageSource = imageBrush.ImgLeaveSeatPW.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.NoPowerLeave:
                ib.ImageSource = imageBrush.ImgLeaveSeat.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.HasPowerUsed:
                ib.ImageSource = imageBrush.ImgBusySeatPW.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.NoPowerUsed:
                ib.ImageSource = imageBrush.ImgBusySeat.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.HasPowerStop:
                ib.ImageSource = imageBrush.ImgStopSeatPW.ImageSource; break;

            case SeatManage.EnumType.SeatUsedState.NoPowerStop:
                ib.ImageSource = imageBrush.ImgStopSeat.ImageSource; break;

            default:
                ib = imageBrush.ImgFreeSeat; break;
            }
            return(ib);
        }
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SeatClientV3.OperateResult.SystemObject clientobject = SeatClientV3.OperateResult.SystemObject.GetInstance();
            SeatFormImageBrush imageBrush = SeatFormImageBrush.GetInstance(clientobject.ClientSetting.DeviceSetting.BackImgage);

            SeatManage.EnumType.SeatUsedState seatUsedState = (SeatManage.EnumType.SeatUsedState)value;
            switch (seatUsedState)
            {
            case SeatManage.EnumType.SeatUsedState.None:
            case SeatManage.EnumType.SeatUsedState.NoPowerFree:
                return(imageBrush.ImgFreeSeat);

            case SeatManage.EnumType.SeatUsedState.HasPowerFree:
                return(imageBrush.ImgFreeSeatPW);

            case SeatManage.EnumType.SeatUsedState.HasPowerLeave:
                return(imageBrush.ImgLeaveSeatPW);

            case  SeatManage.EnumType.SeatUsedState.NoPowerLeave:
                return(imageBrush.ImgLeaveSeat);

            case SeatManage.EnumType.SeatUsedState.HasPowerUsed:
                return(imageBrush.ImgBusySeatPW);

            case SeatManage.EnumType.SeatUsedState.NoPowerUsed:
                return(imageBrush.ImgBusySeat);

            case SeatManage.EnumType.SeatUsedState.HasPowerStop:
                return(imageBrush.ImgStopSeatPW);

            case SeatManage.EnumType.SeatUsedState.NoPowerStop:
                return(imageBrush.ImgStopSeat);

            default:
                return(imageBrush.ImgFreeSeat);
            }
        }
        public ImageBrush NoteImage(SeatManage.EnumType.OrnamentType noteType)
        {
            SeatClientV3.OperateResult.SystemObject clientobject = SeatClientV3.OperateResult.SystemObject.GetInstance();
            SeatFormImageBrush imageBrush = SeatFormImageBrush.GetInstance(clientobject.ClientSetting.DeviceSetting.BackImgage);
            ImageBrush         imgNote    = new ImageBrush();

            switch (noteType)
            {
            case SeatManage.EnumType.OrnamentType.AirConditioning:
                imgNote.ImageSource = imageBrush.NoteAirConditioning.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Bookshelf:
                imgNote.ImageSource = imageBrush.NoteBookshelf.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Door:
                imgNote.ImageSource = imageBrush.NotenoteDoor.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.PCTable:
                imgNote.ImageSource = imageBrush.NotePCTableg.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Pillar:
                imgNote.ImageSource = imageBrush.NotePillar.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Plant:
                imgNote.ImageSource = imageBrush.NotePlant.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Roundtable:
                imgNote.ImageSource = imageBrush.NoteRoundtable.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Steps:
                imgNote.ImageSource = imageBrush.NoteSteps.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Table:
                imgNote.ImageSource = imageBrush.NoteTable.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Wall:
                imgNote.ImageSource = imageBrush.NoteWall.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Window:
                imgNote.ImageSource = imageBrush.NoteWindow.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Elevator:
                imgNote.ImageSource = imageBrush.NoteElevator.ImageSource;
                break;

            case SeatManage.EnumType.OrnamentType.Stairway:
                imgNote.ImageSource = imageBrush.NoteStairway.ImageSource;
                break;
            }
            return(imgNote);
        }