Ejemplo n.º 1
0
 void OpenTable(Database.TableReference tableRef, Database.Table table, Database.CellPosition pos, bool focus)
 {
     m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.FormattingOptions, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_Spreadsheet.Goto(pos);
     m_EventListener.OnRepaint();
 }
Ejemplo n.º 2
0
        void OnSpreadsheetClick(UI.DatabaseSpreadsheet sheet, Database.LinkRequest link, Database.CellPosition pos)
        {
            var hEvent = new History(this, m_UIState.CurrentMode, sheet.DisplayTable.GetLinkTo(pos));

            m_UIState.history.AddEvent(hEvent);
            m_EventListener.OnOpenLink(link);
        }
Ejemplo n.º 3
0
 public void OpenTable(Database.TableReference tableRef, Database.Table table)
 {
     CloseCurrentTable();
     m_CurrentTableLink         = tableRef;
     CurrentTableIndex          = m_UIState.CurrentMode.GetTableIndex(table);
     m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.FormattingOptions, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_EventListener.OnRepaint();
 }
Ejemplo n.º 4
0
 public void OpenTable(Database.TableReference tableRef, Database.Table table, Database.CellPosition pos)
 {
     CloseCurrentTable();
     m_CurrentTableLink         = tableRef;
     CurrentTableIndex          = m_UIState.CurrentMode.GetTableIndex(table);
     m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.DataRenderer, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_Spreadsheet.Goto(pos);
     m_EventListener.OnRepaint();
 }
Ejemplo n.º 5
0
 public void OpenTable(Database.TableReference tableRef, Database.Table table)
 {
     Profiling.StartProfiling("Profile_OpenTable_" + table.GetName());
     CloseCurrentTable();
     m_CurrentTableLink         = tableRef;
     CurrentTableIndex          = m_UIState.CurrentMode.GetTableIndex(table);
     m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.DataRenderer, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_EventListener.OnRepaint();
 }
        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;
        }
Ejemplo n.º 7
0
        public void OpenTable(Database.TableReference tableRef, Database.Table table, bool focus, bool select)
        {
            if (select)
            {
                var objectUID = GetTableObjectUID(table, 0);
                if (objectUID >= 0)
                {
                    SelectObjectByUID(objectUID, focus);
                }
            }

            //m_CurrentTableIndex = m_UIState.GetTableIndex(table);
            m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.FormattingOptions, table, this);
            m_Spreadsheet.onClickLink += OnSpreadsheetClick;
            m_EventListener.OnRepaint();
        }
Ejemplo n.º 8
0
        public void OpenTable(Database.TableReference tableRef, Database.Table table, Database.CellPosition pos, bool focus, bool select)
        {
            if (select)
            {
                var objectUID = GetTableObjectUID(table, pos.row);
                if (objectUID >= 0)
                {
                    SelectObjectByUID(objectUID, focus);
                }
            }

            //m_CurrentTableIndex = m_UIState.GetTableIndex(table);
            m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.DataRenderer, table, this);
            m_Spreadsheet.onClickLink += OnSpreadsheetClick;
            m_Spreadsheet.Goto(pos);
            m_EventListener.OnRepaint();
        }
        void OnSpreadsheetClick(UI.DatabaseSpreadsheet sheet, Database.LinkRequest link, Database.CellPosition pos)
        {
            //add current event in history

            m_UIState.AddHistoryEvent(GetCurrentHistoryEvent());
            var tableLinkRequest = link as Database.LinkRequestTable;
            if (tableLinkRequest != null)
            {
                if (tableLinkRequest.LinkToOpen.TableName == ObjectTable.TableName)
                {
                    //open object link in the same pane
                    OpenLinkRequest(tableLinkRequest, true);
                    return;
                }
            }
            else
                Debug.LogWarning("Cannot open unknown link '" + link.ToString() + "'");

            //open the link in the spreadsheet pane
            m_EventListener.OnOpenLink(link, m_ActiveMode);
        }
Ejemplo n.º 10
0
 public override void OnClose()
 {
     m_TreeMap.CleanupMeshes();
     m_TreeMap     = null;
     m_Spreadsheet = null;
 }
Ejemplo n.º 11
0
 void OpenTable(Database.TableReference tableRef, Database.Table table, bool focus)
 {
     m_Spreadsheet              = new UI.DatabaseSpreadsheet(m_UIState.DataRenderer, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_EventListener.OnRepaint();
 }
Ejemplo n.º 12
0
 public override void OnClose()
 {
     MemoryProfilerAnalytics.SendPendingFilterChanges();
     CloseCurrentTable();
     m_Spreadsheet = null;
 }