private void copy_Click(object sender, EventArgs e) { PortraitViewer pv = getPVParent(); if (pv != null) { Bitmap bmp = pv.GetTexInfoFor(this).tex0.GetImage(0); Clipboard.SetImage(bmp); } }
private void export_Click(object sender, EventArgs e) { PortraitViewer pv = getPVParent(); if (pv == null) { return; } using (SaveFileDialog SaveDialog = new SaveFileDialog()) { SaveDialog.Filter = FileFilters.TEX0; SaveDialog.FilterIndex = 1; if (SaveDialog.ShowDialog() == DialogResult.OK) { int fIndex = SaveDialog.FilterIndex; //Fix extension string fileName = ApplyExtension(SaveDialog.FileName, SaveDialog.Filter, fIndex - 1); pv.GetTexInfoFor(this).tex0.Export(fileName); } } }