private void m_btnBackup_Click(object sender, EventArgs e) { DIFwBackupDb backupSystem = FwBackupClass.Create(); backupSystem.Init(FwApp.App, Handle.ToInt32()); int nBkResult; nBkResult = backupSystem.UserConfigure(FwApp.App, false); backupSystem.Close(); }
private void m_btnBackup_Click(object sender, EventArgs e) { if (m_app != null && m_app is IBackupDelegates && m_app is IHelpTopicProvider) { DIFwBackupDb backupSystem = FwBackupClass.Create(); backupSystem.Init(m_app as IBackupDelegates, Handle.ToInt32()); int nBkResult; nBkResult = backupSystem.UserConfigure(m_app, false); backupSystem.Close(); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Handle the File/Backup and Restore menu command /// </summary> /// <param name="arg"></param> /// <returns></returns> /// ------------------------------------------------------------------------------------ protected bool OnFileBackupRestore(object arg) { List<IFwMainWnd> wnds = FwApp.App.MainWindows; try { foreach (IFwMainWnd wnd in wnds) wnd.EnableWindow(false); CreateBackupDirectory(); m_backupSystem = FwBackupClass.Create(); m_backupSystem.Init(FwApp.App, Handle.ToInt32()); m_backupSystem.UserConfigure(FwApp.App, false); m_backupSystem.Close(); } finally { m_backupSystem = null; foreach (IFwMainWnd wnd in wnds) wnd.EnableWindow(true); } if (m_fCloseAfterBackupRestore) OnFileClose(null); return true; }