/// <summary> /// Adds a new price watch /// </summary> private void AddPriceWatch() { var priceWatch = new PriceWatch(); var priceWatchVm = new PriceWatchViewModel(priceWatch, null, this.controller, this.commerceService); this.controller.UserSettings.PriceWatches.Add(priceWatch); this.PriceWatches.Add(priceWatchVm); }
/// <summary> /// Default constructor /// </summary> /// <param name="itemPriceWatch">The item's price watch information</param> /// <param name="notificationType">The notification type</param> /// <param name="price">The current price of the item, in copper</param> public PriceNotificationViewModel(PriceWatchViewModel itemPriceWatch, PriceNotificationType notificationType, int price, ICollection <PriceNotificationViewModel> displayedNotificationsCollection) { this.itemPriceWatch = itemPriceWatch; this.notificationType = notificationType; this.price = new Price(); this.price.Value = price; this.isRemovingNotification = false; this.displayedNotifications = displayedNotificationsCollection; }