private void BrowseXmlPathButton_Click(object sender, EventArgs e) { OpenXmlFileDialog.FileName = XmlPathTextBox.Text; if (OpenXmlFileDialog.ShowDialog() == DialogResult.OK) { XmlPathTextBox.Text = OpenXmlFileDialog.FileName; } }
public void OpenDocumentWithSchema(string file, string schema) { if (string.IsNullOrEmpty(file) || string.IsNullOrEmpty(schema)) { OpenXmlFileDialog dlg = new OpenXmlFileDialog(file, schema); if (dlg.ShowDialog() != DialogResult.OK) { return; } newXmlEditControl.LoadFile(dlg.XmlFile, dlg.SchemaFile); } else if (File.Exists(file)) { newXmlEditControl.LoadFile(file, schema); m_schemafile = schema; } }