Пример #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);
        }
Пример #2
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);
         }));
 }