public static void Replace(PwDatabase pd, XmlReplaceOptions opt) { if (pd == null) { Debug.Assert(false); return; } if (opt == null) { Debug.Assert(false); return; } StatusProgressForm dlg = null; try { if ((opt.Flags & XmlReplaceFlags.StatusUI) != XmlReplaceFlags.None) { dlg = StatusProgressForm.ConstructEx(KPRes.XmlReplace, true, false, opt.ParentForm, KPRes.XmlReplace + "..."); } PerformXmlReplace(pd, opt, dlg); } finally { if (dlg != null) { StatusProgressForm.DestroyEx(dlg); } } }
private StatusProgressForm ConstructStatusDialog() { StatusProgressForm dlg = StatusProgressForm.ConstructEx( m_strTitle, false, true, (m_bUseThread ? null : m_fOwner), null); dlg.SetProgress(m_uProgress); MainForm mfOwner = ((m_fOwner != null) ? (m_fOwner as MainForm) : null); if ((m_bUseThread == false) && (mfOwner != null)) { // mfOwner.RedirectActivationPush(dlg); mfOwner.UIBlockInteraction(true); } return(dlg); }