Exemplo n.º 1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public EctoSalvageHelperViewModel(CommerceUserData userData)
        {
            this.EctoplasmBuyOrder    = new Price();
            this.EctoplasmSellListing = new Price();
            this.Tax = new Price();
            this.SalvageThreshold = new Price();
            this.userData         = userData;

            this.EctoplasmBuyOrder.PropertyChanged    += (o, e) => this.CalculateSalvageThreshold();
            this.EctoplasmSellListing.PropertyChanged += (o, e) => this.CalculateSalvageThreshold();
        }
Exemplo n.º 2
0
        public CommerceMenu(ICommerceViewController viewFactory, CommerceUserData userData)
        {
            logger.Debug("Initializing menu items");
            this.SubMenuItems = new ObservableCollection<IMenuItem>();

            // Build up the sub menu items
            this.SubMenuItems.Add(new MenuItem(Properties.Resources.Configure, () => Commands.OpenCommerceSettingsCommand.Execute(null)));
            this.SubMenuItems.Add(new MenuItem(Properties.Resources.PriceTracker, viewFactory.DisplayPriceTracker, viewFactory.CanDisplayPriceTracker));

            this.SubMenuItems.Add(null); // Null for a seperator
            this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.BuyOrderPriceNotifications, true, () => userData.AreBuyOrderPriceNotificationsEnabled, userData));
            this.SubMenuItems.Add(new CheckableMenuItem(Properties.Resources.SellListingPriceNotifications, true, () => userData.AreSellListingPriceNotificationsEnabled, userData));

            this.SubMenuItems.Add(null); // Null for a seperator
            this.SubMenuItems.Add(new MenuItem(Properties.Resources.TPCalculator, viewFactory.DisplayTPCalculator, viewFactory.CanDisplayTPCalculator));
        }
Exemplo n.º 3
0
        public CommerceController(ICommerceService commerceService, CommerceUserData userData)
        {
            logger.Debug("Initializing Commerce Controller");
            this.commerceService = commerceService;
            this.UserData = userData;
            this.ItemPrices = new ObservableCollection<ItemPriceViewModel>();
            this.PriceNotifications = new ObservableCollection<PriceNotificationViewModel>();

            // Initialize the refresh timer
            this.refreshTimer = new Timer(this.Refresh);
            this.RefreshInterval = 30000; // 30 seconds... really only need to do this once a minute, but twice a minute isn't terrible

            // Initialize the start call count to 0
            this.startCallCount = 0;

            logger.Info("Commerce Controller initialized");
        }
 public CommerceSettingsViewModel(ICommerceViewController viewController, CommerceUserData userData, MonitoredItemsConfigViewModel monitoredItemsConfigViewModel)
 {
     this.UserData = userData;
     this.MonitoredItemsConfigViewModel = monitoredItemsConfigViewModel;
     this.RebuildNamesDatabaseCommand = new DelegateCommand(viewController.DisplayRebuildItemNamesView, viewController.CanDisplayRebuildItemNamesView);
 }
Exemplo n.º 5
0
 public CommerceSettingsViewModel(ICommerceViewController viewController, CommerceUserData userData, MonitoredItemsConfigViewModel monitoredItemsConfigViewModel)
 {
     this.UserData = userData;
     this.MonitoredItemsConfigViewModel = monitoredItemsConfigViewModel;
     this.RebuildNamesDatabaseCommand   = new DelegateCommand(viewController.DisplayRebuildItemNamesView, viewController.CanDisplayRebuildItemNamesView);
 }
        /// <summary>
        /// Default constructor
        /// </summary>
        public EctoSalvageHelperViewModel(CommerceUserData userData)
        {
            this.EctoplasmBuyOrder = new Price();
            this.EctoplasmSellListing = new Price();
            this.Tax = new Price();
            this.SalvageThreshold = new Price();
            this.userData = userData;

            this.EctoplasmBuyOrder.PropertyChanged += (o, e) => this.CalculateSalvageThreshold();
            this.EctoplasmSellListing.PropertyChanged += (o, e) => this.CalculateSalvageThreshold();
        }