diff options
-rw-r--r-- | ExpressProfiler/ExpressProfiler/ExpressProfiler.csproj | 42 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/FindForm.Designer.cs | 103 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/FindForm.cs | 25 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/FindForm.resx | 120 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/MainForm.Designer.cs | 305 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/MainForm.cs | 284 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/MainForm.resx | 78 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/Properties/Settings.Designer.cs | 50 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/Properties/Settings.settings | 23 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/app.config | 24 |
11 files changed, 938 insertions, 120 deletions
diff --git a/ExpressProfiler/ExpressProfiler/ExpressProfiler.csproj b/ExpressProfiler/ExpressProfiler/ExpressProfiler.csproj index ee8c87d..360aab9 100644 --- a/ExpressProfiler/ExpressProfiler/ExpressProfiler.csproj +++ b/ExpressProfiler/ExpressProfiler/ExpressProfiler.csproj @@ -22,6 +22,21 @@ <SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
+ <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' ">
<DebugSymbols>true</DebugSymbols>
@@ -52,6 +67,12 @@ </ItemGroup>
<ItemGroup>
<Compile Include="EventList.cs" />
+ <Compile Include="FindForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="FindForm.Designer.cs">
+ <DependentUpon>FindForm.cs</DependentUpon>
+ </Compile>
<Compile Include="ListViewNF.cs">
<SubType>Component</SubType>
</Compile>
@@ -67,6 +88,9 @@ <Compile Include="RtfBuilder.cs" />
<Compile Include="SqlTokens.cs" />
<Compile Include="YukonLexer.cs" />
+ <EmbeddedResource Include="FindForm.resx">
+ <DependentUpon>FindForm.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
@@ -80,6 +104,7 @@ <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
+ <None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -90,6 +115,23 @@ <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
+ <ItemGroup>
+ <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>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</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.
diff --git a/ExpressProfiler/ExpressProfiler/FindForm.Designer.cs b/ExpressProfiler/ExpressProfiler/FindForm.Designer.cs new file mode 100644 index 0000000..8643852 --- /dev/null +++ b/ExpressProfiler/ExpressProfiler/FindForm.Designer.cs @@ -0,0 +1,103 @@ +namespace ExpressProfiler
+{
+ partial class FindForm
+ {
+ /// <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.edPattern = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.btnFind = new System.Windows.Forms.Button();
+ this.btnClose = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // edPattern
+ //
+ this.edPattern.Location = new System.Drawing.Point(4, 20);
+ this.edPattern.Name = "edPattern";
+ this.edPattern.Size = new System.Drawing.Size(300, 20);
+ this.edPattern.TabIndex = 0;
+ this.edPattern.TextChanged += new System.EventHandler(this.edPattern_TextChanged);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(3, 3);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(56, 13);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "&Find what:";
+ //
+ // btnFind
+ //
+ this.btnFind.Location = new System.Drawing.Point(309, 19);
+ this.btnFind.Name = "btnFind";
+ this.btnFind.Size = new System.Drawing.Size(75, 23);
+ this.btnFind.TabIndex = 2;
+ this.btnFind.Text = "Find next";
+ this.btnFind.UseVisualStyleBackColor = true;
+ this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
+ //
+ // btnClose
+ //
+ this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnClose.Location = new System.Drawing.Point(309, 48);
+ this.btnClose.Name = "btnClose";
+ this.btnClose.Size = new System.Drawing.Size(75, 23);
+ this.btnClose.TabIndex = 3;
+ this.btnClose.Text = "Close";
+ this.btnClose.UseVisualStyleBackColor = true;
+ //
+ // FindForm
+ //
+ this.AcceptButton = this.btnFind;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnClose;
+ this.ClientSize = new System.Drawing.Size(386, 74);
+ this.ControlBox = false;
+ this.Controls.Add(this.btnClose);
+ this.Controls.Add(this.btnFind);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.edPattern);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.Name = "FindForm";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "FindForm";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox edPattern;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btnFind;
+ private System.Windows.Forms.Button btnClose;
+ }
+}
\ No newline at end of file diff --git a/ExpressProfiler/ExpressProfiler/FindForm.cs b/ExpressProfiler/ExpressProfiler/FindForm.cs new file mode 100644 index 0000000..2495fc7 --- /dev/null +++ b/ExpressProfiler/ExpressProfiler/FindForm.cs @@ -0,0 +1,25 @@ +using System;
+using System.Windows.Forms;
+
+namespace ExpressProfiler
+{
+ public partial class FindForm : Form
+ {
+ internal MainForm mainForm;
+ public FindForm()
+ {
+ InitializeComponent();
+ }
+
+ private void btnFind_Click(object sender, EventArgs e)
+ {
+ mainForm.lastpattern = edPattern.Text;
+ mainForm.PerformFind();
+ }
+
+ private void edPattern_TextChanged(object sender, EventArgs e)
+ {
+ mainForm.lastpos = -1;
+ }
+ }
+}
diff --git a/ExpressProfiler/ExpressProfiler/FindForm.resx b/ExpressProfiler/ExpressProfiler/FindForm.resx new file mode 100644 index 0000000..5ea0895 --- /dev/null +++ b/ExpressProfiler/ExpressProfiler/FindForm.resx @@ -0,0 +1,120 @@ +<?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=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>
\ No newline at end of file diff --git a/ExpressProfiler/ExpressProfiler/MainForm.Designer.cs b/ExpressProfiler/ExpressProfiler/MainForm.Designer.cs index e0c3a61..5b9997a 100644 --- a/ExpressProfiler/ExpressProfiler/MainForm.Designer.cs +++ b/ExpressProfiler/ExpressProfiler/MainForm.Designer.cs @@ -32,11 +32,13 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+ this.tbScroll = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.tbStart = new System.Windows.Forms.ToolStripButton();
this.tbPause = new System.Windows.Forms.ToolStripButton();
this.tbStop = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
- this.tbScroll = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
this.edServer = new System.Windows.Forms.ToolStripTextBox();
@@ -56,16 +58,35 @@ this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.mnBatchStarting = new System.Windows.Forms.ToolStripMenuItem();
this.mnBatchCompleted = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
+ this.edDuration = new System.Windows.Forms.ToolStripTextBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.reTextData = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
- this.edDuration = new System.Windows.Forms.ToolStripTextBox();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.copyAllToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.copySelectedToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.startTraceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pauseTraceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.stopTraceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
+ this.extractAllEventsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.extractSelectedEventsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
+ this.clearTraceWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.findNextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
+ this.contextMenuStrip1.SuspendLayout();
+ this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// statusStrip1
@@ -79,13 +100,13 @@ // toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripButton1,
+ this.toolStripSeparator5,
+ this.tbScroll,
+ this.toolStripSeparator1,
this.tbStart,
this.tbPause,
this.tbStop,
- this.toolStripSeparator1,
- this.tbScroll,
- this.toolStripSeparator5,
- this.toolStripButton1,
this.toolStripSeparator2,
this.toolStripLabel1,
this.edServer,
@@ -99,12 +120,45 @@ this.cbSelectEvents,
this.toolStripLabel4,
this.edDuration});
- this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+ this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(979, 25);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
+ // toolStripButton1
+ //
+ this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
+ this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Silver;
+ this.toolStripButton1.Name = "toolStripButton1";
+ this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
+ this.toolStripButton1.Text = "Clear trace";
+ this.toolStripButton1.ToolTipText = "Clear trace\r\nCtrl+Shift+Del";
+ this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
+ //
+ // toolStripSeparator5
+ //
+ this.toolStripSeparator5.Name = "toolStripSeparator5";
+ this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
+ //
+ // tbScroll
+ //
+ this.tbScroll.Checked = true;
+ this.tbScroll.CheckOnClick = true;
+ this.tbScroll.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.tbScroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.tbScroll.Image = ((System.Drawing.Image)(resources.GetObject("tbScroll.Image")));
+ this.tbScroll.ImageTransparentColor = System.Drawing.Color.Transparent;
+ this.tbScroll.Name = "tbScroll";
+ this.tbScroll.Size = new System.Drawing.Size(23, 22);
+ this.tbScroll.Text = "Auto scroll window";
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
// tbStart
//
this.tbStart.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -135,23 +189,6 @@ this.tbStop.Text = "Stop trace";
this.tbStop.Click += new System.EventHandler(this.toolStripButton2_Click);
//
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
- //
- // tbScroll
- //
- this.tbScroll.Checked = true;
- this.tbScroll.CheckOnClick = true;
- this.tbScroll.CheckState = System.Windows.Forms.CheckState.Checked;
- this.tbScroll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.tbScroll.Image = ((System.Drawing.Image)(resources.GetObject("tbScroll.Image")));
- this.tbScroll.ImageTransparentColor = System.Drawing.Color.Transparent;
- this.tbScroll.Name = "tbScroll";
- this.tbScroll.Size = new System.Drawing.Size(23, 22);
- this.tbScroll.Text = "Auto scroll window";
- //
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
@@ -225,8 +262,8 @@ this.cbSelectEvents.Image = ((System.Drawing.Image)(resources.GetObject("cbSelectEvents.Image")));
this.cbSelectEvents.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cbSelectEvents.Name = "cbSelectEvents";
- this.cbSelectEvents.Size = new System.Drawing.Size(60, 22);
- this.cbSelectEvents.Text = "Options";
+ this.cbSelectEvents.Size = new System.Drawing.Size(56, 22);
+ this.cbSelectEvents.Text = "Events";
//
// mnExistingConnection
//
@@ -284,18 +321,30 @@ this.mnBatchCompleted.Text = "Batch:Completed";
this.mnBatchCompleted.Click += new System.EventHandler(this.existingConnectionsToolStripMenuItem_Click);
//
+ // toolStripLabel4
+ //
+ this.toolStripLabel4.Name = "toolStripLabel4";
+ this.toolStripLabel4.Size = new System.Drawing.Size(87, 22);
+ this.toolStripLabel4.Text = "Duration, ms >=";
+ //
+ // edDuration
+ //
+ this.edDuration.Name = "edDuration";
+ this.edDuration.Size = new System.Drawing.Size(100, 25);
+ this.edDuration.Text = "0";
+ //
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer1.Location = new System.Drawing.Point(0, 25);
+ this.splitContainer1.Location = new System.Drawing.Point(0, 49);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.reTextData);
- this.splitContainer1.Size = new System.Drawing.Size(979, 463);
- this.splitContainer1.SplitterDistance = 297;
+ this.splitContainer1.Size = new System.Drawing.Size(979, 439);
+ this.splitContainer1.SplitterDistance = 281;
this.splitContainer1.TabIndex = 4;
//
// reTextData
@@ -304,7 +353,7 @@ this.reTextData.Location = new System.Drawing.Point(0, 0);
this.reTextData.Name = "reTextData";
this.reTextData.ReadOnly = true;
- this.reTextData.Size = new System.Drawing.Size(979, 162);
+ this.reTextData.Size = new System.Drawing.Size(979, 154);
this.reTextData.TabIndex = 4;
this.reTextData.Text = "";
//
@@ -313,33 +362,155 @@ this.timer1.Interval = 250;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
- // toolStripButton1
+ // contextMenuStrip1
//
- this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
- this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Silver;
- this.toolStripButton1.Name = "toolStripButton1";
- this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
- this.toolStripButton1.Text = "Clear trace";
- this.toolStripButton1.ToolTipText = "Clear trace\r\nCtrl+Shift+Del";
- this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
+ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.copyAllToClipboardToolStripMenuItem,
+ this.copySelectedToClipboardToolStripMenuItem});
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(238, 48);
//
- // toolStripSeparator5
+ // copyAllToClipboardToolStripMenuItem
//
- this.toolStripSeparator5.Name = "toolStripSeparator5";
- this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
+ this.copyAllToClipboardToolStripMenuItem.Name = "copyAllToClipboardToolStripMenuItem";
+ this.copyAllToClipboardToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.copyAllToClipboardToolStripMenuItem.Text = "Copy all events to clipboard";
+ this.copyAllToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyAllToClipboardToolStripMenuItem_Click);
//
- // toolStripLabel4
+ // copySelectedToClipboardToolStripMenuItem
//
- this.toolStripLabel4.Name = "toolStripLabel4";
- this.toolStripLabel4.Size = new System.Drawing.Size(87, 22);
- this.toolStripLabel4.Text = "Duration, ms >=";
+ this.copySelectedToClipboardToolStripMenuItem.Name = "copySelectedToClipboardToolStripMenuItem";
+ this.copySelectedToClipboardToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.copySelectedToClipboardToolStripMenuItem.Text = "Copy selected events to clipboard";
+ this.copySelectedToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copySelectedToClipboardToolStripMenuItem_Click);
//
- // edDuration
+ // menuStrip1
//
- this.edDuration.Name = "edDuration";
- this.edDuration.Size = new System.Drawing.Size(100, 25);
- this.edDuration.Text = "0";
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileToolStripMenuItem,
+ this.editToolStripMenuItem});
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Size = new System.Drawing.Size(979, 24);
+ this.menuStrip1.TabIndex = 5;
+ this.menuStrip1.Text = "menuStrip1";
+ //
+ // fileToolStripMenuItem
+ //
+ this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.startTraceToolStripMenuItem,
+ this.pauseTraceToolStripMenuItem,
+ this.stopTraceToolStripMenuItem,
+ this.toolStripMenuItem3,
+ this.extractAllEventsToolStripMenuItem,
+ this.extractSelectedEventsToolStripMenuItem,
+ this.toolStripMenuItem5,
+ this.exitToolStripMenuItem});
+ this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
+ this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
+ this.fileToolStripMenuItem.Text = "File";
+ //
+ // startTraceToolStripMenuItem
+ //
+ this.startTraceToolStripMenuItem.Name = "startTraceToolStripMenuItem";
+ this.startTraceToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.startTraceToolStripMenuItem.Text = "Start trace";
+ this.startTraceToolStripMenuItem.Click += new System.EventHandler(this.startTraceToolStripMenuItem_Click);
+ //
+ // pauseTraceToolStripMenuItem
+ //
+ this.pauseTraceToolStripMenuItem.Name = "pauseTraceToolStripMenuItem";
+ this.pauseTraceToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.pauseTraceToolStripMenuItem.Text = "Pause trace";
+ this.pauseTraceToolStripMenuItem.Click += new System.EventHandler(this.pauseTraceToolStripMenuItem_Click);
+ //
+ // stopTraceToolStripMenuItem
+ //
+ this.stopTraceToolStripMenuItem.Name = "stopTraceToolStripMenuItem";
+ this.stopTraceToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.stopTraceToolStripMenuItem.Text = "Stop trace";
+ this.stopTraceToolStripMenuItem.Click += new System.EventHandler(this.stopTraceToolStripMenuItem_Click);
+ //
+ // toolStripMenuItem3
+ //
+ this.toolStripMenuItem3.Name = "toolStripMenuItem3";
+ this.toolStripMenuItem3.Size = new System.Drawing.Size(234, 6);
+ //
+ // extractAllEventsToolStripMenuItem
+ //
+ this.extractAllEventsToolStripMenuItem.Name = "extractAllEventsToolStripMenuItem";
+ this.extractAllEventsToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.extractAllEventsToolStripMenuItem.Text = "Copy all events to clipboard";
+ this.extractAllEventsToolStripMenuItem.Click += new System.EventHandler(this.extractAllEventsToolStripMenuItem_Click);
+ //
+ // extractSelectedEventsToolStripMenuItem
+ //
+ this.extractSelectedEventsToolStripMenuItem.Name = "extractSelectedEventsToolStripMenuItem";
+ this.extractSelectedEventsToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.extractSelectedEventsToolStripMenuItem.Text = "Copy selected events to clipboard";
+ this.extractSelectedEventsToolStripMenuItem.Click += new System.EventHandler(this.extractSelectedEventsToolStripMenuItem_Click);
+ //
+ // editToolStripMenuItem
+ //
+ this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.selectAllToolStripMenuItem,
+ this.findToolStripMenuItem,
+ this.findNextToolStripMenuItem,
+ this.toolStripMenuItem4,
+ this.clearTraceWindowToolStripMenuItem});
+ this.editToolStripMenuItem.Name = "editToolStripMenuItem";
+ this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
+ this.editToolStripMenuItem.Text = "Edit";
+ //
+ // findToolStripMenuItem
+ //
+ this.findToolStripMenuItem.Name = "findToolStripMenuItem";
+ this.findToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
+ this.findToolStripMenuItem.Size = new System.Drawing.Size(247, 22);
+ this.findToolStripMenuItem.Text = "Find...";
+ this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click);
+ //
+ // toolStripMenuItem4
+ //
+ this.toolStripMenuItem4.Name = "toolStripMenuItem4";
+ this.toolStripMenuItem4.Size = new System.Drawing.Size(244, 6);
+ //
+ // clearTraceWindowToolStripMenuItem
+ //
+ this.clearTraceWindowToolStripMenuItem.Name = "clearTraceWindowToolStripMenuItem";
+ this.clearTraceWindowToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.Delete)));
+ this.clearTraceWindowToolStripMenuItem.Size = new System.Drawing.Size(247, 22);
+ this.clearTraceWindowToolStripMenuItem.Text = "Clear Trace Window";
+ this.clearTraceWindowToolStripMenuItem.Click += new System.EventHandler(this.clearTraceWindowToolStripMenuItem_Click);
+ //
+ // selectAllToolStripMenuItem
+ //
+ this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
+ this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
+ this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(247, 22);
+ this.selectAllToolStripMenuItem.Text = "Select all";
+ this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
+ //
+ // findNextToolStripMenuItem
+ //
+ this.findNextToolStripMenuItem.Name = "findNextToolStripMenuItem";
+ this.findNextToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
+ this.findNextToolStripMenuItem.Size = new System.Drawing.Size(247, 22);
+ this.findNextToolStripMenuItem.Text = "Find next";
+ this.findNextToolStripMenuItem.Click += new System.EventHandler(this.findNextToolStripMenuItem_Click);
+ //
+ // toolStripMenuItem5
+ //
+ this.toolStripMenuItem5.Name = "toolStripMenuItem5";
+ this.toolStripMenuItem5.Size = new System.Drawing.Size(234, 6);
+ //
+ // exitToolStripMenuItem
+ //
+ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(237, 22);
+ this.exitToolStripMenuItem.Text = "Exit";
+ this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// MainForm
//
@@ -349,6 +520,8 @@ this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.statusStrip1);
+ this.Controls.Add(this.menuStrip1);
+ this.MainMenuStrip = this.menuStrip1;
this.Name = "MainForm";
this.Text = "Express Profiler v1.0";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
@@ -357,6 +530,9 @@ this.toolStrip1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
+ this.contextMenuStrip1.ResumeLayout(false);
+ this.menuStrip1.ResumeLayout(false);
+ this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -370,7 +546,6 @@ private System.Windows.Forms.ToolStripButton tbStop;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.RichTextBox reTextData;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton tbScroll;
private System.Windows.Forms.ToolStripButton tbPause;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
@@ -397,6 +572,26 @@ private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripLabel toolStripLabel4;
private System.Windows.Forms.ToolStripTextBox edDuration;
+ private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem copyAllToClipboardToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem copySelectedToClipboardToolStripMenuItem;
+ private System.Windows.Forms.MenuStrip menuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem startTraceToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pauseTraceToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem stopTraceToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem clearTraceWindowToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
+ private System.Windows.Forms.ToolStripMenuItem extractAllEventsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem extractSelectedEventsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem findToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
+ private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem findNextToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
+ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
}
}
diff --git a/ExpressProfiler/ExpressProfiler/MainForm.cs b/ExpressProfiler/ExpressProfiler/MainForm.cs index ac0bd42..0a40fb6 100644 --- a/ExpressProfiler/ExpressProfiler/MainForm.cs +++ b/ExpressProfiler/ExpressProfiler/MainForm.cs @@ -6,8 +6,11 @@ using System.Collections.Generic; using System.Data;
using System.Data.SqlClient;
using System.Globalization;
+using System.IO;
+using System.Text;
using System.Threading;
using System.Windows.Forms;
+using System.Xml;
namespace ExpressProfiler
@@ -27,21 +30,36 @@ namespace ExpressProfiler private readonly ProfilerEvent m_EventStarted = new ProfilerEvent();
private readonly ProfilerEvent m_EventStopped = new ProfilerEvent();
private readonly ProfilerEvent m_EventPaused = new ProfilerEvent();
- private readonly List<ListViewItem> m_Cached = new List<ListViewItem>(1024);
+ internal readonly List<ListViewItem> m_Cached = new List<ListViewItem>(1024);
private readonly Dictionary<string,ListViewItem> m_itembysql = new Dictionary<string, ListViewItem>();
private string m_servername = "";
private string m_username = "";
private string m_userpassword = "";
private int m_maxEvents = 1000;
+ internal int lastpos = -1;
+ internal string lastpattern = "";
private ListViewNF lvEvents;
Queue<ProfilerEvent> m_events = new Queue<ProfilerEvent>(10);
- private bool m_autostart = false;
+ private bool m_autostart;
+ private bool dontUpdateSource;
public MainForm()
{
InitializeComponent();
InitLV();
- Text = "Express Profiler v1.3";
+ Text = "Express Profiler v1.4";
+ edPassword.TextBox.PasswordChar = '*';
+ m_servername = Properties.Settings.Default.ServerName;
+ m_username = Properties.Settings.Default.UserName;
+ edDuration.Text = Properties.Settings.Default.Duration.ToString(CultureInfo.InvariantCulture);
+ int eventMask = Properties.Settings.Default.EventMask;
+ mnExistingConnection.Checked = (eventMask & 1) != 0;
+ mnLoginLogout.Checked = (eventMask & 2) != 0;
+ mnRPCStarting.Checked = (eventMask & 4) != 0;
+ mnRPCCompleted.Checked = (eventMask & 8) != 0;
+ mnBatchStarting.Checked = (eventMask & 16) != 0;
+ mnBatchCompleted.Checked = (eventMask & 32) != 0;
+
ParseCommandLine();
edServer.Text = m_servername;
edUser.Text = m_username;
@@ -107,8 +125,11 @@ namespace ExpressProfiler private void UpdateButtons()
{
tbStart.Enabled = m_ProfilingState==ProfilingStateEnum.psStopped||m_ProfilingState==ProfilingStateEnum.psPaused;
+ startTraceToolStripMenuItem.Enabled = tbStart.Enabled;
tbStop.Enabled = m_ProfilingState==ProfilingStateEnum.psPaused||m_ProfilingState==ProfilingStateEnum.psProfiling;
+ stopTraceToolStripMenuItem.Enabled = tbStop.Enabled;
tbPause.Enabled = m_ProfilingState == ProfilingStateEnum.psProfiling;
+ pauseTraceToolStripMenuItem.Enabled = tbPause.Enabled;
timer1.Enabled = m_ProfilingState == ProfilingStateEnum.psProfiling;
edServer.Enabled = m_ProfilingState == ProfilingStateEnum.psStopped;
tbAuth.Enabled = m_ProfilingState == ProfilingStateEnum.psStopped;
@@ -156,9 +177,23 @@ namespace ExpressProfiler lvEvents.Columns.Add("SPID", 80).TextAlign = HorizontalAlignment.Right;
lvEvents.Columns.Add("#", 53).TextAlign = HorizontalAlignment.Right;
lvEvents.ColumnClick += lvEvents_ColumnClick;
+ lvEvents.SelectedIndexChanged += lvEvents_SelectedIndexChanged;
+ lvEvents.VirtualItemsSelectionRangeChanged += LvEventsOnVirtualItemsSelectionRangeChanged;
+ lvEvents.MultiSelect = true;
+ lvEvents.ContextMenuStrip = contextMenuStrip1;
splitContainer1.Panel1.Controls.Add(lvEvents);
}
+ private void LvEventsOnVirtualItemsSelectionRangeChanged(object sender, ListViewVirtualItemsSelectionRangeChangedEventArgs listViewVirtualItemsSelectionRangeChangedEventArgs)
+ {
+ UpdateSourceBox();
+ }
+
+ void lvEvents_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ UpdateSourceBox();
+ }
+
void lvEvents_ColumnClick(object sender, ColumnClickEventArgs e)
{
}
@@ -197,17 +232,16 @@ namespace ExpressProfiler , m_EventCount.ToString(CultureInfo.InvariantCulture),"","",""
}
);
- lvi.Tag = new ProfilerEvent();
+ lvi.Tag = evt;//new ProfilerEvent();
m_Cached.Add(lvi);
if (last)
{
lvEvents.VirtualListSize = m_Cached.Count;
+ lvEvents.SelectedIndices.Clear();
if (tbScroll.Checked)
{
- lvEvents.Items[m_Cached.Count - 1].Focused = true;
- lvEvents.Items[m_Cached.Count - 1].Selected = true;
- listView1_ItemSelectionChanged_1(lvEvents, null);
- lvEvents.EnsureVisible(m_Cached.Count - 1);
+ FocusLVI(lvEvents.Items[m_Cached.Count - 1]);
+// lvEvents.EnsureVisible(m_Cached.Count - 1);
}
lvEvents.Invalidate(lvi.Bounds);
@@ -215,6 +249,14 @@ namespace ExpressProfiler }
}
+ internal void FocusLVI(ListViewItem lvi)
+ {
+ lvi.Focused = true;
+ lvi.Selected = true;
+ listView1_ItemSelectionChanged_1(lvEvents, null);
+ lvEvents.EnsureVisible(lvEvents.Items.IndexOf(lvi));
+ }
+
private void ProfilerThread(Object state)
{
while (!m_NeedStop&&m_Rdr.TraceIsActive)
@@ -308,6 +350,7 @@ namespace ExpressProfiler {
m_Rdr.SetFilter(ProfilerEventColumns.Duration, LogicalOperators.AND, ComparisonOperators.GreaterThanOrEqual, dur*1000);
}
+ Properties.Settings.Default.Duration = dur >= 0 ? dur : 0;
}
m_Cmd.Connection = m_Conn;
m_Cmd.CommandTimeout = 0;
@@ -317,6 +360,19 @@ namespace ExpressProfiler m_itembysql.Clear();
lvEvents.VirtualListSize = 0;
StartProfilerThread();
+ m_servername = edServer.Text;
+ m_username = edUser.Text;
+ Properties.Settings.Default.ServerName = m_servername;
+ Properties.Settings.Default.UserName = tbAuth.SelectedIndex==0?"":m_username;
+ int eventMask = 0;
+ if (mnExistingConnection.Checked) eventMask |= 1;
+ if (mnLoginLogout.Checked) eventMask |= 2;
+ if (mnRPCStarting.Checked) eventMask |= 4;
+ if (mnRPCCompleted.Checked) eventMask |= 8;
+ if (mnBatchStarting.Checked) eventMask |= 16;
+ if (mnBatchCompleted.Checked) eventMask |= 32;
+ Properties.Settings.Default.EventMask = eventMask;
+ Properties.Settings.Default.Save();
UpdateButtons();
}
@@ -368,16 +424,23 @@ namespace ExpressProfiler private void listView1_ItemSelectionChanged_1(object sender, ListViewItemSelectionChangedEventArgs e)
{
- ListViewItem lvi = lvEvents.FocusedItem;
- if (lvi == null)
- {
- reTextData.Text = "";
- }
- else
+
+ UpdateSourceBox();
+ }
+
+ private void UpdateSourceBox()
+ {
+ if (dontUpdateSource) return;
+ StringBuilder sb = new StringBuilder();
+ foreach (int i in lvEvents.SelectedIndices)
{
- m_Lex.FillRichEdit(reTextData, lvi.SubItems[1].Text);
+ ListViewItem lv = m_Cached[i];
+ if (lv.SubItems[1].Text != "")
+ {
+ sb.AppendFormat("{0}\r\ngo\r\n", lv.SubItems[1].Text);
+ }
}
-
+ m_Lex.FillRichEdit(reTextData, sb.ToString());
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
@@ -411,14 +474,34 @@ namespace ExpressProfiler UpdateButtons();
}
- private void lvEvents_KeyDown(object sender, KeyEventArgs e)
+
+ internal void SelectAllEvents(bool select)
{
- if (e.Control &&e.Shift && e.KeyCode == Keys.Delete)
+ lock (m_Cached)
{
- ClearTrace();
+ lvEvents.BeginUpdate();
+ dontUpdateSource = true;
+ try
+ {
+
+ foreach (ListViewItem lv in m_Cached)
+ {
+ lv.Selected = select;
+ }
+ }
+ finally
+ {
+ dontUpdateSource = false;
+ UpdateSourceBox();
+ lvEvents.EndUpdate();
+ }
}
}
+ private void lvEvents_KeyDown(object sender, KeyEventArgs e)
+ {
+ }
+
private void MainForm_Load(object sender, EventArgs e)
{
@@ -453,7 +536,7 @@ namespace ExpressProfiler private void existingConnectionsToolStripMenuItem_Click(object sender, EventArgs e)
{
- (sender as ToolStripMenuItem).Checked = !(sender as ToolStripMenuItem).Checked;
+ ((ToolStripMenuItem) sender).Checked = !((ToolStripMenuItem) sender).Checked;
UpdateButtons();
}
@@ -479,5 +562,166 @@ namespace ExpressProfiler ClearTrace();
}
+ private void NewAttribute(XmlNode node, string name, string value)
+ {
+ XmlAttribute attr = node.OwnerDocument.CreateAttribute(name);
+ attr.Value = value;
+ node.Attributes.Append(attr);
+ }
+
+ private void copyAllToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CopyEventsToClipboard(false);
+ }
+
+ private void CopyEventsToClipboard(bool copySelected)
+ {
+ XmlDocument doc = new XmlDocument();
+ XmlNode root = doc.CreateElement("events");
+ lock (m_Cached)
+ {
+ if (copySelected)
+ {
+ foreach (int i in lvEvents.SelectedIndices)
+ {
+ CreateEventRow((ProfilerEvent)(m_Cached[i]).Tag, root);
+ }
+ }
+ else
+ {
+ foreach (var i in m_Cached)
+ {
+ CreateEventRow((ProfilerEvent)i.Tag, root);
+ }
+ }
+ }
+ doc.AppendChild(root);
+ doc.PreserveWhitespace = true;
+ using (StringWriter writer = new StringWriter())
+ {
+ XmlTextWriter textWriter = new XmlTextWriter(writer) {Formatting = Formatting.Indented};
+ doc.Save(textWriter);
+ Clipboard.SetText(writer.ToString());
+ }
+ MessageBox.Show("Event(s) data copied to clipboard", "Information", MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ }
+
+ private void CreateEventRow(ProfilerEvent evt, XmlNode root)
+ {
+ XmlNode row = root.OwnerDocument.CreateElement("event");
+ NewAttribute(row, "EventClass", evt.EventClass.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "CPU", evt.CPU.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "Reads", evt.Reads.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "Writes", evt.Writes.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "Duration", evt.Duration.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "SPID", evt.SPID.ToString(CultureInfo.InvariantCulture));
+ NewAttribute(row, "LoginName", evt.LoginName);
+ row.InnerText = evt.TextData;
+ root.AppendChild(row);
+ }
+
+ private void copySelectedToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CopyEventsToClipboard(true);
+ }
+
+ private void clearTraceWindowToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ClearTrace();
+ }
+
+ private void extractAllEventsToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CopyEventsToClipboard(false);
+ }
+
+ private void extractSelectedEventsToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CopyEventsToClipboard(true);
+ }
+
+ private void startTraceToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ StartProfiling();
+ }
+
+ private void pauseTraceToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ PauseProfiling();
+ }
+
+ private void stopTraceToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ StopProfiling();
+ }
+
+ private void findToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ DoFind();
+ }
+
+ private void DoFind()
+ {
+ if (m_ProfilingState == ProfilingStateEnum.psProfiling)
+ {
+ MessageBox.Show("You cannot find when trace is running", "ExpressProfiler", MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ return;
+ }
+ using (FindForm f = new FindForm())
+ {
+ f.mainForm = this;
+ f.ShowDialog();
+ }
+ }
+
+ private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (lvEvents.Focused && (m_ProfilingState!=ProfilingStateEnum.psProfiling))
+ {
+ SelectAllEvents(true);
+ }
+ else
+ if (reTextData.Focused)
+ {
+ reTextData.SelectAll();
+ }
+ }
+
+ internal void PerformFind()
+ {
+ if(String.IsNullOrEmpty(lastpattern)) return;
+ for (int i = lastpos = lvEvents.Items.IndexOf(lvEvents.FocusedItem) + 1; i < m_Cached.Count; i++)
+ {
+ ListViewItem lvi = m_Cached[i];
+ ProfilerEvent evt = (ProfilerEvent)lvi.Tag;
+ if (evt.TextData.Contains(lastpattern))
+ {
+ lvi.Focused = true;
+ lastpos = i;
+ SelectAllEvents(false);
+ FocusLVI(lvi);
+ return;
+ }
+ }
+ MessageBox.Show(String.Format("Failed to find \"{0}\". Searched to the end of data. ", lastpattern), "ExpressProfiler", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+
+ private void findNextToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (m_ProfilingState == ProfilingStateEnum.psProfiling)
+ {
+ MessageBox.Show("You cannot find when trace is running", "ExpressProfiler", MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ return;
+ }
+ PerformFind();
+ }
+
+ private void exitToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
}
}
diff --git a/ExpressProfiler/ExpressProfiler/MainForm.resx b/ExpressProfiler/ExpressProfiler/MainForm.resx index bd2e8e1..8ebc2b4 100644 --- a/ExpressProfiler/ExpressProfiler/MainForm.resx +++ b/ExpressProfiler/ExpressProfiler/MainForm.resx @@ -124,68 +124,74 @@ <value>127, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <data name="tbStart.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABqSURBVDhPY2AYlGDKzLz/FDns3LUd/1t64sk3ZMrqiv/n
- vu8l3xCQAVPu9ZBvyNwpdWADYJhk74BdAHWF/2yn/yBcke1GfJjADCBLMyj6QAaQrRnZAJKcjZxwQIFG
- tmaQQRRppigJD4hmAP9qXIqBzBMfAAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADhSURBVDhPYxj8oH3Orv81k7b9T6tb9r+gbeN/qDBxAKQZ
+ Br5///5/+9HrYIMgsgQAimYgfv/+G5jeuvcaYUOQNYN0PXv//f+Ne2/AGAT8UjtwG4DqbEzNle2z/1t5
+ JWM3gJDNIM3ZVZP/q1gFYRpAjM0wzd1zT6IaANIM0gQD2DSDAg6rZhAACT579v3/vWfvwZpBhr2Hmgiz
+ Wc3KC7tmEAAlkLVbz/1fDMSguAbZDNIP0gzCeDXDAChqQDaBFILwlKX7wJpxOhsbALnALbL8f1BKBZjm
+ 4ODAi6HaBhQwMAAAQVVZ8PPX9HsAAAAASUVORK5CYII=
</value>
</data>
- <data name="tbPause.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <data name="tbScroll.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACDSURBVDhPY2AYfkDBa9p/6+TN/1lMO/7DfAdig8RdUlfD
- xXD6HKSwZ87//yJOk+GKQWyQmFbgfOIMqOx7gmEASIxoA5Lqz2EYABIDuY5gpIEUeWTvxAgDkBjRBmAL
- RJAY0QaAFGKLBeSAxekVkCKwZtU8hH+BbJAYUdFIMJBGFWCEAADFoWPyjsXXjgAAAABJRU5ErkJggg==
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFRSURBVDhPY6Aa6Fjx8j86Lp3z8n/GlDf/M3of/g9tu//f
+ v/r+f9viJ2AM1YYAIA2rjv78P23HXzhuW/0HjKuX/vqfN/s7HHuU3MQ0oHPrH7CtU9Y+AdsMth2LzSBs
+ lnIK04DFW89hCkLB9+///78H4mdA4t6z7/+tvLJxG7D/7L3/MAzibz96/f/Wvdf+r9lzHWzA1n1n8BuA
+ DtBtX7f1KGEXgGwFYZBmkM1rgXLI4QLCSfVoFqK7AN3myr4n8FgCxYxX8UFUA5auPQoWQPczyOCpqy+D
+ bQVpBkVp1LTv/62TN6MaMGfpfrDAixcv/t+49waMz197Ag7M3edegZ0Mshmk2af1F6YBU5Zu/W/olYyB
+ kf0Osx2ULrQC52MagguA/AtLhaCE5VV8DqwZZAhUCWFgELYBrBmUjD2yd5KmGQZAhoCSMVmaYQBkCJQJ
+ BAwMAA9vkk4b7YbeAAAAAElFTkSuQmCC
</value>
</data>
- <data name="tbStop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <data name="tbStart.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABoSURBVDhPY2AYnmCDgcX/g85ucAziwzBRPgZpfl5WhoHv
- ZWf/J8qAy+ERWDUTbQC6C0AawTg5mTgXIBuA0Jz9/xqpBiDbDLId5DWiwgDkAmTNIJuvRZFjQDLE2TDN
- RLuAKGeOKoKHAADj6ZD8b/5D1wAAAABJRU5ErkJggg==
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABkSURBVDhPYxicYMrMvP9QJnng3LUd/1t64sk3ZMrqiv/n
+ vu8l3xCQAVPu9ZBvyNwpdWADYJhkQ8AugLrCf7YTGFdkuxFvCMwAsjSDAEWaQQBmAFmaQQAUaGRrBgGK
+ NA81wMAAAP9qXIrkhO09AAAAAElFTkSuQmCC
</value>
</data>
- <data name="tbScroll.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <data name="tbPause.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFXSURBVDhPY2CgFuhY8fI/Oi6d8/J/xpQ3/zN6H/4Pbbv/
- 37/6/n/b4idgjGEvSPOqoz//T9vxF47bVv/5D8LVS3/9z5v9HY49Sm5iGtC59Q/YBVPWPvkPshlsOxab
- QbabpZzCNGDx1nOYglB3fv/+//97IH4GJO49+/7fyisbtwH7z977D8Mg/duPXv+/de+1/2v2XAcbsHXf
- GfwGoAcOuu3rth4l7AKQrSAM0gyyeS3Qe8jhAgqbpHo0L6OHAbrNlX1P4LEEihmv4oOo4bB07VGwALqf
- QQZPXX0ZHCOgKAZFadS07/+tkzejGjBn6X6wwIsXL/7fuPcGjM9fewIO0N3nXoGdDLIZpNmn9RemAVOW
- bv1v6JWMgZH9DrMdlCK1AudjGoIrW4D8C0uJoCTtVXwOrBlkCNFZySBsAzg/gJKxR/ZO0jTDbAEZAkrG
- JNmM7kSQIchiAA9vkk6XhwD1AAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACBSURBVDhPYxiGQMFr2n/r5M3/WUw7/kOFGEBskLhL6mq4
+ GE4AUtgz5/9/EafJcMUgNkhMK3A+cQZU9j3BMAAkRrQBSfXnMAwAiYHkoEK4AUiRR/ZOjDAAiRFtALZA
+ BIkRbQAIoxsAEkP2Fk4AUgTWrJqHUAxkg8SIisZRQCpgYAAAxaFj8h9E5GYAAAAASUVORK5CYII=
</value>
</data>
- <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <data name="tbStop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADrSURBVDhPY2AY9KB9zq7/NZO2/U+rW/a/oG3jf5IcDNIM
- A9+/f/+//eh1sEFEGYKiGWjK+/ff/n8H0lv3XiNsCLJmkK5n77//v3HvDRiDgF9qB25XoDobU3Nl++z/
- Vl7J2A0gZDNIc3bV5P8qVkGYBhBjM0xz99yTqAaANAMDGQ7Q/QyyGRT6IJsxNIOiBCT47Nn3//eevQcH
- GMiw91ATYc5Ws/LCrhlkACiBrN167v9iIAbFNSi0QfpBmkEYr2ZYogBFDciPINeA8JSl+8CacTobW2oC
- ucAtsvx/UEoFmObg4MCLiUqRNFcEAEFVWfCcnU3PAAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABiSURBVDhPYximYIOBxf+Dzm5wDOLDMFQJfgDS9LysDAPf
+ y84mzoDL4RFYNRNtALoLYJrvJSeTbgBCc/b/a6QagGwzCIO8BlWCH4AMQNYMsvlaFDkGQJ0N00y0AaOA
+ FMDAAADj6ZD8CGtfSAAAAABJRU5ErkJggg==
</value>
</data>
<data name="cbSelectEvents.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
- ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
- HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
- rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
- TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
- oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
- 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
- xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
- LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
- KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>226, 17</value>
</metadata>
+ <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>309, 17</value>
+ </metadata>
+ <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>454, 17</value>
+ </metadata>
</root>
\ No newline at end of file diff --git a/ExpressProfiler/ExpressProfiler/Properties/AssemblyInfo.cs b/ExpressProfiler/ExpressProfiler/Properties/AssemblyInfo.cs index 5a87604..d1b2bdb 100644 --- a/ExpressProfiler/ExpressProfiler/Properties/AssemblyInfo.cs +++ b/ExpressProfiler/ExpressProfiler/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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.3.*")]
-[assembly: AssemblyFileVersion("1.3")]
+[assembly: AssemblyVersion("1.4.*")]
+[assembly: AssemblyFileVersion("1.4")]
diff --git a/ExpressProfiler/ExpressProfiler/Properties/Settings.Designer.cs b/ExpressProfiler/ExpressProfiler/Properties/Settings.Designer.cs index a474bf4..8a024c0 100644 --- a/ExpressProfiler/ExpressProfiler/Properties/Settings.Designer.cs +++ b/ExpressProfiler/ExpressProfiler/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.488
+// Runtime Version:4.0.30319.18034
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22,5 +22,53 @@ namespace ExpressProfiler.Properties { return defaultInstance;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute(".\\SQLExpress")]
+ public string ServerName {
+ get {
+ return ((string)(this["ServerName"]));
+ }
+ set {
+ this["ServerName"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string UserName {
+ get {
+ return ((string)(this["UserName"]));
+ }
+ set {
+ this["UserName"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public int Duration {
+ get {
+ return ((int)(this["Duration"]));
+ }
+ set {
+ this["Duration"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("40")]
+ public int EventMask {
+ get {
+ return ((int)(this["EventMask"]));
+ }
+ set {
+ this["EventMask"] = value;
+ }
+ }
}
}
diff --git a/ExpressProfiler/ExpressProfiler/Properties/Settings.settings b/ExpressProfiler/ExpressProfiler/Properties/Settings.settings index abf36c5..7907331 100644 --- a/ExpressProfiler/ExpressProfiler/Properties/Settings.settings +++ b/ExpressProfiler/ExpressProfiler/Properties/Settings.settings @@ -1,7 +1,18 @@ <?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>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="ExpressProfiler.Properties" GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="ServerName" Type="System.String" Scope="User">
+ <Value Profile="(Default)">.\SQLExpress</Value>
+ </Setting>
+ <Setting Name="UserName" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="Duration" Type="System.Int32" Scope="User">
+ <Value Profile="(Default)">0</Value>
+ </Setting>
+ <Setting Name="EventMask" Type="System.Int32" Scope="User">
+ <Value Profile="(Default)">40</Value>
+ </Setting>
+ </Settings>
+</SettingsFile>
\ No newline at end of file diff --git a/ExpressProfiler/ExpressProfiler/app.config b/ExpressProfiler/ExpressProfiler/app.config new file mode 100644 index 0000000..6a29f5d --- /dev/null +++ b/ExpressProfiler/ExpressProfiler/app.config @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="ExpressProfiler.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+ <userSettings>
+ <ExpressProfiler.Properties.Settings>
+ <setting name="ServerName" serializeAs="String">
+ <value>.\SQLExpress</value>
+ </setting>
+ <setting name="UserName" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="Duration" serializeAs="String">
+ <value>0</value>
+ </setting>
+ <setting name="EventMask" serializeAs="String">
+ <value>40</value>
+ </setting>
+ </ExpressProfiler.Properties.Settings>
+ </userSettings>
+</configuration>
\ No newline at end of file |