private void mnConvertToTxt_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { MapFile mapfile = new MapFile(Path.GetFileName(ofd.FileName), SCMFileContentType.unknown); mapfile.ReadFrom(Path.GetDirectoryName(ofd.FileName)); mapfile.ConvertToTxt(Path.ChangeExtension(ofd.FileName, ".txt")); } }