Esempio n. 1
0
        public StashViewModel(StashView stashView)
        {
            this.stashView                         = stashView;
            categoryFilter                         = new List <IFilter>();
            AvailableCategories                    = CategoryManager.GetAvailableCategories();
            tabsAndContent                         = new List <WhatsInTheBox>();
            stashView.Loaded                      += new System.Windows.RoutedEventHandler(stashView_Loaded);
            GetTabs                                = new DelegateCommand(GetTabList);
            ApplicationState.LeagueChanged        += new PropertyChangedEventHandler(ApplicationState_LeagueChanged);
            stashView.tabControl.SelectionChanged += new SelectionChangedEventHandler(tabControl_SelectionChanged);
            getAvailableItems();
            expressionDark = Application.LoadComponent(new Uri("/Procurement;component/Controls/ExpressionDark.xaml", UriKind.RelativeOrAbsolute)) as ResourceDictionary;

            configuredOrbType = OrbType.Chaos;
            string currencyDistributionMetric = Settings.UserSettings["CurrencyDistributionMetric"];

            if (currencyDistributionMetric.ToLower() == "count")
            {
                currencyDistributionUsesCount = true;
            }
            else
            {
                configuredOrbType = (OrbType)Enum.Parse(typeof(OrbType), currencyDistributionMetric);
            }
        }
Esempio n. 2
0
 public void ReloadStash()
 {
     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                                new Action(() =>
     {
         screens[STASH_VIEW] = new StashView();
         SelectedView        = screens[STASH_VIEW] as UserControl;
         ButtonsVisible      = true;
     }));
 }
Esempio n. 3
0
 public void LoadView(IView view)
 {
     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                                new Action(() =>
     {
         mainView.MainRegion.Children.Clear();
         if (view is StashView)
         {
             screens[STASH_VIEW] = new StashView();
         }
         mainView.MainRegion.Children.Add(view as UserControl);
     }));
 }
Esempio n. 4
0
        public StashViewModel(StashView stashView)
        {
            this.stashView = stashView;

            categoryFilter      = new List <IFilter>();
            AvailableCategories = CategoryManager.GetAvailableCategories();
            tabsAndContent      = new List <TabContent>();
            stashView.Loaded   += new RoutedEventHandler(stashView_Loaded);

            ApplicationState.LeagueChanged        += new PropertyChangedEventHandler(ApplicationState_LeagueChanged);
            stashView.tabControl.SelectionChanged += new SelectionChangedEventHandler(tabControl_SelectionChanged);
            getAvailableItems();
            expressionDark = Application.LoadComponent(new Uri("/Procurement;component/Controls/ExpressionDark.xaml", UriKind.RelativeOrAbsolute)) as ResourceDictionary;

            configuredOrbType = OrbType.Chaos;
            string currencyDistributionMetric = Settings.UserSettings["CurrencyDistributionMetric"];

            if (currencyDistributionMetric.ToLower() == "count")
            {
                currencyDistributionUsesCount = true;
            }
            else
            {
                configuredOrbType = (OrbType)Enum.Parse(typeof(OrbType), currencyDistributionMetric);
            }

            if (Settings.UserSettings.Keys.Contains(_enableTabRefreshOnLocationChangedConfigName))
            {
                var enabled = false;
                if (bool.TryParse(Settings.UserSettings[_enableTabRefreshOnLocationChangedConfigName], out enabled) &&
                    enabled)
                {
                    ClientLogFileWatcher.ClientLogFileChanged -= OnClientLogFileChanged;
                    ClientLogFileWatcher.ClientLogFileChanged += OnClientLogFileChanged;
                }
            }
        }