public void Init() { CheckDisposed(); if (m_fMainWindowOpened) { m_firstMainWnd = (TestTeMainWnd)m_testTeApp.MainWindows[0]; // reload the styles from the database (test may have inserted new styles!) m_firstMainWnd.Synchronize(new SyncInfo(SyncMsg.ksyncStyle, 0, 0)); // Set the view to the DraftView m_firstMainWnd.SelectScriptureDraftView(); Application.DoEvents(); // insert book tests create filters - turn them off to prevent interaction // between tests m_firstMainWnd.TurnOffAllFilters(); m_firstDraftView = (TestTeDraftView)m_firstMainWnd.TheDraftView; m_firstDraftView.ActivateView(); SelectionHelper helper = m_firstDraftView.SetInsertionPoint(0, 0, 0, 0, true); // helper.IhvoEndPara = -1; helper.SetSelection(m_firstDraftView, true, true); // we don't want to open a transaction! } }
public void Init() { CheckDisposed(); Unpacker.UnPackParatextTestProjects(); m_regData = Unpacker.PrepareRegistryForPTData(); // TeApp derives from FwApp m_testTeApp = new TestTeApp(new string[] { "-c", m_sSvrName, // ComputerName (aka the SQL server) "-proj", m_ProjName, // ProjectName "-db", m_sDbName}); // DatabaseName m_fMainWindowOpened = m_testTeApp.OpenMainWindow(); if (m_fMainWindowOpened) { m_firstMainWnd = (TestTeMainWnd)m_testTeApp.MainWindows[0]; // reload the styles from the database (test may have inserted new styles!) m_firstMainWnd.Synchronize(new SyncInfo(SyncMsg.ksyncStyle, 0, 0)); // Set the view to the DraftView m_firstMainWnd.SelectScriptureDraftView(); Application.DoEvents(); // insert book tests create filters - turn them off to prevent interaction // between tests m_firstMainWnd.TurnOffAllFilters(); m_firstDraftView = (TestTeDraftView)m_firstMainWnd.TheDraftView; m_firstDraftView.ActivateView(); SelectionHelper helper = m_firstDraftView.SetInsertionPoint(0, 0, 0, 0, true); // helper.IhvoEndPara = -1; helper.SetSelection(m_firstDraftView, true, true); // we don't want to open a transaction! } }