Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfVis", "ProfVis\ProfVis.csproj", "{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
+162
View File
@@ -0,0 +1,162 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
namespace ProfVis
{
partial class Form1
{
/// <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()
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.reloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.searchTextBox = new System.Windows.Forms.TextBox();
this.dataGridView_Prof = new ProfVis.DGW();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView_Prof)).BeginInit();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.reloadToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(869, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.openToolStripMenuItem.Text = "&Open...";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// reloadToolStripMenuItem
//
this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem";
this.reloadToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.reloadToolStripMenuItem.Text = "Reload";
this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click);
//
// progressBar1
//
this.progressBar1.Dock = System.Windows.Forms.DockStyle.Top;
this.progressBar1.Location = new System.Drawing.Point(0, 24);
this.progressBar1.MarqueeAnimationSpeed = 5;
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(869, 23);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
this.progressBar1.TabIndex = 7;
this.progressBar1.Visible = false;
//
// searchTextBox
//
this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.searchTextBox.Location = new System.Drawing.Point(646, 2);
this.searchTextBox.Name = "searchTextBox";
this.searchTextBox.Size = new System.Drawing.Size(221, 20);
this.searchTextBox.TabIndex = 8;
this.searchTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.searchTextBox_KeyUp);
//
// dataGridView_Prof
//
this.dataGridView_Prof.AllowUserToAddRows = false;
this.dataGridView_Prof.AllowUserToDeleteRows = false;
this.dataGridView_Prof.AllowUserToResizeColumns = false;
this.dataGridView_Prof.AllowUserToResizeRows = false;
this.dataGridView_Prof.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView_Prof.Location = new System.Drawing.Point(37, 29);
this.dataGridView_Prof.Name = "dataGridView_Prof";
this.dataGridView_Prof.ReadOnly = true;
this.dataGridView_Prof.RowTemplate.ReadOnly = true;
this.dataGridView_Prof.ShowCellToolTips = false;
this.dataGridView_Prof.Size = new System.Drawing.Size(408, 351);
this.dataGridView_Prof.TabIndex = 5;
this.dataGridView_Prof.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.dataGridView_Prof_CellPainting);
this.dataGridView_Prof.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dataGridView_Prof_MouseMove);
//
// Form1
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(869, 548);
this.Controls.Add(this.searchTextBox);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.dataGridView_Prof);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Form1_Load);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView_Prof)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem reloadToolStripMenuItem;
public DGW dataGridView_Prof;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.TextBox searchTextBox;
}
}
+891
View File
@@ -0,0 +1,891 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
namespace ProfVis
{
public partial class Form1 : Form
{
public Form1(string[] args)
{
InitializeComponent();
Show();
if (args.Length >= 1)
{
OpenSession(args[0]);
}
}
public static Color[] s_clrBack = { Color.FromArgb(235, 235, 235), Color.White };
public static Color[] s_clrBars = { Color.FromArgb(140, 198, 63),
Color.FromArgb(247, 148, 30),
Color.FromArgb(37, 170, 225),
Color.FromArgb(122, 45, 24),
Color.FromArgb(239, 62, 54),
};
private ToolTip m_tooltip; //TODO: kill this and use some custom panel to prevent flickering
public List<Brush> m_BarsBrushes;
public Font m_barFont;
private static Random m_random;
// session
private string m_sessionName;
public List<CThreadTag> m_threadsData;
public static string m_filter = "";
private BackgroundWorker m_loadingWorker;
private void Form1_Load(object sender, EventArgs e)
{
//DoubleBuffered = true;
dataGridView_Prof.Dock = DockStyle.Fill;
dataGridView_Prof.AutoGenerateColumns = false;
dataGridView_Prof.ColumnCount = 2;
//AdjustDataGridViewSizing();
dataGridView_Prof.Columns[0].Name = "Thread";
dataGridView_Prof.Columns[1].Name = "Blocks";
dataGridView_Prof.Columns[0].Frozen = true;
dataGridView_Prof.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
dataGridView_Prof.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
//dataGridView_Prof.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
//dataGridView_Prof.Columns[1].Width = 500;
dataGridView_Prof.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable;
dataGridView_Prof.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable;
dataGridView_Prof.ShowCellToolTips = false;
dataGridView_Prof.MouseWheel += new MouseEventHandler(dataGridView_Prof_MouseWheel);
dataGridView_Prof.MouseClick += new MouseEventHandler(dataGridView_Prof_MouseClick);
//dataGridView_Prof.AllowUserToResizeRows = true;
m_barFont = (Font)dataGridView_Prof.DefaultCellStyle.Font.Clone();
m_tooltip = new ToolTip();
m_tooltip.ShowAlways = false;
m_tooltip.UseAnimation = false;
m_tooltip.UseFading = false;
m_tooltip.AutomaticDelay = 0;
m_tooltip.AutoPopDelay = 0;
m_BarsBrushes = new List<Brush>();
for(int i = 0; i < Form1.s_clrBars.Length; ++i)
{
m_BarsBrushes.Add(new SolidBrush(s_clrBars[i]));
}
m_loadingWorker = new BackgroundWorker();
m_loadingWorker.WorkerReportsProgress = true;
m_loadingWorker.ProgressChanged += (object progressSender, ProgressChangedEventArgs progressArgs) =>
{
DataGridViewRow row = progressArgs.UserState as DataGridViewRow;
if (row != null)
dataGridView_Prof.Rows.Add(row);
};
m_loadingWorker.RunWorkerCompleted += (object progressSender, RunWorkerCompletedEventArgs progressArgs) =>
{
progressBar1.Visible = false;
progressBar1.Enabled = false;
menuStrip1.Enabled = true;
this.Text = m_sessionName;
};
m_loadingWorker.DoWork += (object progressSender, DoWorkEventArgs doWorkArgs) =>
{
Graphics g = this.CreateGraphics();
try
{
m_hoveredData = null;
if (m_threadsData != null)
m_threadsData.Clear();
string filename = doWorkArgs.Argument as string;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filename);
m_sessionName = filename;
m_threadsData = new List<CThreadTag>();
XmlNode rootNode = xmlDoc.SelectSingleNode("root");
int threadIndex = 0;
int num_childs = rootNode.ChildNodes.Count;
foreach (XmlNode threadNode in rootNode)
{
string threadName = threadNode.Attributes.GetNamedItem("name").Value;
float threadTimeMS = Single.Parse(threadNode.Attributes.GetNamedItem("totalTimeMS").Value, System.Globalization.CultureInfo.InvariantCulture);
long threadStart = Convert.ToInt64(threadNode.Attributes.GetNamedItem("startTime").Value);
long threadEnd = Convert.ToInt64(threadNode.Attributes.GetNamedItem("stopTime").Value);
long threadTime = threadEnd - threadStart;
m_threadsData.Add(new CThreadTag());
CThreadTag threadData = m_threadsData[threadIndex];
threadData.m_Times = new CBlockData(threadName, threadTimeMS, threadStart, threadEnd, 0, "");
DataGridViewRow row = new DataGridViewRow();
DataGridViewCell cell0 = new DataGridViewTextBoxCell();
cell0.Value = threadName;
row.Cells.Add(cell0);
row.Tag = threadData;
m_loadingWorker.ReportProgress(0, row);
getBlocksFromXML(threadNode, 0, threadIndex);
threadIndex++;
// create rows
for (int i = 0; i < threadData.m_StackEnties.Count; ++i)
{
CBlockTag rowInfo = threadData.m_StackEnties[i];
// used for DrawFrectangles()
for (int j = 0; j < rowInfo.blocks.Count; ++j)
{
CBlockData data = rowInfo.blocks[j];
//rowInfo.blocksByColor[data.colorIdx].Add(data);
data.m_labelSize = g.MeasureString(data.name, m_barFont);
}
DataGridViewRow stackedRow = new DataGridViewRow();
DataGridViewCell stackedCell = new DataGridViewTextBoxCell();
stackedCell.Value = i;
stackedRow.Cells.Add(stackedCell);
stackedRow.Tag = rowInfo;
m_loadingWorker.ReportProgress(0, stackedRow);
}
}// foreach (XmlNode threadNode in rootNode)
}
catch (System.Exception ex)
{
m_sessionName = string.Empty;
MessageBox.Show(ex.Message);
}
g.Dispose();
};
}
private void OpenSession(string filename)
{
if (m_loadingWorker.IsBusy)
return;
// 0 seed for same colors
m_random = new Random(0);
dataGridView_Prof.Rows.Clear();
DataGridViewRow timeRow = new DataGridViewRow();
DataGridViewCell textCell = new DataGridViewTextBoxCell();
textCell.Value = "Time";
timeRow.Cells.Add(textCell);
timeRow.Height = 40;
timeRow.Tag = new CTimeTag();
timeRow.Frozen = true;
dataGridView_Prof.Rows.Add(timeRow);
progressBar1.Value = 0;
progressBar1.Visible = true;
progressBar1.Enabled = true;
menuStrip1.Enabled = false;
m_loadingWorker.RunWorkerAsync(filename);
}
private void getBlocksFromXML(XmlNode node, int depth, int threadIndex)
{
//if (depth == 3)
// return;
if (node.SelectSingleNode("block")!=null)
{
CThreadTag threadData = m_threadsData[threadIndex];
if (depth >= threadData.m_StackEnties.Count)
{
threadData.m_StackEnties.Add(new CBlockTag()); //new stack level
threadData.m_StackEnties[depth].threadIndex = threadIndex;
}
int prevClrIndex = 0;
foreach (XmlNode blockNode in node)
{
string name = blockNode.Attributes.GetNamedItem("name").Value;
float totalTimeMS = Single.Parse(blockNode.Attributes.GetNamedItem("totalTimeMS").Value, System.Globalization.CultureInfo.InvariantCulture);
long startTime = Convert.ToInt64(blockNode.Attributes.GetNamedItem("startTime").Value);
long stopTime = Convert.ToInt64(blockNode.Attributes.GetNamedItem("stopTime").Value);
XmlNode argsNode = blockNode.Attributes.GetNamedItem("args");
string args = "";
if(argsNode != null)
args = argsNode.Value;
int clrIndex = m_random.Next(0, s_clrBars.Length);
if (clrIndex == prevClrIndex)
{
clrIndex++;
if (clrIndex == s_clrBars.Length)
clrIndex = 0;
}
threadData.m_StackEnties[depth].blocks.Add(new CBlockData(name, totalTimeMS, startTime, stopTime, clrIndex, args));
prevClrIndex = clrIndex;
getBlocksFromXML(blockNode, depth+1, threadIndex);
}
}
}
private void dataGridView_Prof_MouseWheel(object sender, MouseEventArgs e)
{
if (ModifierKeys == Keys.Control)
{
if (!dataGridView_Prof.IsOffsetSet())
{
return;
}
int oldOffset = dataGridView_Prof.HorizontalScrollingOffset;
dataGridView_Prof.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
double zoomFactor = Math.Pow(2, (double)e.Delta * 0.001);
int newWidth = (int)(dataGridView_Prof.Columns[1].Width * zoomFactor);
bool clampWidth = newWidth < 0 || newWidth >= 65535;
newWidth = newWidth < 65535 ? newWidth : 65535;
newWidth = newWidth >= 0 ? newWidth : 0;
dataGridView_Prof.Columns[1].Width = newWidth;
int visibleColumn1Width = dataGridView_Prof.Width - dataGridView_Prof.Columns[0].Width;
int mouseColumn1Offset = e.X - dataGridView_Prof.Columns[0].Width;
double mousePrecentage = (double)mouseColumn1Offset / (double)visibleColumn1Width;
int newOffset = clampWidth ? oldOffset : ((int)((double)oldOffset * zoomFactor) + (int)(visibleColumn1Width * mousePrecentage * (double)e.Delta * 0.001));
newOffset = newOffset >= 0 ? newOffset : 0;
dataGridView_Prof.SetOffset(newOffset);
}
}
private void dataGridView_Prof_MouseClick(object sender, MouseEventArgs e)
{
if (ModifierKeys == Keys.Control)
{
dataGridView_Prof.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
if (e.Button == MouseButtons.Right)
{
if (m_hoveredData != null)
{
ContextMenu m = new ContextMenu();
MenuItem copyName = new MenuItem("Copy name");
copyName.Click += new System.EventHandler(
delegate(object o, EventArgs click_args)
{
Clipboard.SetText(m_hoveredData.name);
}
);
m.MenuItems.Add(copyName);
MenuItem copyArgs = new MenuItem("Copy arguments");
copyArgs.Click += new System.EventHandler(
delegate(object o, EventArgs click_args)
{
Clipboard.SetText(m_hoveredData.args);
}
);
m.MenuItems.Add(copyArgs);
m.Show(dataGridView_Prof, e.Location);
}
}
}
private void dataGridView_Prof_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
if (e.ColumnIndex != 1)
return;
object tag = dataGridView_Prof.Rows[e.RowIndex].Tag;
if (tag != null)
{
IRowTag rowTag = tag as IRowTag;
if (rowTag != null)
rowTag.Draw(ref e, this);
}
else
{
//DRAW timeline
}
}
private int binarySearch(List<CBlockData> list, int value)
{
int min = 0;
int max = list.Count - 1;
while(min <= max)
{
int mid = min + (max - min)/2;
if (value >= list[mid].drawXStart)
{
if (value <= list[mid].drawXEnd)
return mid;
else
min = mid + 1;
}
else
max = mid - 1;
}
return -1;
}
private Point m_PrevMousePos;
private CBlockData m_hoveredData;
private void dataGridView_Prof_MouseMove(object sender, MouseEventArgs e)
{
if (m_loadingWorker.IsBusy)
return;
if (m_PrevMousePos != e.Location)
{
m_PrevMousePos = e.Location;
DataGridView.HitTestInfo hittest = dataGridView_Prof.HitTest(e.Location.X, e.Location.Y);
m_tooltip.RemoveAll();
if (hittest.ColumnIndex == 1 && hittest.RowIndex >= 0 && hittest.RowIndex < dataGridView_Prof.RowCount)
{
object tag = dataGridView_Prof.Rows[hittest.RowIndex].Tag;
if (tag != null)
{
CBlockTag info = tag as CBlockTag;
if (info != null)
{
List<CBlockData> filteredBlocks = info.blocks.Where(x => x.visible).ToList();
int idx = binarySearch(filteredBlocks, e.Location.X);
if (idx != -1)
{
m_hoveredData = filteredBlocks[idx];
m_tooltip.Hide(dataGridView_Prof);
Rectangle columnRect = info.cellBounds;
float threadMS = m_threadsData[0].m_Times.timeMS;
float mouseRel = ((e.X - columnRect.X) * 100.0f) / columnRect.Width;
float mouseRelMS = (mouseRel / 100.0f) * threadMS;
string text;
m_tooltip.ToolTipTitle = filteredBlocks[idx].name;
if (filteredBlocks[idx].args.Length > 0)
{
text = string.Format("totalTime = {0} ms\ncursorAbsolute = {1} ms ({2:##.##} %)\nargs = {3}",
filteredBlocks[idx].timeMS, mouseRelMS, mouseRel, filteredBlocks[idx].args);
}
else
{
text = string.Format("totalTime = {0} ms\ncursorAbsolute = {1} ms ({2:##.##} %)",
filteredBlocks[idx].timeMS, mouseRelMS, mouseRel);
}
m_tooltip.Show(text, dataGridView_Prof, e.X + 20, e.Y + 20);
}
else
{
m_hoveredData = null;
m_tooltip.Hide(dataGridView_Prof);
}
}
CThreadTag td = tag as CThreadTag;
if (td != null)
{
m_tooltip.Hide(dataGridView_Prof);
m_tooltip.Show(string.Format("time = {0} ms", td.m_Times.timeMS), dataGridView_Prof, e.X + 20, e.Y + 20);
m_tooltip.ToolTipTitle = td.m_Times.name;
}
}
else
{
m_hoveredData = null;
m_tooltip.Hide(dataGridView_Prof);
}
}
else
{
m_hoveredData = null;
m_tooltip.Hide(dataGridView_Prof);
}
}
// base.OnMouseMove(e);
}
private void Form1_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
if (files.Length == 1)
{
OpenSession(files[0]);
}
}
}
private void Form1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Move;
}
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog myDialog = new OpenFileDialog();
myDialog.Filter = "All files (*.xml)|*.xml";
myDialog.CheckFileExists = true;
myDialog.Multiselect = false;
if (myDialog.ShowDialog() == DialogResult.OK)
{
OpenSession(myDialog.FileName);
}
}
private void reloadToolStripMenuItem_Click(object sender, EventArgs e)
{
if (m_sessionName != null)
OpenSession(m_sessionName);
}
private void searchTextBox_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
m_filter = searchTextBox.Text;
for (int i = 0; i < m_threadsData.Count; ++i)
{
m_threadsData[i].UpdateFilter();
}
dataGridView_Prof.Refresh();
}
}
}
public class DGW : DataGridView
{
private bool reapplyOffset = false;
private int deferredOffset = 0;
public DGW()
{
this.DoubleBuffered = true;
}
protected override void OnPaintBackground(PaintEventArgs pevent)
{
if (reapplyOffset)
{
HorizontalScrollingOffset = deferredOffset;
reapplyOffset = false;
}
}
protected override void OnPaint(PaintEventArgs e)
{
if (reapplyOffset)
{
HorizontalScrollingOffset = deferredOffset;
reapplyOffset = false;
Invalidate(true);
}
base.OnPaint(e);
}
public bool IsOffsetSet()
{
return !reapplyOffset;
}
public void SetOffset(int offset)
{
if (reapplyOffset)
{
deferredOffset += offset;
return;
}
reapplyOffset = true;
deferredOffset = offset;
}
}
public class CBlockData
{
public string name;
public float timeMS;
public long timeStart;
public long timeEnd;
public long time;
public string args;
public int drawXStart;
public int drawXEnd;
public int colorIdx;
public bool visible;
public SizeF m_labelSize;
public CBlockData(string n, float t, long start, long end, int clrIdx, string a)
{
name = n;
timeMS = t;
timeStart = start;
timeEnd = end;
time = end - start;
args = a;
colorIdx = clrIdx;
visible = true;
}
}
public abstract class IRowTag
{
public abstract void Draw(ref DataGridViewCellPaintingEventArgs e, Form1 form);
}
public class CBlockTag : IRowTag
{
public int threadIndex;
public List<CBlockData> blocks;
public Rectangle cellBounds;
public CBlockTag()
{
blocks = new List<CBlockData>();
}
public void UpdateFilter()
{
for (int i = 0; i < blocks.Count; i++)
{
CBlockData blockData = blocks[i];
blockData.visible = Form1.m_filter == ""
|| (blockData.name.ToLower().Contains(Form1.m_filter.ToLower())
|| blockData.args.ToLower().Contains(Form1.m_filter.ToLower()));
}
}
public override void Draw(ref DataGridViewCellPaintingEventArgs e, Form1 form)
{
e.Handled = true;
Graphics g = e.Graphics;
cellBounds = e.CellBounds;
const int offset = 2;
Rectangle cellBound = new Rectangle(e.CellBounds.X, e.CellBounds.Y + offset,
e.CellBounds.Width, e.CellBounds.Height - offset - 1);
using (Brush backBrush = new SolidBrush(Form1.s_clrBack[e.RowIndex % 2]))
{
using (Pen borderPen = new Pen(Color.Black, 1))
{
g.FillRectangle(backBrush, e.CellBounds);
g.DrawRectangle(borderPen, e.CellBounds);
borderPen.Dispose();
}
}
CThreadTag threadData = form.m_threadsData[threadIndex];
CBlockData threadTime = threadData.m_Times;
long ttime = threadTime.time; // 100%
bool smallBlock = false;
int smallBlockPos = 0;
for (int i = 0; i < blocks.Count; i++)
{
CBlockData blockData = blocks[i];
if (!blockData.visible)
{
continue;
}
long blockWidth = e.CellBounds.Width * blockData.time / ttime;
cellBound.Width = (int)blockWidth;
long blockStart = (blockData.timeStart - threadTime.timeStart) * e.CellBounds.Width / ttime;
cellBound.X = e.CellBounds.X + (int)blockStart;
blockData.drawXStart = cellBound.X;
blockData.drawXEnd = cellBound.X + cellBound.Width;
if (smallBlock && smallBlockPos != cellBound.X)
{
Rectangle rec = new Rectangle(smallBlockPos, e.CellBounds.Y + offset,
1, e.CellBounds.Height - offset - 1);
g.FillRectangle(form.m_BarsBrushes[blocks[i - 1].colorIdx], rec);
smallBlock = false;
}
if (cellBound.Width < 1)
{
//cellBound.Width = 1;
smallBlockPos = cellBound.X;
smallBlock = true;
continue;
}
if ((cellBound.X < e.ClipBounds.X + e.ClipBounds.Width) &&
(cellBound.X + cellBound.Width > e.ClipBounds.X))
{
g.FillRectangle(form.m_BarsBrushes[blockData.colorIdx], cellBound);
SizeF textSize = blockData.m_labelSize;
if (textSize.Width < cellBound.Width - 3)
{
StringFormat formatter = new StringFormat();
formatter.LineAlignment = StringAlignment.Center;
formatter.Alignment = StringAlignment.Center;
float tx = cellBound.X + cellBound.Width / 2;
float ty = cellBound.Y + cellBound.Height / 2;
g.DrawString(blockData.name, form.m_barFont, Brushes.White, tx, ty, formatter);
}
}
} //for (int i = 0; i < info.blocks.Count; i++)
if (smallBlock)
{
Rectangle rec = new Rectangle(smallBlockPos, e.CellBounds.Y + offset,
1, e.CellBounds.Height - offset - 1);
g.FillRectangle(form.m_BarsBrushes[blocks[blocks.Count - 1].colorIdx], rec);
}
}
}
public class CThreadTag : IRowTag
{
public CBlockData m_Times;
public List<CBlockTag> m_StackEnties; //each stack level have a list of blocks
public CThreadTag()
{
m_StackEnties = new List<CBlockTag>();
}
public void UpdateFilter()
{
for (int i = 0; i < m_StackEnties.Count; i++)
{
CBlockTag tag = m_StackEnties[i];
tag.UpdateFilter();
}
}
public override void Draw(ref DataGridViewCellPaintingEventArgs e, Form1 form)
{
e.Handled = true;
Graphics g = e.Graphics;
const int offset = 2;
Rectangle cellBound = new Rectangle(e.CellBounds.X, e.CellBounds.Y + offset,
e.CellBounds.Width, e.CellBounds.Height - offset - 1);
string threadText = "Thread: " + m_Times.name;
g.FillRectangle(Brushes.DimGray, e.CellBounds);
Font font = new Font(e.CellStyle.Font, FontStyle.Bold);
SizeF textSize = g.MeasureString(threadText, font);
if (textSize.Width < cellBound.Width - 3)
{
StringFormat formatter = new StringFormat();
formatter.LineAlignment = StringAlignment.Center;
formatter.Alignment = StringAlignment.Center;
float tx = cellBound.X + cellBound.Width / 2;
float ty = cellBound.Y + cellBound.Height / 2;
g.DrawString(threadText, font, Brushes.White, tx, ty, formatter);
}
}
}
public class CTimeTag : IRowTag
{
private void DrawLinesBetween(ref DataGridViewCellPaintingEventArgs e, Pen pen, Font font, int pos1, int pos2, float pos2MS, float blockMS, int markerHeight)
{
int blockThreshold = 200; // in pixels
//int blockDivCount = 5;
int diff = pos2 - pos1;
if (diff != 0 && diff > blockThreshold && markerHeight > 1)
{
Graphics g = e.Graphics;
int X = e.CellBounds.X;
int Y = e.CellBounds.Y + e.CellBounds.Height - 1;
int linePos = pos1 + (pos2 - pos1)/2;
int DrawPos = X + linePos;
float pos1MS = pos2MS - blockMS;
float lineMS = pos1MS + (pos2MS - pos1MS) / 2.0f;
//if (DrawPos > e.ClipBounds.X && DrawPos < e.ClipBounds.X + e.ClipBounds.Width) //artifacts ;(
{
g.DrawLine(pen, DrawPos, Y - markerHeight, DrawPos, Y);
string s = string.Format("{0:##.##}", (lineMS));
StringFormat formatter = new StringFormat();
formatter.LineAlignment = StringAlignment.Center;
formatter.Alignment = StringAlignment.Center;
g.DrawString(s, font, Brushes.Black, DrawPos, Y - markerHeight - 5, formatter);
blockMS = pos2MS - lineMS;
DrawLinesBetween(ref e, pen, font, pos1, linePos, lineMS, blockMS, markerHeight - 2);
DrawLinesBetween(ref e, pen, font, linePos, pos2, pos2MS, blockMS, markerHeight - 2);
}
}
}
public override void Draw(ref DataGridViewCellPaintingEventArgs e, Form1 form)
{
e.Handled = true;
Graphics g = e.Graphics;
g.FillRectangle(Brushes.White, e.CellBounds);
if (form.m_threadsData != null && form.m_threadsData.Count > 0)
{
Int32 cellWidth = e.CellBounds.Width;
Int32 lineYpos = e.CellBounds.Y + e.CellBounds.Height - 1;
using (Pen btPen = new Pen(Color.Black, 2))
{
// bottom line
g.DrawLine(btPen,
e.CellBounds.X, lineYpos,
e.CellBounds.X + cellWidth, lineYpos);
btPen.Dispose();
}
//form.dataGridView_Prof.PointToScreen()
g.DrawString("Milliseconds", form.m_barFont, Brushes.Black, e.CellBounds.X + 1 , e.CellBounds.Y + 1);
Pen pen = new Pen(Color.Black, 1);
CThreadTag threadData = form.m_threadsData[0];
CBlockData threadTime = threadData.m_Times;
float totalTimeMS = threadTime.timeMS;
//long totalTime = threadTime.time;
int marketHeight = 16;
int[] blocks = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1};
float timeMSperBlock = 0.0f;
int blockInx = 0;
while (timeMSperBlock < 10.0f || blockInx > blocks.Count())
{
timeMSperBlock = totalTimeMS / blocks[blockInx++];
}
if (blockInx != 0 )
--blockInx;
float blockMS = blocks[blockInx];
int linePx = 0;
int linePrevPx = 0;
int i = 0;
while (linePx < cellWidth)
{
float lineMS = i *blockMS;
++i;
linePrevPx = linePx;
linePx = Convert.ToInt32(Math.Round((float)(lineMS * cellWidth) / totalTimeMS));
DrawLinesBetween(ref e, pen, form.m_barFont, linePrevPx, linePx, lineMS, blockMS, marketHeight);
int Xpos = e.CellBounds.X + linePx;
g.DrawLine(pen, Xpos, lineYpos - marketHeight, Xpos, lineYpos);
string s = string.Format("{0}", Convert.ToInt32(lineMS));
StringFormat formatter = new StringFormat();
formatter.LineAlignment = StringAlignment.Center;
formatter.Alignment = StringAlignment.Center;
float tx = Xpos;
float ty = lineYpos - marketHeight - 5;
g.DrawString(s, form.m_barFont, Brushes.Black, tx, ty, formatter);
}
pen.Dispose();
}
}
}
}
+123
View File
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+129
View File
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3AF4C1C6-4DF2-4F3E-9997-B2844D461DF8}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfVis</RootNamespace>
<AssemblyName>ProfVis</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\DataSources\Form1.datasource" />
<None Include="Properties\DataSources\ProfVis.Properties.Resources.datasource" />
<None Include="Properties\DataSources\ProfVis.Properties.Settings.datasource" />
<None Include="Properties\DataSources\Program.datasource" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
+35
View File
@@ -0,0 +1,35 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ProfVis
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args));
}
}
}
@@ -0,0 +1,49 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ProfVis")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProfVis")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c15ff8ac-4f15-4960-96a2-1cc11631169d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Form1" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>ProfVis.Form1, ProfVis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Resources" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>ProfVis.Properties.Resources, ProfVis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Settings" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>ProfVis.Properties.Settings, ProfVis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Program" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>ProfVis.Program, ProfVis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// Modifications copyright Amazon.com, Inc. or its affiliates
namespace ProfVis.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProfVis.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// Modifications copyright Amazon.com, Inc. or its affiliates
namespace ProfVis.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>