/// ------------------------------------------------------------------------------------ /// <summary> /// Method to create the Scripture diff view when needed /// </summary> /// <param name="host">The control that will host (or "wrap") the view (can be <c>null</c>)</param> /// ------------------------------------------------------------------------------------ public override Control CreateView(Control host) { DiffView diffView = new DiffView(m_book.Cache, m_book, m_dlg.m_differences, m_fIsRevision, m_dlg.Handle.ToInt32(), m_dlg.App); diffView.Zoom = m_dlg.ZoomFactorDraft.Value; diffView.Name = m_name; m_dlg.RegisterView(diffView); return diffView; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the control based on the create info. /// </summary> /// <param name="sender">The caller.</param> /// <param name="createInfo">The create info previously specified by the client.</param> /// <returns>The newly created control.</returns> /// ------------------------------------------------------------------------------------ Control IControlCreator.Create(object sender, object createInfo) { CheckDisposed(); if (createInfo is DiffViewCreateInfo) { DiffViewCreateInfo info = (DiffViewCreateInfo)createInfo; DiffView diffView = new DiffView(m_cache, info.Book, m_differences, info.IsRevision, Handle.ToInt32()); diffView.Zoom = m_zoomFactorDraft; diffView.Name = info.Name; diffView.Enter += new EventHandler(OnActiveViewChanged); return diffView; } else if (createInfo is DiffFootnoteViewCreateInfo) { DiffFootnoteViewCreateInfo fnInfo = (DiffFootnoteViewCreateInfo)createInfo; DiffFootnoteView fnView = new DiffFootnoteView(m_cache, fnInfo.Book, m_differences, fnInfo.IsRevision, Handle.ToInt32()); fnView.Zoom = m_zoomFactorFootnote; fnView.Name = fnInfo.Name; fnView.Enter += new EventHandler(OnActiveViewChanged); return fnView; } return null; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="LocationTrackerImpl"/> class. /// </summary> /// <param name="diffView">The diff view</param> /// <param name="cache">The cache.</param> /// ------------------------------------------------------------------------------------ public DiffViewLocationTracker(DiffView diffView, FdoCache cache) : base(cache, 0) { m_diffView = diffView; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:LocationTrackerImpl"/> class. /// </summary> /// <param name="diffView">The diff view</param> /// <param name="cache">The cache.</param> /// ------------------------------------------------------------------------------------ public DiffViewLocationTracker(DiffView diffView, FdoCache cache) : base(cache, 0) { m_diffView = diffView; }