/// ----------------------------------------------------------------------------------- /// <summary> /// Change the system keyboard when the selection changes. /// </summary> /// <param name="prootb"></param> /// <param name="vwselNew">Selection</param> /// <remarks>When overriding you should call the base class first.</remarks> /// ----------------------------------------------------------------------------------- public override void SelectionChanged(IVwRootBox prootb, IVwSelection vwselNew) { CheckDisposed(); if (s_fIgnoreSelectionChanges) { return; } try { base.SelectionChanged(prootb, vwselNew); // JohnT: it's remotely possible that the base, in calling commit, made this // selection no longer useable. if (!vwselNew.IsValid || TheMainWnd == null) { return; } TheMainWnd.UpdateStyleComboBoxValue(Callbacks as IRootSite); TheMainWnd.UpdateWritingSystemSelectorForSelection(Callbacks.EditedRootBox); } catch (Exception e) { Debug.WriteLine("Got exception in FwRootSite.HandleSelectionChanged: " + e.Message); } }
/// ----------------------------------------------------------------------------------- /// <summary> /// Activates the view /// </summary> /// ----------------------------------------------------------------------------------- public void ActivateView() { CheckDisposed(); PerformLayout(); Show(); Focus(); if (TheMainWnd != null) { TheMainWnd.InitStyleComboBox(); TheMainWnd.UpdateWritingSystemSelectorForSelection(m_rootb); } }
/// ----------------------------------------------------------------------------------- /// <summary> /// Change the system keyboard when the selection changes. /// </summary> /// <param name="prootb"></param> /// <param name="vwselNew">Selection</param> /// <remarks>When overriding you should call the base class first.</remarks> /// ----------------------------------------------------------------------------------- public override void HandleSelectionChange(IVwRootBox prootb, IVwSelection vwselNew) { CheckDisposed(); if (s_fIgnoreSelectionChanges) { return; } try { base.HandleSelectionChange(prootb, vwselNew); if (TheMainWnd == null) { return; } TheMainWnd.UpdateStyleComboBoxValue(Callbacks as IRootSite); TheMainWnd.UpdateWritingSystemSelectorForSelection(Callbacks.EditedRootBox); } catch (COMException e) { Debug.WriteLine("Got exception in FwRootSite.HandleSelectionChanged: " + e.Message); } }