//UI event, user clicks Load //validates the input and loads the chunk, then calls UpdateOutput private async void strip_btnLoad_Click(object sender, EventArgs e) { Range addr; if (!TryValidateInput(out addr)) return; IChunkInfo g; if (this.outmode == DumpTypes.Gfx) { g = new GfxChunkInfo(addr, addr.Length.ToString() + " bytes of data"); //(g as GfxChunkInfo).FormatID = _gfxsettings.Converter; } else if (this.outmode == DumpTypes.Raw) g = new ChunkInfo(addr, addr.Length.ToString() + " bytes of data"); else g = new TextChunkInfo(addr, addr.Length.ToString() + " bytes of data"); await this.LoadChunk(g); //this.CurrentChunk = new DataChunk(g, this.Image); //await this.UpdateOutput(); }
public void UpdateFromChunkInfo(GfxChunkInfo ChunkInfo) { if (ChunkInfo.TileConverter != null) this.SetTileFormat(ChunkInfo.TileConverter); //this.cmbPixelFormats.SelectedValue = ChunkInfo.TileConverter; if (ChunkInfo.TilesPerRow != null) this.SetTilesPerRow((int)ChunkInfo.TilesPerRow); }