private void MakeColumnHeading(string aTitle, TAlignment aAlignment, TSortType aSortType) { if (iSortType != aSortType) { string toolTipBody = "Sort by "; // switch (aSortType) { default: case TSortType.ESortTypeByAddress: toolTipBody += "address"; break; case TSortType.ESortTypeByType: toolTipBody += "type"; break; case TSortType.ESortTypeByLength: toolTipBody += "length"; break; } // string url = PageFileName(aSortType); string linkWithToolTip = HeapToHTMLPageJavaScriptManager.MakeToolTipLink("Sorting", toolTipBody, url, string.Empty, aTitle); // WriteTableColumnBegin(aAlignment, "tableHeaders"); WriteLine(linkWithToolTip); WriteTableColumnEnd(); } else { WriteTableColumn(aTitle, aAlignment, "tableHeaderSelected"); } }
private void OnStateBody() { const int KDWordsPerLine = 4; int rawItemsCount = iCell.RawItems.Count; for (int i = 0; i < rawItemsCount; i += KDWordsPerLine) { RawItem rawItem = iCell[i]; // Start new row WriteTableRowBegin(); // Address WriteTableColumnBegin(); WriteAnchorWithName(rawItem.Address.ToString("x8")); Writer.Write("0x" + rawItem.Address.ToString("x8")); WriteTableColumnEnd(); // Blank spacer WriteTableColumnBegin(TAlignment.EAlignNone, string.Empty, 20); WriteSpace(); WriteTableColumnEnd(); // Work out how many items on this line int runIndex; int runExtent = i + KDWordsPerLine; // First set of columns - original data for (runIndex = i; runIndex < runExtent; runIndex++) { // Get the item if (runIndex < rawItemsCount) { rawItem = iCell[runIndex]; // Does the raw item have a linked cell associated with it? if (rawItem.Tag != null && rawItem.Tag is Relationships.RelationshipInfo) { Relationships.RelationshipInfo relationshipInfo = (Relationships.RelationshipInfo)rawItem.Tag; HeapCell associatedCell = relationshipInfo.ToCell; string url = "javascript:showMainFormCell(\'" + associatedCell.Address.ToString("x8") + "\')"; string windowTarget = "MainWindow"; string toolTipTitle = "Link to "; if (associatedCell.Symbol != null) { toolTipTitle += associatedCell.Symbol.NameWithoutVTablePrefix; } else { toolTipTitle += "Cell"; } string toolTipBody = ToolTipBody(associatedCell); string linkText = rawItem.OriginalData.ToString("x8"); string linkWithToolTip = HeapToHTMLPageJavaScriptManager.MakeToolTipLink(toolTipTitle, toolTipBody, url, windowTarget, linkText); WriteTableColumnBegin(TAlignment.EAlignCenter, "cellDataAsNumeric"); WriteLine(linkWithToolTip); WriteTableColumnEnd(); } else { WriteTableColumnHex(rawItem.OriginalData, TAlignment.EAlignCenter, "cellDataAsNumeric"); } } else { WriteTableColumnEmpty(); rawItem = null; } } // Blank spacer WriteTableColumnBegin(TAlignment.EAlignNone, string.Empty, 20); WriteSpace(); WriteTableColumnEnd(); // Second set of columns - characterised data for (runIndex = i; runIndex < runExtent; runIndex++) { // Get the item if (runIndex < rawItemsCount) { rawItem = iCell[runIndex]; WriteTableColumn(rawItem.OriginalCharacterisedData, TAlignment.EAlignCenter, "cellDataAsString"); } else { WriteTableColumnEmpty(); rawItem = null; } } } WriteTableRowEnd(); }