/// ------------------------------------------------------------------------------------ /// <summary> /// Prepare for and perform the OXES import. /// </summary> /// ------------------------------------------------------------------------------------ protected void ImportXml() { // Prevent creation of unnecessary multiple undo tasks. using (new SuppressSubTasks(m_cache)) { // Display ImportDialog using (ImportXmlDialog importDlg = new ImportXmlDialog(m_cache)) { importDlg.ShowDialog(m_mainWnd); if (importDlg.DialogResult == DialogResult.Cancel) { Logger.WriteEvent("User canceled import XML dialog"); return; } m_sOXESFile = importDlg.FileName; } // Encouraging backup is always a good idea! if (!m_importCallbacks.EncourageBackup()) { Logger.WriteEvent("Import XML canceled in encourage backup dialog"); return; } } DoImport(null, "ImportXml"); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Prepare for and perform the OXES import. /// </summary> /// ------------------------------------------------------------------------------------ protected void ImportXml() { // Prevent creation of unnecessary multiple undo tasks. // Display ImportDialog using (var importDlg = new ImportXmlDialog(m_cache, m_helpTopicProvider)) { importDlg.ShowDialog(m_mainWnd); if (importDlg.DialogResult == DialogResult.Cancel) { Logger.WriteEvent("User canceled import XML dialog"); return; } m_sOXESFile = importDlg.FileName; } DoImport(null, "ImportXml"); }