Example #1
0
 public ShapeInfo2(ShapeInfo2 anotherInfo)
 {
     shapeId          = anotherInfo.shapeId;
     furnitureType    = anotherInfo.furnitureType;
     shapePosition    = anotherInfo.shapePosition;
     shapePositionIds = anotherInfo.shapePositionIds;
     shapeRotation    = anotherInfo.shapeRotation;
     shapeRotationId  = anotherInfo.shapeRotationId;
 }
Example #2
0
        private void AddFurnitureToCanvas(EFurnitureType FurType)
        {
            string path = "img/";
            int    left = 0, top = 0;

            GetFurnitureLocations(FurType, out left, out top, out path);
            path = System.IO.Path.GetFullPath(path);
            BitmapImage bit = new BitmapImage(new Uri(path));
            Image       im  = new Image();

            im.Source = bit;
            HouseCanvas.Children.Add(im);
            Canvas.SetLeft(im, left);
            Canvas.SetTop(im, top);
        }
 public override Furniture1 GetFurniture(double price, string name, EFurnitureComplexity furnitureComplexity, IMaterialAccesory materialMixBuilder, EFurnitureType furnitureType)
 => new LiftChair(LastId++, price, name, furnitureComplexity, materialMixBuilder, EFurnitureType.EBarChair);
Example #4
0
 public DayBed()
 {
     FurnitureType = EFurnitureType.EDayBed;
 }
Example #5
0
 public LiftChair()
 {
     FurnitureType = EFurnitureType.ELiftChair;
 }
Example #6
0
 public abstract Furniture1 GetFurniture(double price, string Name, EFurnitureComplexity furnitureComplexity, IMaterialAccesory materialMixBuilder, EFurnitureType furnitureType);
 public PieceOfFurniture(int price, EFurnitureType type)
 {
     this.price = price;
     this.type  = type;
 }
Example #8
0
 public SofaBed(int id, double price, string name, EFurnitureComplexity furnitureComplexity, IMaterialAccesory materialMixBuilder, EFurnitureType furnitureType) :
     base(id, price, name, furnitureComplexity, materialMixBuilder)
 {
     FurnitureType = furnitureType;
 }
Example #9
0
 public Chesterfield()
 {
     FurnitureType = EFurnitureType.EChesterField;
 }
Example #10
0
 public TelevisionSet()
 {
     FurnitureType = EFurnitureType.ETelevisionSet;
 }
Example #11
0
 public DiningTable()
 {
     FurnitureType = EFurnitureType.EDiningTable;
 }
Example #12
0
        private void GetFurnitureLocations(EFurnitureType FurType, out int left, out int top, out String path)
        {
            path = "img/";
            left = 0; top = 0;
            switch (FurType)
            {
            case EFurnitureType.Bathroom:
                path += "moso.png";
                left  = 0;
                top   = 0;
                break;

            case EFurnitureType.Bicycle:
                path += "bike.png";
                left  = 0;
                top   = 402;
                break;

            case EFurnitureType.Fridge:
                path += "huto.png";
                left  = 737;
                top   = 286;
                break;

            case EFurnitureType.Kitchen:
                path += "kitchen.png";
                left  = 427;
                top   = 286;
                break;

            case EFurnitureType.Livingroom:
                path += "szobawithoutradio.png";
                left  = 300;
                top   = 0;
                break;

            case EFurnitureType.Radio:
                path += "radio.png";
                left  = 634;
                top   = 0;
                break;

            case EFurnitureType.TableTennis:
                path += "pptable.png";
                left  = 164;
                top   = 286;
                break;

            case EFurnitureType.Television:
                path += "tvset.png";
                left  = 757;
                top   = 0;
                break;

            case EFurnitureType.VacuumCleaner:
                path += "vacuum.png";
                left  = 0;
                top   = 286;
                break;
            }
        }
Example #13
0
 public Bench()
 {
     FurnitureType = EFurnitureType.EBench;
 }
 public CoffeTable()
 {
     FurnitureType = EFurnitureType.ECoffeTable;
 }
Example #15
0
 public Couch()
 {
     FurnitureType = EFurnitureType.ECouch;
 }
Example #16
0
 public Chair()
 {
     FurnitureType = EFurnitureType.EChair;
 }
Example #17
0
 public BarChair()
 {
     FurnitureType = EFurnitureType.EBarChair;
 }
Example #18
0
 public Bed()
 {
     FurnitureType = EFurnitureType.EBed;
 }
Example #19
0
 public BiliardTable()
 {
     FurnitureType = EFurnitureType.EBiliardTable;
 }
Example #20
0
 public SofaBed()
 {
     FurnitureType = EFurnitureType.ESofaBed;
 }
Example #21
0
        public int OrderFurniture(double price, string name, EFurnitureComplexity furnitureComplexity, IMaterialAccesory materialMixBuilder, EFurnitureType furnitureType)
        {
            Furniture1       furniture;
            FurnitureFactory furnitureFactory;

            switch (furnitureType)
            {
            case EFurnitureType.EBarChair:
            {
                furnitureFactory = new BarChairFactory();
                break;
            }

            case EFurnitureType.EBed:
            {
                furnitureFactory = new BedFactory();
                break;
            }

            case EFurnitureType.EBench:
            {
                furnitureFactory = new BenchFactory();
                break;
            }

            case EFurnitureType.EBiliardTable:
            {
                furnitureFactory = new BiliardTableFactory();
                break;
            }

            case EFurnitureType.EChair:
            {
                furnitureFactory = new ChairFactory();
                break;
            }

            case EFurnitureType.EChesterField:
            {
                furnitureFactory = new ChesterFieldFactory();
                break;
            }

            case EFurnitureType.ECoffeTable:
            {
                furnitureFactory = new CoffeTableFactory();
                break;
            }

            case EFurnitureType.ECouch:
            {
                furnitureFactory = new Couchfactory();
                break;
            }

            case EFurnitureType.EDayBed:
            {
                furnitureFactory = new DayBedFactory();
                break;
            }

            case EFurnitureType.EDiningTable:
            {
                furnitureFactory = new DiningTableFactory();
                break;
            }

            case EFurnitureType.ELiftChair:
            {
                furnitureFactory = new LiftChairFactory();
                break;
            }

            case EFurnitureType.ESofaBed:
            {
                furnitureFactory = new SofaBedFactory();
                break;
            }

            case EFurnitureType.ETelevisionSet:
            {
                furnitureFactory = new TelevisionSetFactory();
                break;
            }

            default:
            {
                Console.WriteLine("Unknown furniture type!");
                return(0);
            }
            }
            furniture = furnitureFactory.GetFurniture(price, name, furnitureComplexity, materialMixBuilder, furnitureType);
            OrderedFurniture.Add(furniture.Id, furniture);
            return(furniture.Id);
        }