public override void OnClose()
        {
            m_MemoryMap.Dispose();
            m_MemoryMap = null;
            m_Spreadsheet = null;
            m_ActiveMode = null;

            if (m_ToolbarExtensionMode != null)
                m_ToolbarExtensionMode.ViewPaneChanged -= OnViewPaneChanged;
            m_ToolbarExtensionMode = null;
        }
Пример #2
0
        void OnModeChanged(UIState.BaseMode newMode, UIState.ViewMode newViewMode)
        {
            if (m_ToolbarExtensionMode != null)
            {
                m_ToolbarExtensionMode.ViewPaneChanged -= OnViewPaneChanged;
                m_ToolbarExtensionMode = null;
            }

            if (newMode != null)
            {
                newMode.ViewPaneChanged += OnViewPaneChanged;
                m_ToolbarExtensionMode   = newMode;
            }

            OnViewPaneChanged(newMode.CurrentViewPane);
        }
Пример #3
0
 public void TransitMode(UIState.BaseMode newMode)
 {
     if (newMode == diffMode)
     {
         CurrentViewMode = ViewMode.ShowDiff;
     }
     else if (newMode == FirstMode)
     {
         CurrentViewMode = ViewMode.ShowFirst;
     }
     else if (newMode == SecondMode)
     {
         CurrentViewMode = ViewMode.ShowSecond;
     }
     else
     {
         FirstMode       = newMode;
         CurrentViewMode = ViewMode.ShowFirst;
         ModeChanged(newMode, CurrentViewMode);
     }
 }
Пример #4
0
 public History(SpreadsheetPane spreadsheetPane, UIState.BaseMode mode, Database.CellLink cell)
 {
     Mode               = mode;
     m_Table            = spreadsheetPane.m_CurrentTableLink;
     m_SpreadsheetState = spreadsheetPane.m_Spreadsheet.CurrentState;
 }