void OpenMetricData(Treemap.IMetricValue metric, bool focus)
        {
            if (metric is Treemap.ManagedObjectMetric)
            {
                var m = (Treemap.ManagedObjectMetric)metric;

                if (m_CurrentTableTypeFilter == metric.GetGroupName())
                {
                    var builder = new Database.View.Where.Builder("Index", Database.Operation.Operator.Equal, new Database.Operation.Expression.MetaExpression(metric.GetObjectUID().ToString(), true));

                    var whereStatement = builder.Build(null, null, null, null, null, m_Spreadsheet.DisplayTable, null); //yeah we could add a no param Build() too..
                    var row            = whereStatement.GetFirstMatchIndex(-1);

                    if (row > 0)
                    {
                        m_Spreadsheet.Goto(new Database.CellPosition(row, 0));
                        return;
                    }
                }

                var lr = new Database.LinkRequestTable();
                lr.LinkToOpen           = new Database.TableLink();
                lr.LinkToOpen.TableName = TableName;
                lr.SourceTable          = null;
                lr.SourceColumn         = null;
                lr.SourceRow            = -1;
                lr.Parameters.AddValue(ObjectTable.ObjParamName, m.m_Object.PtrObject);
                lr.Parameters.AddValue(ObjectTable.TypeParamName, m.m_Object.ITypeDescription);
                OpenLinkRequest(lr, focus, metric.GetGroupName());
            }
            else if (metric is Treemap.NativeObjectMetric)
            {
                var m = (Treemap.NativeObjectMetric)metric;

                if (m_CurrentTableTypeFilter == metric.GetGroupName())
                {
                    var builder        = new Database.View.Where.Builder("NativeInstanceId", Database.Operation.Operator.Equal, new Database.Operation.Expression.MetaExpression(m_UIState.snapshotMode.snapshot.nativeObjects.instanceId[m.m_ObjectIndex].ToString(), true));
                    var whereStatement = builder.Build(null, null, null, null, null, m_Spreadsheet.DisplayTable, null); //yeah we could add a no param Build() too..
                    var row            = whereStatement.GetFirstMatchIndex(-1);

                    if (row > 0)
                    {
                        m_Spreadsheet.Goto(new Database.CellPosition(row, 0));
                        return;
                    }
                }
                var lr = new Database.LinkRequestTable();
                lr.LinkToOpen           = new Database.TableLink();
                lr.LinkToOpen.TableName = TableName;
                var instanceId = m_UIState.snapshotMode.snapshot.nativeObjects.instanceId[m.m_ObjectIndex];
                var b          = new Database.View.Where.Builder("NativeInstanceId", Database.Operation.Operator.Equal, new Database.Operation.Expression.MetaExpression(instanceId.ToString(), true));
                lr.LinkToOpen.RowWhere = new System.Collections.Generic.List <Database.View.Where.Builder>();
                lr.LinkToOpen.RowWhere.Add(b);
                lr.SourceTable  = null;
                lr.SourceColumn = null;
                lr.SourceRow    = -1;
                OpenLinkRequest(lr, focus, metric.GetGroupName());
            }
        }
Exemple #2
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();
 }
Exemple #3
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.FormattingOptions, table, this);
     m_Spreadsheet.onClickLink += OnSpreadsheetClick;
     m_Spreadsheet.Goto(pos);
     m_EventListener.OnRepaint();
 }
        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.FormattingOptions, table, this);
            m_Spreadsheet.onClickLink += OnSpreadsheetClick;
            m_Spreadsheet.Goto(pos);
            m_EventListener.OnRepaint();
        }