From efacdc2ceeeaf0a69c005bd9540092bfd28057bf Mon Sep 17 00:00:00 2001 From: Antao Almada Date: Fri, 6 May 2016 22:51:58 +0100 Subject: [PATCH 1/6] Added .VisualStudio project to add a debugger visualizer --- .../AngleDebuggerVisualizer.cs | 14 +++++ .../NetFabric.Angle.VisualStudio.csproj | 52 +++++++++++++++++++ .../Properties/AssemblyInfo.cs | 36 +++++++++++++ NetFabric.Angle.sln | 6 +++ 4 files changed, 108 insertions(+) create mode 100644 NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs create mode 100644 NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj create mode 100644 NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs diff --git a/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs b/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs new file mode 100644 index 0000000..a697a3c --- /dev/null +++ b/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs @@ -0,0 +1,14 @@ +using System; +using Microsoft.VisualStudio.DebuggerVisualizers; + +namespace NetFabric +{ + public class AngleDebuggerVisualizer + : DialogDebuggerVisualizer + { + protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) + { + throw new NotImplementedException(); + } + } +} diff --git a/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj b/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj new file mode 100644 index 0000000..8216c2c --- /dev/null +++ b/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + {9A835F21-B35A-4372-A526-FFB951AD4341} + Library + Properties + NetFabric + NetFabric.Angle.VisualStudio + v4.6.1 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + \ No newline at end of file diff --git a/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs b/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b156af9 --- /dev/null +++ b/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("NetFabric.Angle.VisualStudio")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NetFabric.Angle.VisualStudio")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("9a835f21-b35a-4372-a526-ffb951ad4341")] + +// 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")] diff --git a/NetFabric.Angle.sln b/NetFabric.Angle.sln index 6b68b0c..191ba11 100644 --- a/NetFabric.Angle.sln +++ b/NetFabric.Angle.sln @@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.UnityEditor EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.Unity", "NetFabric.Angle.Unity\NetFabric.Angle.Unity.csproj", "{BD72D18F-3489-4BDD-85F4-A9785262F754}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.VisualStudio", "NetFabric.Angle.VisualStudio\NetFabric.Angle.VisualStudio.csproj", "{9A835F21-B35A-4372-A526-FFB951AD4341}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution NetFabric.Angle.Shared\NetFabric.Angle.Shared.projitems*{fcd2e42d-ccb1-41fb-bd17-94f595879c63}*SharedItemsImports = 4 @@ -66,6 +68,10 @@ Global {AD9788A4-FE55-4AD3-B320-30F77FE9E95A}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD72D18F-3489-4BDD-85F4-A9785262F754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD72D18F-3489-4BDD-85F4-A9785262F754}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A835F21-B35A-4372-A526-FFB951AD4341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A835F21-B35A-4372-A526-FFB951AD4341}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A835F21-B35A-4372-A526-FFB951AD4341}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A835F21-B35A-4372-A526-FFB951AD4341}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 7b28647823018cb7081345e40160e3679e2bbbb4 Mon Sep 17 00:00:00 2001 From: Antao Almada Date: Mon, 9 May 2016 22:32:07 +0100 Subject: [PATCH 2/6] Added AngleVisualizerForm --- .../AngleDebuggerVisualizer.cs | 14 +- .../AngleVisualizerForm.Designer.cs | 278 ++++++++++++++++++ .../AngleVisualizerForm.cs | 33 +++ .../AngleVisualizerForm.resx | 120 ++++++++ .../NetFabric.Angle.VisualStudio.csproj | 21 ++ 5 files changed, 463 insertions(+), 3 deletions(-) create mode 100644 NetFabric.Angle.VisualStudio/AngleVisualizerForm.Designer.cs create mode 100644 NetFabric.Angle.VisualStudio/AngleVisualizerForm.cs create mode 100644 NetFabric.Angle.VisualStudio/AngleVisualizerForm.resx diff --git a/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs b/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs index a697a3c..03d5ed5 100644 --- a/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs +++ b/NetFabric.Angle.VisualStudio/AngleDebuggerVisualizer.cs @@ -1,5 +1,11 @@ -using System; -using Microsoft.VisualStudio.DebuggerVisualizers; +using Microsoft.VisualStudio.DebuggerVisualizers; + +[assembly: System.Diagnostics.DebuggerVisualizer( + typeof(NetFabric.AngleDebuggerVisualizer), + typeof(VisualizerObjectSource), + Target = typeof(NetFabric.Angle), + Description = "Angle Visualizer") +] namespace NetFabric { @@ -8,7 +14,9 @@ public class AngleDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { - throw new NotImplementedException(); + var angle = (Angle)objectProvider.GetObject(); + var form = new AngleVisualizerForm(angle); + windowService.ShowDialog(form); } } } diff --git a/NetFabric.Angle.VisualStudio/AngleVisualizerForm.Designer.cs b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.Designer.cs new file mode 100644 index 0000000..6dd900c --- /dev/null +++ b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.Designer.cs @@ -0,0 +1,278 @@ +namespace NetFabric +{ + partial class AngleVisualizerForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.labelValueDegreesMinutes = new System.Windows.Forms.Label(); + this.groupBoxValue = new System.Windows.Forms.GroupBox(); + this.labelValueGradians = new System.Windows.Forms.Label(); + this.labelValueDegreesMinutesSeconds = new System.Windows.Forms.Label(); + this.labelValueDegrees = new System.Windows.Forms.Label(); + this.labelValueRadians = new System.Windows.Forms.Label(); + this.groupBoxReduced = new System.Windows.Forms.GroupBox(); + this.labelReducedGradians = new System.Windows.Forms.Label(); + this.labelReducedDegreesMinutesSeconds = new System.Windows.Forms.Label(); + this.labelReducedDegrees = new System.Windows.Forms.Label(); + this.labelReducedRadians = new System.Windows.Forms.Label(); + this.labelReducedDegreesMinutes = new System.Windows.Forms.Label(); + this.groupBoxReference = new System.Windows.Forms.GroupBox(); + this.labelReferenceGradians = new System.Windows.Forms.Label(); + this.labelReferenceDegreesMinutesSeconds = new System.Windows.Forms.Label(); + this.labelReferenceDegrees = new System.Windows.Forms.Label(); + this.labelReferenceRadians = new System.Windows.Forms.Label(); + this.labelReferenceDegreesMinutes = new System.Windows.Forms.Label(); + this.groupBoxValue.SuspendLayout(); + this.groupBoxReduced.SuspendLayout(); + this.groupBoxReference.SuspendLayout(); + this.SuspendLayout(); + // + // labelValueDegreesMinutes + // + this.labelValueDegreesMinutes.AutoSize = true; + this.labelValueDegreesMinutes.Location = new System.Drawing.Point(7, 53); + this.labelValueDegreesMinutes.Name = "labelValueDegreesMinutes"; + this.labelValueDegreesMinutes.Size = new System.Drawing.Size(84, 13); + this.labelValueDegreesMinutes.TabIndex = 0; + this.labelValueDegreesMinutes.Text = "DegreesMinutes"; + // + // groupBoxValue + // + this.groupBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxValue.Controls.Add(this.labelValueGradians); + this.groupBoxValue.Controls.Add(this.labelValueDegreesMinutesSeconds); + this.groupBoxValue.Controls.Add(this.labelValueDegrees); + this.groupBoxValue.Controls.Add(this.labelValueRadians); + this.groupBoxValue.Controls.Add(this.labelValueDegreesMinutes); + this.groupBoxValue.Location = new System.Drawing.Point(13, 13); + this.groupBoxValue.Name = "groupBoxValue"; + this.groupBoxValue.Size = new System.Drawing.Size(348, 115); + this.groupBoxValue.TabIndex = 1; + this.groupBoxValue.TabStop = false; + this.groupBoxValue.Text = "Value"; + // + // labelValueGradians + // + this.labelValueGradians.AutoSize = true; + this.labelValueGradians.Location = new System.Drawing.Point(7, 87); + this.labelValueGradians.Name = "labelValueGradians"; + this.labelValueGradians.Size = new System.Drawing.Size(49, 13); + this.labelValueGradians.TabIndex = 3; + this.labelValueGradians.Text = "Gradians"; + // + // labelValueDegreesMinutesSeconds + // + this.labelValueDegreesMinutesSeconds.AutoSize = true; + this.labelValueDegreesMinutesSeconds.Location = new System.Drawing.Point(7, 70); + this.labelValueDegreesMinutesSeconds.Name = "labelValueDegreesMinutesSeconds"; + this.labelValueDegreesMinutesSeconds.Size = new System.Drawing.Size(126, 13); + this.labelValueDegreesMinutesSeconds.TabIndex = 2; + this.labelValueDegreesMinutesSeconds.Text = "DegreesMinutesSeconds"; + // + // labelValueDegrees + // + this.labelValueDegrees.AutoSize = true; + this.labelValueDegrees.Location = new System.Drawing.Point(7, 36); + this.labelValueDegrees.Name = "labelValueDegrees"; + this.labelValueDegrees.Size = new System.Drawing.Size(47, 13); + this.labelValueDegrees.TabIndex = 2; + this.labelValueDegrees.Text = "Degrees"; + // + // labelValueRadians + // + this.labelValueRadians.AutoSize = true; + this.labelValueRadians.Location = new System.Drawing.Point(7, 19); + this.labelValueRadians.Name = "labelValueRadians"; + this.labelValueRadians.Size = new System.Drawing.Size(46, 13); + this.labelValueRadians.TabIndex = 1; + this.labelValueRadians.Text = "Radians"; + // + // groupBoxReduced + // + this.groupBoxReduced.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxReduced.Controls.Add(this.labelReducedGradians); + this.groupBoxReduced.Controls.Add(this.labelReducedDegreesMinutesSeconds); + this.groupBoxReduced.Controls.Add(this.labelReducedDegrees); + this.groupBoxReduced.Controls.Add(this.labelReducedRadians); + this.groupBoxReduced.Controls.Add(this.labelReducedDegreesMinutes); + this.groupBoxReduced.Location = new System.Drawing.Point(12, 134); + this.groupBoxReduced.Name = "groupBoxReduced"; + this.groupBoxReduced.Size = new System.Drawing.Size(348, 104); + this.groupBoxReduced.TabIndex = 4; + this.groupBoxReduced.TabStop = false; + this.groupBoxReduced.Text = "Reduced"; + // + // labelReducedGradians + // + this.labelReducedGradians.AutoSize = true; + this.labelReducedGradians.Location = new System.Drawing.Point(8, 80); + this.labelReducedGradians.Name = "labelReducedGradians"; + this.labelReducedGradians.Size = new System.Drawing.Size(49, 13); + this.labelReducedGradians.TabIndex = 3; + this.labelReducedGradians.Text = "Gradians"; + // + // labelReducedDegreesMinutesSeconds + // + this.labelReducedDegreesMinutesSeconds.AutoSize = true; + this.labelReducedDegreesMinutesSeconds.Location = new System.Drawing.Point(8, 64); + this.labelReducedDegreesMinutesSeconds.Name = "labelReducedDegreesMinutesSeconds"; + this.labelReducedDegreesMinutesSeconds.Size = new System.Drawing.Size(126, 13); + this.labelReducedDegreesMinutesSeconds.TabIndex = 2; + this.labelReducedDegreesMinutesSeconds.Text = "DegreesMinutesSeconds"; + // + // labelReducedDegrees + // + this.labelReducedDegrees.AutoSize = true; + this.labelReducedDegrees.Location = new System.Drawing.Point(8, 32); + this.labelReducedDegrees.Name = "labelReducedDegrees"; + this.labelReducedDegrees.Size = new System.Drawing.Size(47, 13); + this.labelReducedDegrees.TabIndex = 2; + this.labelReducedDegrees.Text = "Degrees"; + // + // labelReducedRadians + // + this.labelReducedRadians.AutoSize = true; + this.labelReducedRadians.Location = new System.Drawing.Point(8, 16); + this.labelReducedRadians.Name = "labelReducedRadians"; + this.labelReducedRadians.Size = new System.Drawing.Size(46, 13); + this.labelReducedRadians.TabIndex = 1; + this.labelReducedRadians.Text = "Radians"; + // + // labelReducedDegreesMinutes + // + this.labelReducedDegreesMinutes.AutoSize = true; + this.labelReducedDegreesMinutes.Location = new System.Drawing.Point(8, 48); + this.labelReducedDegreesMinutes.Name = "labelReducedDegreesMinutes"; + this.labelReducedDegreesMinutes.Size = new System.Drawing.Size(84, 13); + this.labelReducedDegreesMinutes.TabIndex = 0; + this.labelReducedDegreesMinutes.Text = "DegreesMinutes"; + // + // groupBoxReference + // + this.groupBoxReference.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxReference.Controls.Add(this.labelReferenceGradians); + this.groupBoxReference.Controls.Add(this.labelReferenceDegreesMinutesSeconds); + this.groupBoxReference.Controls.Add(this.labelReferenceDegrees); + this.groupBoxReference.Controls.Add(this.labelReferenceRadians); + this.groupBoxReference.Controls.Add(this.labelReferenceDegreesMinutes); + this.groupBoxReference.Location = new System.Drawing.Point(12, 244); + this.groupBoxReference.Name = "groupBoxReference"; + this.groupBoxReference.Size = new System.Drawing.Size(348, 117); + this.groupBoxReference.TabIndex = 5; + this.groupBoxReference.TabStop = false; + this.groupBoxReference.Text = "Reference"; + // + // labelReferenceGradians + // + this.labelReferenceGradians.AutoSize = true; + this.labelReferenceGradians.Location = new System.Drawing.Point(8, 92); + this.labelReferenceGradians.Name = "labelReferenceGradians"; + this.labelReferenceGradians.Size = new System.Drawing.Size(49, 13); + this.labelReferenceGradians.TabIndex = 3; + this.labelReferenceGradians.Text = "Gradians"; + // + // labelReferenceDegreesMinutesSeconds + // + this.labelReferenceDegreesMinutesSeconds.AutoSize = true; + this.labelReferenceDegreesMinutesSeconds.Location = new System.Drawing.Point(8, 74); + this.labelReferenceDegreesMinutesSeconds.Name = "labelReferenceDegreesMinutesSeconds"; + this.labelReferenceDegreesMinutesSeconds.Size = new System.Drawing.Size(126, 13); + this.labelReferenceDegreesMinutesSeconds.TabIndex = 2; + this.labelReferenceDegreesMinutesSeconds.Text = "DegreesMinutesSeconds"; + // + // labelReferenceDegrees + // + this.labelReferenceDegrees.AutoSize = true; + this.labelReferenceDegrees.Location = new System.Drawing.Point(8, 38); + this.labelReferenceDegrees.Name = "labelReferenceDegrees"; + this.labelReferenceDegrees.Size = new System.Drawing.Size(47, 13); + this.labelReferenceDegrees.TabIndex = 2; + this.labelReferenceDegrees.Text = "Degrees"; + // + // labelReferenceRadians + // + this.labelReferenceRadians.AutoSize = true; + this.labelReferenceRadians.Location = new System.Drawing.Point(8, 20); + this.labelReferenceRadians.Name = "labelReferenceRadians"; + this.labelReferenceRadians.Size = new System.Drawing.Size(46, 13); + this.labelReferenceRadians.TabIndex = 1; + this.labelReferenceRadians.Text = "Radians"; + // + // labelReferenceDegreesMinutes + // + this.labelReferenceDegreesMinutes.AutoSize = true; + this.labelReferenceDegreesMinutes.Location = new System.Drawing.Point(8, 56); + this.labelReferenceDegreesMinutes.Name = "labelReferenceDegreesMinutes"; + this.labelReferenceDegreesMinutes.Size = new System.Drawing.Size(84, 13); + this.labelReferenceDegreesMinutes.TabIndex = 0; + this.labelReferenceDegreesMinutes.Text = "DegreesMinutes"; + // + // AngleVisualizerForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(373, 441); + this.Controls.Add(this.groupBoxReference); + this.Controls.Add(this.groupBoxReduced); + this.Controls.Add(this.groupBoxValue); + this.Name = "AngleVisualizerForm"; + this.Text = "Angle Visualizer"; + this.groupBoxValue.ResumeLayout(false); + this.groupBoxValue.PerformLayout(); + this.groupBoxReduced.ResumeLayout(false); + this.groupBoxReduced.PerformLayout(); + this.groupBoxReference.ResumeLayout(false); + this.groupBoxReference.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelValueDegreesMinutes; + private System.Windows.Forms.GroupBox groupBoxValue; + private System.Windows.Forms.Label labelValueGradians; + private System.Windows.Forms.Label labelValueDegreesMinutesSeconds; + private System.Windows.Forms.Label labelValueDegrees; + private System.Windows.Forms.Label labelValueRadians; + private System.Windows.Forms.GroupBox groupBoxReduced; + private System.Windows.Forms.Label labelReducedGradians; + private System.Windows.Forms.Label labelReducedDegreesMinutesSeconds; + private System.Windows.Forms.Label labelReducedDegrees; + private System.Windows.Forms.Label labelReducedRadians; + private System.Windows.Forms.Label labelReducedDegreesMinutes; + private System.Windows.Forms.GroupBox groupBoxReference; + private System.Windows.Forms.Label labelReferenceGradians; + private System.Windows.Forms.Label labelReferenceDegreesMinutesSeconds; + private System.Windows.Forms.Label labelReferenceDegrees; + private System.Windows.Forms.Label labelReferenceRadians; + private System.Windows.Forms.Label labelReferenceDegreesMinutes; + } +} \ No newline at end of file diff --git a/NetFabric.Angle.VisualStudio/AngleVisualizerForm.cs b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.cs new file mode 100644 index 0000000..0bb7416 --- /dev/null +++ b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.cs @@ -0,0 +1,33 @@ +using System.Windows.Forms; + +namespace NetFabric +{ + public partial class AngleVisualizerForm + : Form + { + public AngleVisualizerForm(Angle angle) + { + InitializeComponent(); + + labelValueRadians.Text = angle.ToString("R3") + " rad"; + labelValueDegrees.Text = angle.ToString("D3") + "°"; + labelValueDegreesMinutes.Text = angle.ToString("M3"); + labelValueDegreesMinutesSeconds.Text = angle.ToString("S3"); + labelValueGradians.Text = angle.ToString("G3") + " grad"; + + var reduced = Angle.Reduce(angle); + labelReducedRadians.Text = reduced.ToString("R3") + " rad"; + labelReducedDegrees.Text = reduced.ToString("D3") + "°"; + labelReducedDegreesMinutes.Text = reduced.ToString("M3"); + labelReducedDegreesMinutesSeconds.Text = reduced.ToString("S3"); + labelReducedGradians.Text = reduced.ToString("G3") + " grad"; + + var reference = Angle.GetReference(angle); + labelReferenceRadians.Text = reference.ToString("R3") + " rad"; + labelReferenceDegrees.Text = reference.ToString("D3") + "°"; + labelReferenceDegreesMinutes.Text = reference.ToString("M3"); + labelReferenceDegreesMinutesSeconds.Text = reference.ToString("S3"); + labelReferenceGradians.Text = reference.ToString("G3") + " grad"; + } + } +} diff --git a/NetFabric.Angle.VisualStudio/AngleVisualizerForm.resx b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/NetFabric.Angle.VisualStudio/AngleVisualizerForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj b/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj index 8216c2c..3e84f94 100644 --- a/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj +++ b/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj @@ -36,11 +36,32 @@ + + + + + + Form + + + AngleVisualizerForm.cs + + + + {fcd2e42d-ccb1-41fb-bd17-94f595879c63} + NetFabric.Angle + + + + + AngleVisualizerForm.cs + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj b/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj deleted file mode 100644 index 3e84f94..0000000 --- a/NetFabric.Angle.VisualStudio/NetFabric.Angle.VisualStudio.csproj +++ /dev/null @@ -1,73 +0,0 @@ - - - - - Debug - AnyCPU - {9A835F21-B35A-4372-A526-FFB951AD4341} - Library - Properties - NetFabric - NetFabric.Angle.VisualStudio - v4.6.1 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - - - - Form - - - AngleVisualizerForm.cs - - - - - - {fcd2e42d-ccb1-41fb-bd17-94f595879c63} - NetFabric.Angle - - - - - AngleVisualizerForm.cs - - - - - \ No newline at end of file diff --git a/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs b/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs deleted file mode 100644 index b156af9..0000000 --- a/NetFabric.Angle.VisualStudio/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("NetFabric.Angle.VisualStudio")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NetFabric.Angle.VisualStudio")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[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("9a835f21-b35a-4372-a526-ffb951ad4341")] - -// 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")] diff --git a/NetFabric.Angle.sln b/NetFabric.Angle.sln index 191ba11..6b68b0c 100644 --- a/NetFabric.Angle.sln +++ b/NetFabric.Angle.sln @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.UnityEditor EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.Unity", "NetFabric.Angle.Unity\NetFabric.Angle.Unity.csproj", "{BD72D18F-3489-4BDD-85F4-A9785262F754}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetFabric.Angle.VisualStudio", "NetFabric.Angle.VisualStudio\NetFabric.Angle.VisualStudio.csproj", "{9A835F21-B35A-4372-A526-FFB951AD4341}" -EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution NetFabric.Angle.Shared\NetFabric.Angle.Shared.projitems*{fcd2e42d-ccb1-41fb-bd17-94f595879c63}*SharedItemsImports = 4 @@ -68,10 +66,6 @@ Global {AD9788A4-FE55-4AD3-B320-30F77FE9E95A}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD72D18F-3489-4BDD-85F4-A9785262F754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD72D18F-3489-4BDD-85F4-A9785262F754}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A835F21-B35A-4372-A526-FFB951AD4341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A835F21-B35A-4372-A526-FFB951AD4341}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A835F21-B35A-4372-A526-FFB951AD4341}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A835F21-B35A-4372-A526-FFB951AD4341}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 1f5f8b1a22ede0d21b7a51339b1d1a7b185058ba Mon Sep 17 00:00:00 2001 From: Antao Almada Date: Wed, 11 May 2016 07:50:49 +0100 Subject: [PATCH 6/6] Moved DebuggerDisplayAttribute to the main Angle version --- NetFabric.Angle.Shared/Angle.Net.cs | 1 - NetFabric.Angle.Shared/Angle.cs | 3 ++- NetFabric.Angle.Shared/AngleDebugView.cs | 2 -- NetFabric.Angle.nuspec | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/NetFabric.Angle.Shared/Angle.Net.cs b/NetFabric.Angle.Shared/Angle.Net.cs index a7d6efe..ecfa05e 100644 --- a/NetFabric.Angle.Shared/Angle.Net.cs +++ b/NetFabric.Angle.Shared/Angle.Net.cs @@ -3,7 +3,6 @@ namespace NetFabric { - [DebuggerDisplay("{ToDegrees()}°")] [DebuggerTypeProxy(typeof(AngleDebugView))] public partial struct Angle : IEquatable diff --git a/NetFabric.Angle.Shared/Angle.cs b/NetFabric.Angle.Shared/Angle.cs index 227c465..c55c6b4 100644 --- a/NetFabric.Angle.Shared/Angle.cs +++ b/NetFabric.Angle.Shared/Angle.cs @@ -1,11 +1,12 @@ using System; -using System.Globalization; +using System.Diagnostics; namespace NetFabric { /// /// Represents an angle. /// + [DebuggerDisplay("{ToDegrees()}°")] public partial struct Angle { /// diff --git a/NetFabric.Angle.Shared/AngleDebugView.cs b/NetFabric.Angle.Shared/AngleDebugView.cs index 004dee0..9e7a255 100644 --- a/NetFabric.Angle.Shared/AngleDebugView.cs +++ b/NetFabric.Angle.Shared/AngleDebugView.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; namespace NetFabric { diff --git a/NetFabric.Angle.nuspec b/NetFabric.Angle.nuspec index c3dfe48..6b16e31 100644 --- a/NetFabric.Angle.nuspec +++ b/NetFabric.Angle.nuspec @@ -16,7 +16,7 @@ The explicit declaration of the units in creation and reading methods reduces th Includes linear interpolation, reduction, reference angle, comparison, classification and trigonometry operations. -+ Added string format ++ Added debug visualization 2016 Antão Almada en-US