Esempio n. 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";
        }
Esempio n. 2
0
 public void Summarize(string filename, PoEStash stash)
 {
     using (var fs = File.Open(filename, FileMode.Create))
     using (var sw = new StreamWriter(fs)) {
         foreach (var tab in stash) {
             WriteTab(sw, tab);
         }
     }
 }
Esempio n. 3
0
 public StashView(PoEStash stash)
 {
     _stash = stash;
 }
Esempio n. 4
0
 public StashReceivedEventArgs(PoEStash stash, string league) {
     _stash = stash;
     _league = league;
 }
Esempio n. 5
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();
 }
Esempio n. 6
0
 private void Render(Graphics g, PoEStash stash, int imageWidth, int imageHeight) {
     g.FillRectangle(_background, 0, 0, imageWidth, imageHeight);
     if (IncludeGrid) {
         RenderGrid(g, stash.Tabs.Count);
     }
     foreach (var tab in stash) {
         RenderTab(g, tab);
     }
 }
Esempio n. 7
0
 public void Summarize(string filename, PoEStash stash) {
     int imageWidth = PoEGame.StashWidth * CellSize * stash.Tabs.Count;
     int imageHeight = PoEGame.StashHeight * CellSize;
     var imageFormat = PickImageFormat(filename);
     
     using (var bitmap = new Bitmap(imageWidth, imageHeight)) {
         using (var g = Graphics.FromImage(bitmap))
             Render(g, stash, imageWidth, imageHeight);
         bitmap.Save(filename, imageFormat);
     }
 }