private void tsmiEditMetaHeader_Click(object sender, EventArgs e) { String metaPath = null; if (!tbMetaPath.Text.Contains("\\")) { //File not selected openFileDialog.Title = "选择信息头XML文件"; openFileDialog.FileName = ""; openFileDialog.Filter = "信息头XML文件 (*.mxml)|*.mxml"; if (openFileDialog.ShowDialog() == DialogResult.OK) { metaPath = openFileDialog.FileName; } } else { metaPath = tbMetaPath.Text; } NewMetaHeader mmh = new NewMetaHeader(metaPath, NewMetaHeader.OPType.Modify); mmh.ShowDialog(); }
private void tsmiNewMetaHeader_Click(object sender, EventArgs e) { saveFileDialog.Title = "保存信息头XML文件"; saveFileDialog.AddExtension = true; saveFileDialog.AutoUpgradeEnabled = true; saveFileDialog.Filter = "Meta Header Data File (*.mxml)|*.mxml"; if (saveFileDialog.ShowDialog() == DialogResult.OK) { String MetaHeaderXMLFile = saveFileDialog.FileName; NewMetaHeader nmh = new NewMetaHeader(MetaHeaderXMLFile, NewMetaHeader.OPType.New); nmh.ShowDialog(); } }