public void Add(IFurniture furniture)
 {
     if (furniture != null)
     {
         this.furnitures.Add(furniture);
     }
 }
Esempio n. 2
0
 public void Remove(IFurniture furniture)
 {
     var foundFurniture = this.Find(furniture.Model);
     if (foundFurniture != null)
     {
         this.furnitures.Remove(foundFurniture as Furniture);
     }
 }
Esempio n. 3
0
 public void Remove(IFurniture furniture)
 {
     if (this.Furnitures.Count > 0)
     {
         IFurniture firstFurniture = this.Furnitures.FirstOrDefault(f => f.Model == furniture.Model);
         this.Furnitures.Remove(firstFurniture);
     }
 }
        public void Remove(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Cannot remove null from furnitures.");
            }

            this.furnitures.Remove(furniture);
        }
        public void Add(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Cannot add null to furnitures.");
            }

            this.furnitures.Add(furniture);
        }
        public void Add(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Furniture cannot be null");
            }

            this.Furnitures.Add(furniture);
        }
Esempio n. 7
0
        public void Add(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Threre is no furniture");
            }

            this.catalogList.Add(furniture);
        }
Esempio n. 8
0
        public void Remove(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Furniture cannot be null");
            }

            this.furnitures.Remove(furniture);
        }
 public void Remove(IFurniture furniture) =>
     this.Furnitures.Remove(furniture);
        public void UpdateUI(IFurniture furniture, FurnitureTypes furnitureType)
        {
            Image img = new Image();

            img.Width      = furniture.Width;
            img.Height     = furniture.Height;
            img.Visibility = Visibility.Visible;
            img.Margin     = new Thickness(furniture.X, furniture.Y, 0, 0);
            //img.Stretch = Stretch.Fill;
            img.Stretch = Stretch.Fill;

            furniture.Img = img;


            objects = room.GetFurniture();

            switch (furnitureType)
            {
            case FurnitureTypes.Bed:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Bed2.png"));
                break;

            case FurnitureTypes.Bed2:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Bed2.png"));
                break;

            case FurnitureTypes.BookShelf:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\BookShelf.png"));
                break;

            case FurnitureTypes.Couch:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Couch.png"));
                break;

            case FurnitureTypes.DeskChair:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\DeskChair.png"));
                break;

            case FurnitureTypes.Dresser:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Dresser.png"));
                break;

            case FurnitureTypes.Recliner:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Recliner.png"));
                break;

            case FurnitureTypes.Rug:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Rug.png"));
                break;

            case FurnitureTypes.Sofa:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Sofa.png"));
                break;

            case FurnitureTypes.Stove:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Stove.png"));
                break;

            case FurnitureTypes.Table:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\Table.png"));
                break;

            case FurnitureTypes.TVStand:
                img.Source = new BitmapImage(new Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Images\TVStand.png"));
                break;
            }
            this.Grid.Children.Add(furniture.Img);
        }
Esempio n. 11
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
 }
Esempio n. 12
0
 public void Add(IFurniture furniture)
 {
     this.furnitures.Add(furniture);
     //this.furnitures.OrderBy();
 }
Esempio n. 13
0
 public void Remove(IFurniture furniture)
 {
     Validator.ValidateNullObject(furniture, "Furniture to remove cannot be null!");
     this.furnitures.Remove(furniture);
 }
Esempio n. 14
0
 public void Add(IFurniture furniture)
 {
 }
Esempio n. 15
0
 public void Remove(IFurniture furniture)
 {
     this.catalog.Remove(furniture);
 }
Esempio n. 16
0
 public void Add(IFurniture furniture)
 {
     this.catalog.Add(furniture);
 }
Esempio n. 17
0
 public void Remove(IFurniture furniture)
 {
     // Removing furniture removes the first occurance. If such is not found, nothing happens.
     this.furnitures.Remove(furniture);
 }
Esempio n. 18
0
 public void Add(IFurniture furniture)
 {
     // Adding duplicate furniture is allowed.
     this.furnitures.Add(furniture);
 }
Esempio n. 19
0
 public void Remove(IFurniture furniture)
 {
 }
Esempio n. 20
0
 public void Remove(IFurniture furniture)
 {
     if (_furnitures.Any(
         x => x.Model == furniture.Model
              && x.Price == furniture.Price
              && x.Material == furniture.Material
              && x.Height == furniture.Height
         ))
     {
         _furnitures.Remove(furniture);
     }
 }
Esempio n. 21
0
 public void Add(IFurniture furniture)
 {
     //TODO: check for null
     this.Furnitures.Add(furniture);
 }
