diff --git a/VsDingExtension.sln b/VsDingExtension.sln index 8b62d08..17da8a4 100644 --- a/VsDingExtension.sln +++ b/VsDingExtension.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 12 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5BD9D4DB-8683-4698-8D24-01EE7306F73A}" ProjectSection(SolutionItems) = preProject IntegrationTests.testsettings = IntegrationTests.testsettings diff --git a/VsDingExtensionProject/Players.cs b/VsDingExtensionProject/Players.cs index 083a65e..5b093fa 100644 --- a/VsDingExtensionProject/Players.cs +++ b/VsDingExtensionProject/Players.cs @@ -1,4 +1,4 @@ -using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell; using System; using System.Collections.Generic; using System.Linq; @@ -18,7 +18,7 @@ namespace VitaliiGanzha.VsDingExtension eventTypeToSoundPlayerMapping[EventType.BuildCompleted] = new List() { new SoundPlayer(Resources.build) }; eventTypeToSoundPlayerMapping[EventType.BreakpointHit] = new List() { new SoundPlayer(Resources.debug) }; eventTypeToSoundPlayerMapping[EventType.TestsCompletedSuccess] = new List() { new SoundPlayer(Resources.ding) }; - eventTypeToSoundPlayerMapping[EventType.TestsCompletedFailure] = new List() { new SoundPlayer(Resources.ding) }; // TODO: different sound for failed tests + eventTypeToSoundPlayerMapping[EventType.TestsCompletedFailure] = new List() { new SoundPlayer(Resources.test_failed) }; } public void PlaySoundSafe(EventType eventType) @@ -66,6 +66,7 @@ namespace VitaliiGanzha.VsDingExtension public enum EventType { + None, BuildCompleted, BreakpointHit, TestsCompletedSuccess, diff --git a/VsDingExtensionProject/Resources.Designer.cs b/VsDingExtensionProject/Resources.Designer.cs index b0f2be0..45d43ae 100644 --- a/VsDingExtensionProject/Resources.Designer.cs +++ b/VsDingExtensionProject/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -86,5 +86,14 @@ namespace VitaliiGanzha.VsDingExtension { return ResourceManager.GetStream("ding", resourceCulture); } } + + /// + /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. + /// + internal static System.IO.UnmanagedMemoryStream test_failed { + get { + return ResourceManager.GetStream("test_failed", resourceCulture); + } + } } } diff --git a/VsDingExtensionProject/Resources.resx b/VsDingExtensionProject/Resources.resx index 4a8cf71..17617bb 100644 --- a/VsDingExtensionProject/Resources.resx +++ b/VsDingExtensionProject/Resources.resx @@ -1,4 +1,4 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + diff --git a/VsDingExtensionProject/SoundSelectControl.Designer.cs b/VsDingExtensionProject/SoundSelectControl.Designer.cs index 50ca2f8..0f130c1 100644 --- a/VsDingExtensionProject/SoundSelectControl.Designer.cs +++ b/VsDingExtensionProject/SoundSelectControl.Designer.cs @@ -1,4 +1,4 @@ -namespace VitaliiGanzha.VsDingExtension +namespace VitaliiGanzha.VsDingExtension { partial class SoundSelectControl { @@ -28,111 +28,73 @@ /// private void InitializeComponent() { - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.panel2 = new System.Windows.Forms.Panel(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.soundsSelectOptionsPage1 = new VitaliiGanzha.VsDingExtension.SoundsSelectOptionsPage(); - this.groupBox1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.panel2.SuspendLayout(); + this.TestsCompletedFailureControl = new VitaliiGanzha.VsDingExtension.SingleSoundSelectControl(); + this.TestCompletedSuccessControl = new VitaliiGanzha.VsDingExtension.SingleSoundSelectControl(); + this.breakPointHitControl = new VitaliiGanzha.VsDingExtension.SingleSoundSelectControl(); + this.buildCompletedControl = new VitaliiGanzha.VsDingExtension.SingleSoundSelectControl(); this.SuspendLayout(); // - // groupBox1 + // TestsCompletedFailureControl // - this.groupBox1.AutoSize = true; - this.groupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.groupBox1.Controls.Add(this.panel1); - this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(0, 0); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(452, 371); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Select custom sounds"; + this.TestsCompletedFailureControl.BoxTitle = "Tests completed, failure"; + this.TestsCompletedFailureControl.Dock = System.Windows.Forms.DockStyle.Top; + this.TestsCompletedFailureControl.EventType = VitaliiGanzha.VsDingExtension.EventType.TestsCompletedFailure; + this.TestsCompletedFailureControl.Location = new System.Drawing.Point(0, 234); + this.TestsCompletedFailureControl.Name = "TestsCompletedFailureControl"; + this.TestsCompletedFailureControl.Size = new System.Drawing.Size(452, 78); + this.TestsCompletedFailureControl.TabIndex = 3; // - // panel1 + // TestCompletedSuccessControl // - this.panel1.Controls.Add(this.panel2); - this.panel1.Controls.Add(this.label1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(3, 16); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(446, 53); - this.panel1.TabIndex = 0; + this.TestCompletedSuccessControl.BoxTitle = "Tests completed, success"; + this.TestCompletedSuccessControl.Dock = System.Windows.Forms.DockStyle.Top; + this.TestCompletedSuccessControl.EventType = VitaliiGanzha.VsDingExtension.EventType.TestsCompletedSuccess; + this.TestCompletedSuccessControl.Location = new System.Drawing.Point(0, 156); + this.TestCompletedSuccessControl.Name = "TestCompletedSuccessControl"; + this.TestCompletedSuccessControl.Size = new System.Drawing.Size(452, 78); + this.TestCompletedSuccessControl.TabIndex = 2; // - // panel2 + // breakPointHitControl // - this.panel2.Controls.Add(this.textBox1); - this.panel2.Controls.Add(this.button1); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 18); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(446, 35); - this.panel2.TabIndex = 1; + this.breakPointHitControl.BoxTitle = "Breakpoint hit"; + this.breakPointHitControl.Dock = System.Windows.Forms.DockStyle.Top; + this.breakPointHitControl.EventType = VitaliiGanzha.VsDingExtension.EventType.BreakpointHit; + this.breakPointHitControl.Location = new System.Drawing.Point(0, 78); + this.breakPointHitControl.Name = "breakPointHitControl"; + this.breakPointHitControl.Size = new System.Drawing.Size(452, 78); + this.breakPointHitControl.TabIndex = 1; // - // textBox1 + // buildCompletedControl // - this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBox1.Location = new System.Drawing.Point(0, 0); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(349, 20); - this.textBox1.TabIndex = 1; - // - // button1 - // - this.button1.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.button1.Location = new System.Drawing.Point(415, 0); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(31, 32); - this.button1.TabIndex = 0; - this.button1.Text = "..."; - this.button1.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Name = "label1"; - this.label1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 5); - this.label1.Size = new System.Drawing.Size(85, 18); - this.label1.TabIndex = 0; - this.label1.Text = "Build completed:"; - // - // soundsSelectOptionsPage1 - // - this.soundsSelectOptionsPage1.CustomBitmap = null; + this.buildCompletedControl.BoxTitle = "Build completed"; + this.buildCompletedControl.Dock = System.Windows.Forms.DockStyle.Top; + this.buildCompletedControl.EventType = VitaliiGanzha.VsDingExtension.EventType.BuildCompleted; + this.buildCompletedControl.Location = new System.Drawing.Point(0, 0); + this.buildCompletedControl.Name = "buildCompletedControl"; + this.buildCompletedControl.Size = new System.Drawing.Size(452, 78); + this.buildCompletedControl.TabIndex = 0; // // SoundSelectControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupBox1); + this.AutoScroll = true; + this.Controls.Add(this.TestsCompletedFailureControl); + this.Controls.Add(this.TestCompletedSuccessControl); + this.Controls.Add(this.breakPointHitControl); + this.Controls.Add(this.buildCompletedControl); this.Name = "SoundSelectControl"; this.Size = new System.Drawing.Size(452, 371); - this.groupBox1.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.TextBox textBox1; - private SoundsSelectOptionsPage soundsSelectOptionsPage1; + private SingleSoundSelectControl buildCompletedControl; + private SingleSoundSelectControl TestCompletedSuccessControl; + private SingleSoundSelectControl breakPointHitControl; + private SingleSoundSelectControl TestsCompletedFailureControl; } } diff --git a/VsDingExtensionProject/SoundSelectControl.cs b/VsDingExtensionProject/SoundSelectControl.cs index 36a62d9..86a9085 100644 --- a/VsDingExtensionProject/SoundSelectControl.cs +++ b/VsDingExtensionProject/SoundSelectControl.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; @@ -12,7 +12,25 @@ namespace VitaliiGanzha.VsDingExtension { public partial class SoundSelectControl : UserControl { - internal SoundsSelectOptionsPage optionsPage; + private SoundsSelectOptionsPage optionsPage; + + internal SoundsSelectOptionsPage OptionsPage + { + get { return this.optionsPage; } + set + { + this.optionsPage = value; + UpdateOptionPage(); + } + } + + private void UpdateOptionPage() + { + this.TestCompletedSuccessControl.OptionsPage = this.optionsPage; + this.TestsCompletedFailureControl.OptionsPage = this.optionsPage; + this.buildCompletedControl.OptionsPage = this.optionsPage; + this.breakPointHitControl.OptionsPage = this.optionsPage; + } public SoundSelectControl() { diff --git a/VsDingExtensionProject/SoundSelectControl.resx b/VsDingExtensionProject/SoundSelectControl.resx index a419a19..44e9f97 100644 --- a/VsDingExtensionProject/SoundSelectControl.resx +++ b/VsDingExtensionProject/SoundSelectControl.resx @@ -1,4 +1,4 @@ - +