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"; }
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); } } }
public StashView(PoEStash stash) { _stash = stash; }
public StashReceivedEventArgs(PoEStash stash, string league) { _stash = stash; _league = league; }
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(); }
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); } }
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); } }