244 lines
No EOL
12 KiB
C#
244 lines
No EOL
12 KiB
C#
namespace MemoryViewer
|
|
{
|
|
public class ITFDataGridView : System.Windows.Forms.DataGridView
|
|
{
|
|
public ITFDataGridView()
|
|
{
|
|
this.SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint |
|
|
System.Windows.Forms.ControlStyles.UserPaint |
|
|
System.Windows.Forms.ControlStyles.DoubleBuffer |
|
|
System.Windows.Forms.ControlStyles.ResizeRedraw, true);
|
|
}
|
|
}
|
|
|
|
|
|
partial class AllocationViewer
|
|
{
|
|
/// <summary>
|
|
/// Required designer variable.
|
|
/// </summary>
|
|
private System.ComponentModel.IContainer components = null;
|
|
|
|
/// <summary>
|
|
/// Clean up any resources being used.
|
|
/// </summary>
|
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && (components != null))
|
|
{
|
|
components.Dispose();
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
#region Windows Form Designer generated code
|
|
|
|
/// <summary>
|
|
/// Required method for Designer support - do not modify
|
|
/// the contents of this method with the code editor.
|
|
/// </summary>
|
|
private void InitializeComponent()
|
|
{
|
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AllocationViewer));
|
|
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.TypeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.TimeToLoadColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.LoadedColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.MemoryColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.CustomInfoColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.PathColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.checkBoxFreeze = new System.Windows.Forms.CheckBox();
|
|
this.btnDumpToFile = new System.Windows.Forms.Button();
|
|
this.btnAnalyze = new System.Windows.Forms.Button();
|
|
this.dataGridViewAllocation = new MemoryViewer.ITFDataGridView();
|
|
this.AllocatorID = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.ColumnAllocationByte = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.ColumnAllocationGlobalCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.ColumnCurrentCounter = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.ColumnBytesPeak = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.ColumnAverageAllocationByFrame = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
this.columnDump = new System.Windows.Forms.DataGridViewButtonColumn();
|
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAllocation)).BeginInit();
|
|
this.SuspendLayout();
|
|
//
|
|
// NameColumn
|
|
//
|
|
this.NameColumn.HeaderText = "Name";
|
|
this.NameColumn.Name = "NameColumn";
|
|
this.NameColumn.ReadOnly = true;
|
|
this.NameColumn.Width = 140;
|
|
//
|
|
// TypeColumn
|
|
//
|
|
this.TypeColumn.HeaderText = "Type";
|
|
this.TypeColumn.Name = "TypeColumn";
|
|
this.TypeColumn.ReadOnly = true;
|
|
//
|
|
// TimeToLoadColumn
|
|
//
|
|
this.TimeToLoadColumn.HeaderText = "TimeToLoad ms";
|
|
this.TimeToLoadColumn.Name = "TimeToLoadColumn";
|
|
this.TimeToLoadColumn.ReadOnly = true;
|
|
this.TimeToLoadColumn.ToolTipText = "Time to load this resource in milliseconds";
|
|
//
|
|
// LoadedColumn
|
|
//
|
|
this.LoadedColumn.HeaderText = "Loaded";
|
|
this.LoadedColumn.Name = "LoadedColumn";
|
|
this.LoadedColumn.ReadOnly = true;
|
|
//
|
|
// MemoryColumn
|
|
//
|
|
this.MemoryColumn.HeaderText = "MemoryUsage Kb";
|
|
this.MemoryColumn.Name = "MemoryColumn";
|
|
this.MemoryColumn.ReadOnly = true;
|
|
//
|
|
// CustomInfoColumn
|
|
//
|
|
this.CustomInfoColumn.HeaderText = "Info";
|
|
this.CustomInfoColumn.Name = "CustomInfoColumn";
|
|
this.CustomInfoColumn.ReadOnly = true;
|
|
//
|
|
// PathColumn
|
|
//
|
|
this.PathColumn.HeaderText = "Path";
|
|
this.PathColumn.Name = "PathColumn";
|
|
this.PathColumn.ReadOnly = true;
|
|
//
|
|
// checkBoxFreeze
|
|
//
|
|
this.checkBoxFreeze.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
this.checkBoxFreeze.AutoSize = true;
|
|
this.checkBoxFreeze.Location = new System.Drawing.Point(820, 70);
|
|
this.checkBoxFreeze.Name = "checkBoxFreeze";
|
|
this.checkBoxFreeze.Size = new System.Drawing.Size(58, 17);
|
|
this.checkBoxFreeze.TabIndex = 1;
|
|
this.checkBoxFreeze.Text = "Freeze";
|
|
this.checkBoxFreeze.UseVisualStyleBackColor = true;
|
|
//
|
|
// btnDumpToFile
|
|
//
|
|
this.btnDumpToFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
this.btnDumpToFile.Location = new System.Drawing.Point(803, 12);
|
|
this.btnDumpToFile.Name = "btnDumpToFile";
|
|
this.btnDumpToFile.Size = new System.Drawing.Size(75, 23);
|
|
this.btnDumpToFile.TabIndex = 2;
|
|
this.btnDumpToFile.Text = "Dump to file";
|
|
this.btnDumpToFile.UseVisualStyleBackColor = true;
|
|
this.btnDumpToFile.Click += new System.EventHandler(this.btnDumpToFile_Click);
|
|
//
|
|
// btnAnalyze
|
|
//
|
|
this.btnAnalyze.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
this.btnAnalyze.Location = new System.Drawing.Point(803, 41);
|
|
this.btnAnalyze.Name = "btnAnalyze";
|
|
this.btnAnalyze.Size = new System.Drawing.Size(75, 23);
|
|
this.btnAnalyze.TabIndex = 3;
|
|
this.btnAnalyze.Text = "Analyze";
|
|
this.btnAnalyze.UseVisualStyleBackColor = true;
|
|
this.btnAnalyze.Click += new System.EventHandler(this.btnAnalyze_Click);
|
|
//
|
|
// dataGridViewAllocation
|
|
//
|
|
this.dataGridViewAllocation.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
| System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.dataGridViewAllocation.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.dataGridViewAllocation.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
|
this.AllocatorID,
|
|
this.ColumnAllocationByte,
|
|
this.ColumnAllocationGlobalCount,
|
|
this.ColumnCurrentCounter,
|
|
this.ColumnBytesPeak,
|
|
this.ColumnAverageAllocationByFrame,
|
|
this.columnDump});
|
|
this.dataGridViewAllocation.Location = new System.Drawing.Point(12, 12);
|
|
this.dataGridViewAllocation.Name = "dataGridViewAllocation";
|
|
this.dataGridViewAllocation.Size = new System.Drawing.Size(785, 701);
|
|
this.dataGridViewAllocation.TabIndex = 0;
|
|
this.dataGridViewAllocation.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewAllocation_CellContentClick);
|
|
//
|
|
// AllocatorID
|
|
//
|
|
this.AllocatorID.HeaderText = "AllocatorID";
|
|
this.AllocatorID.Name = "AllocatorID";
|
|
this.AllocatorID.ReadOnly = true;
|
|
//
|
|
// ColumnAllocationByte
|
|
//
|
|
this.ColumnAllocationByte.HeaderText = "Bytes used";
|
|
this.ColumnAllocationByte.Name = "ColumnAllocationByte";
|
|
this.ColumnAllocationByte.ReadOnly = true;
|
|
//
|
|
// ColumnAllocationGlobalCount
|
|
//
|
|
this.ColumnAllocationGlobalCount.HeaderText = "Global Count";
|
|
this.ColumnAllocationGlobalCount.Name = "ColumnAllocationGlobalCount";
|
|
this.ColumnAllocationGlobalCount.ReadOnly = true;
|
|
//
|
|
// ColumnCurrentCounter
|
|
//
|
|
this.ColumnCurrentCounter.HeaderText = "Current Counter";
|
|
this.ColumnCurrentCounter.Name = "ColumnCurrentCounter";
|
|
this.ColumnCurrentCounter.ReadOnly = true;
|
|
//
|
|
// ColumnBytesPeak
|
|
//
|
|
this.ColumnBytesPeak.HeaderText = "Bytes Peak";
|
|
this.ColumnBytesPeak.Name = "ColumnBytesPeak";
|
|
this.ColumnBytesPeak.ReadOnly = true;
|
|
//
|
|
// ColumnAverageAllocationByFrame
|
|
//
|
|
this.ColumnAverageAllocationByFrame.HeaderText = "~Alloc/Frame";
|
|
this.ColumnAverageAllocationByFrame.Name = "ColumnAverageAllocationByFrame";
|
|
this.ColumnAverageAllocationByFrame.ReadOnly = true;
|
|
//
|
|
// columnDump
|
|
//
|
|
this.columnDump.HeaderText = "Dump";
|
|
this.columnDump.Name = "columnDump";
|
|
this.columnDump.Width = 60;
|
|
//
|
|
// AllocationViewer
|
|
//
|
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
this.ClientSize = new System.Drawing.Size(890, 725);
|
|
this.Controls.Add(this.btnAnalyze);
|
|
this.Controls.Add(this.btnDumpToFile);
|
|
this.Controls.Add(this.checkBoxFreeze);
|
|
this.Controls.Add(this.dataGridViewAllocation);
|
|
this.DoubleBuffered = true;
|
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
this.Name = "AllocationViewer";
|
|
this.Text = "AllocationView";
|
|
((System.ComponentModel.ISupportInitialize)(this.dataGridViewAllocation)).EndInit();
|
|
this.ResumeLayout(false);
|
|
this.PerformLayout();
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn TypeColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn TimeToLoadColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn LoadedColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn MemoryColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn CustomInfoColumn;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn PathColumn;
|
|
public System.Windows.Forms.CheckBox checkBoxFreeze;
|
|
public ITFDataGridView dataGridViewAllocation;
|
|
private System.Windows.Forms.Button btnDumpToFile;
|
|
private System.Windows.Forms.Button btnAnalyze;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn AllocatorID;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnAllocationByte;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnAllocationGlobalCount;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnCurrentCounter;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnBytesPeak;
|
|
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnAverageAllocationByFrame;
|
|
private System.Windows.Forms.DataGridViewButtonColumn columnDump;
|
|
}
|
|
} |