private void MenuSpriteExtract_Click(object sender, EventArgs e) { using (frmSpriteExtract frm = new frmSpriteExtract(mSprite.Images.Count)) { if (frm.ShowDialog(this) != DialogResult.OK) { return; } string filePath = frm.ExtractPath; int[] frames = frm.GetCheckedFrames(); bool trans = frm.Transparency; frm.Close(); string newDir = filePath; if (frames.Length > 1) // append filename as new dir //newDir = Path.Combine( filePath, Path.GetFileNameWithoutExtension( mSprite.Filepath ) ); // TODO: clean filname; may contain ebil chars { newDir = Path.Combine(filePath, "Sprite_extract"); } Library.SafeIo.CreateFolder(newDir); for (int i = 0; i < frames.Length; i++) { ExtractFrame(newDir, frames[i], trans); } } }
private void MenuSpriteExtract_Click(object sender, EventArgs e) { using (frmSpriteExtract frm = new frmSpriteExtract(mSprite.Images.Count)) { if (frm.ShowDialog(this) != DialogResult.OK) return; string filePath = frm.ExtractPath; int[] frames = frm.GetCheckedFrames(); bool trans = frm.Transparency; frm.Close(); string newDir = filePath; if (frames.Length > 1) { // append filename as new dir //newDir = Path.Combine( filePath, Path.GetFileNameWithoutExtension( mSprite.Filepath ) ); // TODO: clean filname; may contain ebil chars newDir = Path.Combine(filePath, "Sprite_extract"); } Library.SafeIo.CreateFolder(newDir); for (int i = 0; i < frames.Length; i++) ExtractFrame(newDir, frames[i], trans); } }