public ShapeInfo2(ShapeInfo2 anotherInfo) { shapeId = anotherInfo.shapeId; furnitureType = anotherInfo.furnitureType; shapePosition = anotherInfo.shapePosition; shapePositionIds = anotherInfo.shapePositionIds; shapeRotation = anotherInfo.shapeRotation; shapeRotationId = anotherInfo.shapeRotationId; }
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);
public DayBed() { FurnitureType = EFurnitureType.EDayBed; }
public LiftChair() { FurnitureType = EFurnitureType.ELiftChair; }
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; }
public SofaBed(int id, double price, string name, EFurnitureComplexity furnitureComplexity, IMaterialAccesory materialMixBuilder, EFurnitureType furnitureType) : base(id, price, name, furnitureComplexity, materialMixBuilder) { FurnitureType = furnitureType; }
public Chesterfield() { FurnitureType = EFurnitureType.EChesterField; }
public TelevisionSet() { FurnitureType = EFurnitureType.ETelevisionSet; }
public DiningTable() { FurnitureType = EFurnitureType.EDiningTable; }
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; } }
public Bench() { FurnitureType = EFurnitureType.EBench; }
public CoffeTable() { FurnitureType = EFurnitureType.ECoffeTable; }
public Couch() { FurnitureType = EFurnitureType.ECouch; }
public Chair() { FurnitureType = EFurnitureType.EChair; }
public BarChair() { FurnitureType = EFurnitureType.EBarChair; }
public Bed() { FurnitureType = EFurnitureType.EBed; }
public BiliardTable() { FurnitureType = EFurnitureType.EBiliardTable; }
public SofaBed() { FurnitureType = EFurnitureType.ESofaBed; }
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); }