public void Add(IFurniture furniture)
 {
     if (furniture != null)
     {
         this.furnitures.Add(furniture);
     }
 }
Exemple #2
0
 public void Remove(IFurniture furniture)
 {
     var foundFurniture = this.Find(furniture.Model);
     if (foundFurniture != null)
     {
         this.furnitures.Remove(foundFurniture as Furniture);
     }
 }
Exemple #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);
        }
Exemple #7
0
        public void Add(IFurniture furniture)
        {
            if (furniture == null)
            {
                throw new ArgumentNullException("Threre is no furniture");
            }

            this.catalogList.Add(furniture);
        }
        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);
        }
Exemple #11
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
 }
 public void Add(IFurniture furniture)
 {
     this.furnitures.Add(furniture);
     //this.furnitures.OrderBy();
 }
Exemple #13
0
 public void Remove(IFurniture furniture)
 {
     Validator.ValidateNullObject(furniture, "Furniture to remove cannot be null!");
     this.furnitures.Remove(furniture);
 }
Exemple #14
0
 public void Add(IFurniture furniture)
 {
 }
Exemple #15
0
 public void Remove(IFurniture furniture)
 {
     this.catalog.Remove(furniture);
 }
Exemple #16
0
 public void Add(IFurniture furniture)
 {
     this.catalog.Add(furniture);
 }
Exemple #17
0
 public void Remove(IFurniture furniture)
 {
     // Removing furniture removes the first occurance. If such is not found, nothing happens.
     this.furnitures.Remove(furniture);
 }
Exemple #18
0
 public void Add(IFurniture furniture)
 {
     // Adding duplicate furniture is allowed.
     this.furnitures.Add(furniture);
 }
Exemple #19
0
 public void Remove(IFurniture furniture)
 {
 }
Exemple #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);
     }
 }
Exemple #21
0
 public void Add(IFurniture furniture)
 {
     //TODO: check for null
     this.Furnitures.Add(furniture);
 }
Exemple #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);
        }
Exemple #23
0
 public void Add(IFurniture furniture)
 {
     models.Add(furniture);
 }
Exemple #24
0
 public void Remove(IFurniture furniture)
 {
     furnitureList.Remove(furniture);
 }
Exemple #25
0
 public void Add(IFurniture furniture)
 {
     this.catalog.Add(furniture);
 }
Exemple #26
0
 public void Add(IFurniture furniture)
 {
     this.furnitures.Add(furniture);
     //this.Furnitures = this.Furnitures.OrderBy(x => x.Price).ThenBy(x => x.Model).ToList();
 }
Exemple #27
0
 public void Remove(IFurniture furniture)
 {
     this.catalog.Remove(furniture);
 }
Exemple #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);
 }
Exemple #30
0
 public void Remove(IFurniture furniture)
 {
     this.Furnitures.Remove(furniture);
 }
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add((furniture));
 }
 public void Add(IFurniture furniture) =>
     this.Furnitures.Add(furniture);
Exemple #33
0
 public void Add(IFurniture furniture)
 {
     furnitures.Add(furniture);
 }
 public void Remove(IFurniture furniture)
 {
     this.collectionOfFurnitures.Remove(furniture);
 }
Exemple #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);
 }
Exemple #37
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
     this.Furnitures = this.Furnitures.OrderBy(f => f.Price).ThenBy(f => f.Model).ToList();
 }
Exemple #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;
                }
            }
        }
 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));
 }
Exemple #42
0
 public void Add(IFurniture furniture)
 {
     this.Furnitures.Add(furniture);
     this.Furnitures = this.Furnitures.OrderBy(f => f.Price).ThenBy(f => f.Model).ToList();
 }
Exemple #43
0
 public Sprite GetSprite(IFurniture furniture)
 {
     return(GetSprite(furniture.GetOrientation()));
 }
Exemple #44
0
 public void Remove(IFurniture furniture)
 {
     if (this.initialFurnitures.Contains (furniture))
     {
         this.initialFurnitures.Remove (furniture);
     }
 }
Exemple #45
0
 public void Remove(IFurniture selected)
 {
     throw new NotImplementedException();
 }
Exemple #46
0
 public FurnitureApp(IFurniture f)
 {
     this.f = f;
 }
Exemple #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);
 }
Exemple #49
0
 public void Add(IFurniture furniture)
 {
     furnitureList.Add(furniture);
 }