Esempio n. 22
0
        public void Add(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentOutOfRangeException("Furnite value cannot be null! Cannot add furniture with null value!");
            }

            this.furnitures.Add(furniture);
        }
Esempio n. 23
0
 public void Add(IFurniture furniture)
 {
     models.Add(furniture);
 }
Esempio n. 24
0
 public void Remove(IFurniture furniture)
 {
     furnitureList.Remove(furniture);
 }
Esempio n. 25
0
 public void Add(IFurniture furniture)
 {
     this.catalog.Add(furniture);
 }
Esempio n. 26
0
 public void Add(IFurniture furniture)
 {
     this.furnitures.Add(furniture);
     //this.Furnitures = this.Furnitures.OrderBy(x => x.Price).ThenBy(x => x.Model).ToList();
 }
Esempio n. 27
0
 public void Remove(IFurniture furniture)
 {
     this.catalog.Remove(furniture);
 }
Esempio n. 28
0
 public void PlaceFurniture(IFurniture furniture)
 {
     return;
 }
 public void AddFurniture(IFurniture furniture)
 {
     Guard.WhenArgument(furniture, furniture.GetType().Name).IsNull().Throw();
     this.furniture.Add(furniture.Model, furniture);
 }
Esempio n. 30
0
 public void Remove(IFurniture furniture)
 {
     this.Furnitures.Remove(furniture);
 }
Esempio n. 31
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add((furniture));
 }
 public void Add(IFurniture furniture) =>
     this.Furnitures.Add(furniture);
Esempio n. 33
0
 public void Add(IFurniture furniture)
 {
     furnitures.Add(furniture);
 }
Esempio n. 34
0
 public void Remove(IFurniture furniture)
 {
     this.collectionOfFurnitures.Remove(furniture);
 }
Esempio n. 35
0
        public void Add(IFurniture furniture)
        {
            this.furnitures.Add(furniture);

            var sortedFurnitures = this.Furnitures
                .OrderBy(x => x.Price)
                .ThenBy(x => x.Model)
                .ToList();

            this.furnitures = sortedFurnitures;
        }
 public Clients(IFurniture furniture, string segment)
 {
     chair = furniture.CreateChair(segment);
     table = furniture.CreateTable(segment);
     sofa  = furniture.CreateSofa(segment);
 }
Esempio n. 37
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
     this.Furnitures = this.Furnitures.OrderBy(f => f.Price).ThenBy(f => f.Model).ToList();
 }
Esempio n. 38
0
        public void Remove(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentOutOfRangeException("Furnite value cannot be null! Cannot remove furniture with null value!");
            }

            foreach (var furn in this.Furnitures)
            {
                if (ReferenceEquals(furn, furniture))
                {
                    this.furnitures.Remove(furn);
                    break;
                }
            }
        }
Esempio n. 39
0
 public void Remove(IFurniture furniture)
 {
     if (this.furnitures.Contains(furniture))
     {
         this.furnitures.Remove(furniture);
     }
        // var item = this.furnitures.FirstOrDefault(x => x.Material == furniture.Material && x.Model == furniture.Model && x.Price == furniture.Price);
 }
 public void Remove(IFurniture furniture)
 {
     this.furnitures.Remove(furniture);
 }
 protected override string Execute(ICompany company, IFurniture furniture)
 {
     company.Add(furniture);
     return(string.Format(Messages.FurnitureAddedSuccessMessage, furniture.Model, company.Name));
 }
Esempio n. 42
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
     this.Furnitures = this.Furnitures.OrderBy(f => f.Price).ThenBy(f => f.Model).ToList();
 }
Esempio n. 43
0
 public Sprite GetSprite(IFurniture furniture)
 {
     return(GetSprite(furniture.GetOrientation()));
 }
Esempio n. 44
0
 public void Remove(IFurniture furniture)
 {
     if (this.initialFurnitures.Contains (furniture))
     {
         this.initialFurnitures.Remove (furniture);
     }
 }
Esempio n. 45
0
 public void Remove(IFurniture selected)
 {
     throw new NotImplementedException();
 }
Esempio n. 46
0
 public FurnitureApp(IFurniture f)
 {
     this.f = f;
 }
Esempio n. 47
0
 public void Add(IFurniture furniture)
 {
     Validator.ValidateNullObject(furniture, "Furniture to add cannot be null!");
     this.furnitures.Add(furniture);
 }
 public void Add(IFurniture furniture)
 {
     this.furnitures.Add(furniture);
 }
Esempio n. 49
0
 public void Add(IFurniture furniture)
 {
     furnitureList.Add(furniture);
 }