/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="EditorialChecksViewWrapper"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="cache">The cache.</param> /// <param name="bookFilter">The book filter.</param> /// <param name="draftViewProxy">View proxy used to create the view.</param> /// <param name="settingsRegKey">The settings reg key.</param> /// <param name="sProjectName">The name of the current project</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// <param name="app">The application (needed to get the product name)</param> /// ------------------------------------------------------------------------------------ public EditorialChecksViewWrapper(Control parent, FdoCache cache, FilteredScrBooks bookFilter, ViewProxy draftViewProxy, RegistryKey settingsRegKey, string sProjectName, IHelpTopicProvider helpTopicProvider, IApp app) : base(parent, cache, draftViewProxy, settingsRegKey) { Name = "EditorialChecks"; m_helpTopicProvider = helpTopicProvider; m_app = app; m_sProjectName = sProjectName; m_bookFilter = bookFilter; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Constructs a KeyTermsViewWrapper /// </summary> /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced /// with real parent later.</param> /// <param name="cache">The Cache to give to the views</param> /// <param name="draftViewProxy">View proxy for creating the draft view to display in /// the lower right corner</param> /// <param name="settingsRegKey">The parent control's ISettings registry key</param> /// <param name="bookFilterInstance">The book filter instance.</param> /// <param name="sProjectName">The name of the current project</param> /// <param name="stylesheet">The stylesheet.</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// ------------------------------------------------------------------------------------ public KeyTermsViewWrapper(Control parent, FdoCache cache, ViewProxy draftViewProxy, RegistryKey settingsRegKey, int bookFilterInstance, string sProjectName, FwStyleSheet stylesheet, IHelpTopicProvider helpTopicProvider) : base(parent, cache, draftViewProxy, settingsRegKey) { m_bookFilterInstance = bookFilterInstance; Name = "KeyTermsViewWrapper"; // Set up the right view m_rightView.Name = "KeyTermsRightView"; m_sProjectName = sProjectName; m_stylesheet = stylesheet; m_helpTopicProvider = helpTopicProvider; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the control at the specified location. /// </summary> /// <param name="group">The group.</param> /// <param name="column">The column index.</param> /// <param name="row">The row index.</param> /// <param name="controlProxy">Client-provided information necessary to create the /// control.</param> /// <param name="fDefaultFocusControl"><c>true</c> if this control will get focus /// if this split grid receives focus.</param> /// <param name="fScrollingContainer"><c>true</c> if this control should control /// scrolling (and display a scroll bar)</param> /// ------------------------------------------------------------------------------------ public void AddControl(IRootSiteGroup group, int row, int column, ViewProxy controlProxy, bool fDefaultFocusControl, bool fScrollingContainer) { CheckBounds(row, column); if (fDefaultFocusControl) { m_CellToActivate = new Point(column, row); } if (row >= m_grid.RowCount) { m_grid.RowCount = row + 1; m_grid.Rows[m_grid.RowCount - 1].Visible = false; m_grid.Rows[m_grid.RowCount - 1].MinimumHeight = DataGridViewControlColumn.kMinimumValue; } DataGridViewControlCell cell = m_grid.Rows[row].Cells[column] as DataGridViewControlCell; Debug.Assert(cell != null); cell.ControlCreateInfo = new ControlCreateInfo(group ?? m_defaultGroup, controlProxy, fScrollingContainer); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the control at the specified location. /// </summary> /// <param name="group">The group.</param> /// <param name="column">The column index.</param> /// <param name="row">The row index.</param> /// <param name="controlProxy">Client-provided information necessary to create the /// control.</param> /// <param name="fDefaultFocusControl"><c>true</c> if this control will get focus /// if this split grid receives focus.</param> /// <param name="fScrollingContainer"><c>true</c> if this control should control /// scrolling (and display a scroll bar)</param> /// ------------------------------------------------------------------------------------ public void AddControl(IRootSiteGroup group, int row, int column, ViewProxy controlProxy, bool fDefaultFocusControl, bool fScrollingContainer) { CheckBounds(row, column); if (fDefaultFocusControl) m_CellToActivate = new Point(column, row); if (row >= m_grid.RowCount) { m_grid.RowCount = row + 1; m_grid.Rows[m_grid.RowCount - 1].Visible = false; m_grid.Rows[m_grid.RowCount - 1].MinimumHeight = DataGridViewControlColumn.kMinimumValue; } DataGridViewControlCell cell = m_grid.Rows[row].Cells[column] as DataGridViewControlCell; Debug.Assert(cell != null); cell.ControlCreateInfo = new ControlCreateInfo(group ?? m_defaultGroup, controlProxy, fScrollingContainer); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the control at the specified location. /// </summary> /// <param name="group">The group.</param> /// <param name="column">The column index.</param> /// <param name="row">The row index.</param> /// <param name="controlProxy">Client-provided information necessary to create the /// control.</param> /// ------------------------------------------------------------------------------------ public void AddControl(IRootSiteGroup group, int row, int column, ViewProxy controlProxy) { AddControl(group, row, column, controlProxy, false, false); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:ControlCreateInfo"/> class. /// </summary> /// <param name="group">The group.</param> /// <param name="viewProxy">The view proxy.</param> /// <param name="fScrollingContainer"><c>true</c> if this control should control /// scrolling (and display a scroll bar)</param> /// ------------------------------------------------------------------------------------ public ControlCreateInfo(IRootSiteGroup group, ViewProxy viewProxy, bool fScrollingContainer) { Group = group; ViewProxy = viewProxy; IsScrollingController = fScrollingContainer; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the control at the specified location. /// </summary> /// <param name="group">The group.</param> /// <param name="column">The column index.</param> /// <param name="row">The row index.</param> /// <param name="controlProxy">Client-provided information necessary to create the /// control.</param> /// ------------------------------------------------------------------------------------ public void AddControl(IRootSiteGroup group, int row, int column, ViewProxy controlProxy) { AddControl(group, row, column, controlProxy, false, false); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:ControlCreateInfo"/> class. /// </summary> /// <param name="group">The group.</param> /// <param name="viewProxy">The view proxy.</param> /// <param name="fScrollingContainer"><c>true</c> if this control should control /// scrolling (and display a scroll bar)</param> /// ------------------------------------------------------------------------------------ public ControlCreateInfo(IRootSiteGroup group, ViewProxy viewProxy, bool fScrollingContainer) { Group = group; ViewProxy = viewProxy; IsScrollingController = fScrollingContainer; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Constructs a ChecksViewWrapper /// </summary> /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced /// with real parent later.</param> /// <param name="cache">The Cache to give to the views</param> /// <param name="draftViewProxy">View proxy for creating the draft view to display in /// the lower right corner</param> /// <param name="settingsRegKey">The parent control's ISettings registry key</param> /// ------------------------------------------------------------------------------------ public ChecksViewWrapper(Control parent, FdoCache cache, ViewProxy draftViewProxy, RegistryKey settingsRegKey) { SuspendLayout(); m_cache = cache; m_scr = m_cache.LangProject.TranslatedScriptureOA; m_mainWnd = parent as FwMainWnd; Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom; Dock = DockStyle.Fill; Name = "ChecksViewWrapper"; Visible = false; // If we have a main window, then ignore the one sent to us and use the main // window's extended settings key. Otherwise use the one sent to us. SettingsKey = settingsRegKey; if (parent != null) Site = parent.Site; // Set up the right view m_rightView = new FwSplitContainer(SettingsKey); m_rightView.Name = "ChecksRightView"; m_rightView.Orientation = Orientation.Horizontal; m_rightView.DesiredFirstPanePercentage = 0.7f; m_rightView.PanelToActivate = m_rightView.Panel1; m_rightView.Panel1Collapsed = false; m_rightView.Panel2Collapsed = false; m_rightView.Tag = draftViewProxy; m_rightView.Dock = DockStyle.Fill; Controls.Add(m_rightView); // Note: setting parent needs to come last Parent = parent; ResumeLayout(); // This should only be null when running tests. if (m_mainWnd != null) m_mainWnd.Mediator.AddColleague(this); }