示例#1
0
        void _stashFetcher_StashReceived(object sender, StashReceivedEventArgs e) {
            _activeStash = e.Stash;
            _leagueStashes[e.League] = e.Stash;
            _recipeTabs = new StashTabCollectionView(_activeStash);
            recSelector.ItemSource = _recipeTabs.Items.ToList();

            lblStatus.Text = "Ready";
        }
示例#2
0
 private void ShowStash(PoEStash stash) {
     tabStash.TabPages.Clear();
     foreach (var tab in stash) {
         tabStash.AddStashTab(tab, new StashGrid(_itemTable, _imageCache));
     }
     _activeStash = stash;
     _recipeTabs = new StashTabCollectionView(_activeStash);
     recSelector.ItemSource = _recipeTabs.Items.ToList();
 }
示例#3
0
        private void removeFromStashToolStripMenuItem_Click(object sender, EventArgs e) {
            if (_activeStash == null) return;
            if (SelectedRecipe == null) return;
            
            _recipeTabs = _recipeTabs.Filter(SelectedRecipe.Items);
            
            foreach (var tabView in _recipeTabs) {
                tabStash.GetStashGridForStashTab(tabView.Tab).TabView = tabView;
            }

            recSelector.ItemSource = _recipeTabs.Items.ToList();
            recSelector.SolveRecipes();
        }
示例#4
0
        private void btnTabs_Click(object sender, EventArgs e) {
            if (_activeStash == null) return;

            var filterForm = new TabFilterForm(_activeStash);
            filterForm.SetCheckedTabs(_recipeTabs.Tabs);

            if (filterForm.ShowDialog() == DialogResult.OK) {
                _recipeTabs = _recipeTabs.WithTabs(filterForm.FilteredTabs);
                recSelector.ItemSource = _recipeTabs.Items.ToList();
                recSelector.SolveRecipes();
            }
        }