From 5dba4e859e2806ce74d806fbd5dda37b7fa628d5 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 16 May 2018 13:57:15 +0300 Subject: Improved Tango Build Engine VS Extension. Added HardwareSpeedSensor to DB Entities & PMR. Added progress to proto folder compiler. --- .../Tango.BL/Entities/HardwareSpeedSensor.cs | 148 +++++ .../Tango.BL/Entities/HardwareSpeedSensorType.cs | 106 ++++ .../Tango.BL/Entities/HardwareVersion.cs | 21 + .../Enumerations/HardwareSpeedSensorTypes.cs | 19 + .../Visual_Studio/Tango.BL/ObservablesContext.cs | 16 + .../ObservablesEntitiesAdapterExtension.cs | 76 +++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 3 + .../Tango.BuildExtensions/BuildForm.Designer.cs | 232 -------- .../Tango.BuildExtensions/BuildForm.cs | 48 -- .../Tango.BuildExtensions/BuildForm.resx | 120 ---- .../Visual_Studio/Tango.BuildExtensions/Key.snk | Bin 596 -> 0 bytes .../Tango.BuildExtensions/ProgressForm.Designer.cs | 138 ----- .../Tango.BuildExtensions/ProgressForm.cs | 33 -- .../Tango.BuildExtensions/ProgressForm.resx | 120 ---- .../Properties/AssemblyInfo.cs | 33 -- .../Properties/Resources.Designer.cs | 83 --- .../Properties/Resources.resx | 127 ----- .../Resources/BuildTangoCommand.png | Bin 1172 -> 0 bytes .../Resources/BuildTangoCommandPackage.ico | Bin 428446 -> 0 bytes .../Resources/TangoBuildCommand.png | Bin 1172 -> 0 bytes .../Resources/TangoBuildCommandPackage.ico | Bin 428446 -> 0 bytes .../Resources/machine-trans-16x16.png | Bin 744 -> 0 bytes .../Resources/machine-trans-small.png | Bin 12401 -> 0 bytes .../Tango.BuildExtensions.csproj | 245 -------- .../Tango.BuildExtensions/TangoBuildCommand.cs | 598 -------------------- .../TangoBuildCommandPackage.cs | 75 --- .../TangoBuildCommandPackage.vsct | 99 ---- .../Tango.BuildExtensions/VSPackage.Designer.cs | 73 --- .../Tango.BuildExtensions/VSPackage.resx | 133 ----- .../Tango.BuildExtensions/WindowInfo.cs | 150 ----- .../Visual_Studio/Tango.BuildExtensions/index.html | 65 --- .../Tango.BuildExtensions/packages.config | 24 - .../source.extension.vsixmanifest | 21 - .../Tango.BuildExtensions/stylesheet.css | 129 ----- .../Visual_Studio/Tango.Core/IO/TemporaryFolder.cs | 2 +- .../Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSORS.cs | 28 + .../DB/HARDWARE_SPEED_SENSOR_TYPES.cs | 33 ++ .../Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs | 3 + .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 2 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 147 +++++ .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 142 ++--- .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 6 + .../Tango.PMR/Hardware/HardwareSpeedSensor.cs | 218 +++++++ .../Tango.PMR/Hardware/HardwareSpeedSensorType.cs | 48 ++ Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 2 + .../Tango.Protobuf/CompilerProgressEventArgs.cs | 15 + .../Visual_Studio/Tango.Protobuf/IProtoCompiler.cs | 5 + .../Visual_Studio/Tango.Protobuf/ProtoCompiler.cs | 17 + .../Tango.Protobuf/Tango.Protobuf.csproj | 1 + Software/Visual_Studio/Tango.sln | 2 +- .../Utilities/Tango.PMRGenerator.CLI/Program.cs | 39 ++ .../Utilities/Tango.Protobuf.CLI/Program.cs | 17 + .../Tango.BuildExtensions/BuildForm.Designer.cs | 232 ++++++++ .../VSIX/Tango.BuildExtensions/BuildForm.cs | 48 ++ .../VSIX/Tango.BuildExtensions/BuildForm.resx | 120 ++++ .../VSIX/Tango.BuildExtensions/Key.snk | Bin 0 -> 596 bytes .../Tango.BuildExtensions/ProgressForm.Designer.cs | 138 +++++ .../VSIX/Tango.BuildExtensions/ProgressForm.cs | 33 ++ .../VSIX/Tango.BuildExtensions/ProgressForm.resx | 120 ++++ .../Properties/AssemblyInfo.cs | 33 ++ .../Properties/Resources.Designer.cs | 83 +++ .../Properties/Resources.resx | 127 +++++ .../Resources/BuildTangoCommand.png | Bin 0 -> 1172 bytes .../Resources/BuildTangoCommandPackage.ico | Bin 0 -> 428446 bytes .../Resources/TangoBuildCommand.png | Bin 0 -> 1172 bytes .../Resources/TangoBuildCommandPackage.ico | Bin 0 -> 428446 bytes .../Resources/machine-trans-16x16.png | Bin 0 -> 744 bytes .../Resources/machine-trans-small.png | Bin 0 -> 12401 bytes .../Tango.BuildExtensions.csproj | 245 ++++++++ .../Tango.BuildExtensions/TangoBuildCommand.cs | 626 +++++++++++++++++++++ .../TangoBuildCommandPackage.cs | 75 +++ .../TangoBuildCommandPackage.vsct | 99 ++++ .../Tango.BuildExtensions/VSPackage.Designer.cs | 73 +++ .../VSIX/Tango.BuildExtensions/VSPackage.resx | 133 +++++ .../VSIX/Tango.BuildExtensions/WindowInfo.cs | 150 +++++ .../VSIX/Tango.BuildExtensions/index.html | 65 +++ .../VSIX/Tango.BuildExtensions/packages.config | 24 + .../source.extension.vsixmanifest | 21 + .../VSIX/Tango.BuildExtensions/stylesheet.css | 129 +++++ 79 files changed, 3619 insertions(+), 2617 deletions(-) create mode 100644 Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/HardwareSpeedSensorTypes.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/BuildForm.Designer.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/BuildForm.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/BuildForm.resx delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Key.snk delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.Designer.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.resx delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Properties/AssemblyInfo.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.Designer.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.resx delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommand.png delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommand.png delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-16x16.png delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-small.png delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/Tango.BuildExtensions.csproj delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommand.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.vsct delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/VSPackage.Designer.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/VSPackage.resx delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/WindowInfo.cs delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/index.html delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/packages.config delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/source.extension.vsixmanifest delete mode 100644 Software/Visual_Studio/Tango.BuildExtensions/stylesheet.css create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSORS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSOR_TYPES.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensor.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensorType.cs create mode 100644 Software/Visual_Studio/Tango.Protobuf/CompilerProgressEventArgs.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.Designer.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.resx create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Key.snk create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.Designer.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.resx create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.resx create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommand.png create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommand.png create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-16x16.png create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-small.png create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/Tango.BuildExtensions.csproj create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.vsct create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.Designer.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.resx create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/WindowInfo.cs create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/index.html create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/packages.config create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/source.extension.vsixmanifest create mode 100644 Software/Visual_Studio/VSIX/Tango.BuildExtensions/stylesheet.css (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs new file mode 100644 index 000000000..07776df85 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensor.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; + +namespace Tango.BL.Entities +{ + [Table("HARDWARE_SPEED_SENSORS")] + public partial class HardwareSpeedSensor : ObservableEntity + { + + protected String _hardwarespeedsensortypeguid; + /// + /// Gets or sets the hardwarespeedsensor hardware speed sensor type guid. + /// + [Column("HARDWARE_SPEED_SENSOR_TYPE_GUID")] + [ForeignKey("HardwareSpeedSensorType")] + + public String HardwareSpeedSensorTypeGuid + { + get + { + return _hardwarespeedsensortypeguid; + } + + set + { + _hardwarespeedsensortypeguid = value; RaisePropertyChanged(nameof(HardwareSpeedSensorTypeGuid)); + } + + } + + protected String _hardwareversionguid; + /// + /// Gets or sets the hardwarespeedsensor hardware version guid. + /// + [Column("HARDWARE_VERSION_GUID")] + [ForeignKey("HardwareVersion")] + + public String HardwareVersionGuid + { + get + { + return _hardwareversionguid; + } + + set + { + _hardwareversionguid = value; RaisePropertyChanged(nameof(HardwareVersionGuid)); + } + + } + + protected Int32 _resolutionbits; + /// + /// Gets or sets the hardwarespeedsensor resolution bits. + /// + [Column("RESOLUTION_BITS")] + + public Int32 ResolutionBits + { + get + { + return _resolutionbits; + } + + set + { + _resolutionbits = value; RaisePropertyChanged(nameof(ResolutionBits)); + } + + } + + protected Double _perimeter; + /// + /// Gets or sets the hardwarespeedsensor perimeter. + /// + [Column("PERIMETER")] + + public Double Perimeter + { + get + { + return _perimeter; + } + + set + { + _perimeter = value; RaisePropertyChanged(nameof(Perimeter)); + } + + } + + protected HardwareSpeedSensorType _hardwarespeedsensortype; + /// + /// Gets or sets the hardwarespeedsensor hardware speed sensor types. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual HardwareSpeedSensorType HardwareSpeedSensorType + { + get + { + return _hardwarespeedsensortype; + } + + set + { + _hardwarespeedsensortype = value; RaisePropertyChanged(nameof(HardwareSpeedSensorType)); + } + + } + + protected HardwareVersion _hardwareversion; + /// + /// Gets or sets the hardwarespeedsensor hardware versions. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual HardwareVersion HardwareVersion + { + get + { + return _hardwareversion; + } + + set + { + _hardwareversion = value; RaisePropertyChanged(nameof(HardwareVersion)); + } + + } + + /// + /// Initializes a new instance of the class. + /// + public HardwareSpeedSensor() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs new file mode 100644 index 000000000..950509b53 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareSpeedSensorType.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; + +namespace Tango.BL.Entities +{ + [Table("HARDWARE_SPEED_SENSOR_TYPES")] + public partial class HardwareSpeedSensorType : ObservableEntity + { + + protected Int32 _code; + /// + /// Gets or sets the hardwarespeedsensortype code. + /// + [Column("CODE")] + + public Int32 Code + { + get + { + return _code; + } + + set + { + _code = value; RaisePropertyChanged(nameof(Code)); + } + + } + + protected String _name; + /// + /// Gets or sets the hardwarespeedsensortype name. + /// + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + _name = value; RaisePropertyChanged(nameof(Name)); + } + + } + + protected String _description; + /// + /// Gets or sets the hardwarespeedsensortype description. + /// + [Column("DESCRIPTION")] + + public String Description + { + get + { + return _description; + } + + set + { + _description = value; RaisePropertyChanged(nameof(Description)); + } + + } + + protected ObservableCollection _hardwarespeedsensors; + /// + /// Gets or sets the hardwarespeedsensortype hardware speed sensors. + /// + + public virtual ObservableCollection HardwareSpeedSensors + { + get + { + return _hardwarespeedsensors; + } + + set + { + _hardwarespeedsensors = value; RaisePropertyChanged(nameof(HardwareSpeedSensors)); + } + + } + + /// + /// Initializes a new instance of the class. + /// + public HardwareSpeedSensorType() : base() + { + + HardwareSpeedSensors = new ObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs index 2b42b68c3..c3d728559 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/HardwareVersion.cs @@ -130,6 +130,25 @@ namespace Tango.BL.Entities } + protected ObservableCollection _hardwarespeedsensors; + /// + /// Gets or sets the hardwareversion hardware speed sensors. + /// + + public virtual ObservableCollection HardwareSpeedSensors + { + get + { + return _hardwarespeedsensors; + } + + set + { + _hardwarespeedsensors = value; RaisePropertyChanged(nameof(HardwareSpeedSensors)); + } + + } + protected ObservableCollection _hardwarewinders; /// /// Gets or sets the hardwareversion hardware winders. @@ -163,6 +182,8 @@ namespace Tango.BL.Entities HardwarePidControls = new ObservableCollection(); + HardwareSpeedSensors = new ObservableCollection(); + HardwareWinders = new ObservableCollection(); } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/HardwareSpeedSensorTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/HardwareSpeedSensorTypes.cs new file mode 100644 index 000000000..5f4df1b9a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/HardwareSpeedSensorTypes.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum HardwareSpeedSensorTypes + { + + /// + /// (Default Speed Sensor) + /// + [Description("Default Speed Sensor")] + DefaultSpeedSensor = 0, + + } +} diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index bad489e0b..fcdfd9f50 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -244,6 +244,22 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the HardwareSpeedSensorTypes. + /// + public DbSet HardwareSpeedSensorTypes + { + get; set; + } + + /// + /// Gets or sets the HardwareSpeedSensors. + /// + public DbSet HardwareSpeedSensors + { + get; set; + } + /// /// Gets or sets the HardwareVersions. /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 1687a273e..e4ba90e72 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -1051,6 +1051,78 @@ namespace Tango.BL } + private ObservableCollection _hardwarespeedsensortypes; + /// + /// Gets or sets the HardwareSpeedSensorTypes. + /// + public ObservableCollection HardwareSpeedSensorTypes + { + get + { + return _hardwarespeedsensortypes; + } + + set + { + _hardwarespeedsensortypes = value; RaisePropertyChanged(nameof(HardwareSpeedSensorTypes)); + } + + } + + private ICollectionView _hardwarespeedsensortypesViewSource; + /// + /// Gets or sets the HardwareSpeedSensorTypes View Source. + /// + public ICollectionView HardwareSpeedSensorTypesViewSource + { + get + { + return _hardwarespeedsensortypesViewSource; + } + + set + { + _hardwarespeedsensortypesViewSource = value; RaisePropertyChanged(nameof(HardwareSpeedSensorTypesViewSource)); + } + + } + + private ObservableCollection _hardwarespeedsensors; + /// + /// Gets or sets the HardwareSpeedSensors. + /// + public ObservableCollection HardwareSpeedSensors + { + get + { + return _hardwarespeedsensors; + } + + set + { + _hardwarespeedsensors = value; RaisePropertyChanged(nameof(HardwareSpeedSensors)); + } + + } + + private ICollectionView _hardwarespeedsensorsViewSource; + /// + /// Gets or sets the HardwareSpeedSensors View Source. + /// + public ICollectionView HardwareSpeedSensorsViewSource + { + get + { + return _hardwarespeedsensorsViewSource; + } + + set + { + _hardwarespeedsensorsViewSource = value; RaisePropertyChanged(nameof(HardwareSpeedSensorsViewSource)); + } + + } + private ObservableCollection _hardwareversions; /// /// Gets or sets the HardwareVersions. @@ -2555,6 +2627,10 @@ namespace Tango.BL HardwarePidControlsViewSource = CreateCollectionView(HardwarePidControls); + HardwareSpeedSensorTypesViewSource = CreateCollectionView(HardwareSpeedSensorTypes); + + HardwareSpeedSensorsViewSource = CreateCollectionView(HardwareSpeedSensors); + HardwareVersionsViewSource = CreateCollectionView(HardwareVersions); HardwareWinderTypesViewSource = CreateCollectionView(HardwareWinderTypes); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 6fa01594d..6979ca1e6 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -92,6 +92,8 @@ + + @@ -108,6 +110,7 @@ + diff --git a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.Designer.cs b/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.Designer.cs deleted file mode 100644 index 4b95a83b0..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.Designer.cs +++ /dev/null @@ -1,232 +0,0 @@ -namespace Tango.BuildExtensions -{ - partial class BuildForm - { - /// - /// 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.panel1 = new System.Windows.Forms.Panel(); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnOK = new System.Windows.Forms.Button(); - this.chkBuildSolution = new System.Windows.Forms.CheckBox(); - this.chkUpdateAndBuildPMR = new System.Windows.Forms.CheckBox(); - this.chkGeneratePMR = new System.Windows.Forms.CheckBox(); - this.chkGenerateObservables = new System.Windows.Forms.CheckBox(); - this.chkUpdateDatabase = new System.Windows.Forms.CheckBox(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.btnCancel); - this.panel1.Controls.Add(this.btnOK); - this.panel1.Controls.Add(this.chkBuildSolution); - this.panel1.Controls.Add(this.chkUpdateAndBuildPMR); - this.panel1.Controls.Add(this.chkGeneratePMR); - this.panel1.Controls.Add(this.chkGenerateObservables); - this.panel1.Controls.Add(this.chkUpdateDatabase); - this.panel1.Controls.Add(this.pictureBox1); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.label1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(596, 285); - this.panel1.TabIndex = 2; - // - // btnCancel - // - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.btnCancel.Cursor = System.Windows.Forms.Cursors.Arrow; - this.btnCancel.FlatAppearance.BorderSize = 0; - this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); - this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Location = new System.Drawing.Point(349, 230); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(114, 42); - this.btnCancel.TabIndex = 11; - this.btnCancel.Text = "CANCEL"; - this.btnCancel.UseVisualStyleBackColor = false; - // - // btnOK - // - this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOK.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.btnOK.Cursor = System.Windows.Forms.Cursors.Arrow; - this.btnOK.FlatAppearance.BorderSize = 0; - this.btnOK.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); - this.btnOK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); - this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOK.Location = new System.Drawing.Point(469, 230); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(114, 42); - this.btnOK.TabIndex = 10; - this.btnOK.Text = "START"; - this.btnOK.UseVisualStyleBackColor = false; - // - // chkBuildSolution - // - this.chkBuildSolution.AutoSize = true; - this.chkBuildSolution.Cursor = System.Windows.Forms.Cursors.Arrow; - this.chkBuildSolution.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkBuildSolution.Location = new System.Drawing.Point(27, 196); - this.chkBuildSolution.Name = "chkBuildSolution"; - this.chkBuildSolution.Size = new System.Drawing.Size(108, 20); - this.chkBuildSolution.TabIndex = 9; - this.chkBuildSolution.Text = "Build Solution"; - this.chkBuildSolution.UseVisualStyleBackColor = true; - // - // chkUpdateAndBuildPMR - // - this.chkUpdateAndBuildPMR.AutoSize = true; - this.chkUpdateAndBuildPMR.Cursor = System.Windows.Forms.Cursors.Arrow; - this.chkUpdateAndBuildPMR.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUpdateAndBuildPMR.Location = new System.Drawing.Point(27, 170); - this.chkUpdateAndBuildPMR.Name = "chkUpdateAndBuildPMR"; - this.chkUpdateAndBuildPMR.Size = new System.Drawing.Size(233, 20); - this.chkUpdateAndBuildPMR.TabIndex = 8; - this.chkUpdateAndBuildPMR.Text = "Update and build PMR messages."; - this.chkUpdateAndBuildPMR.UseVisualStyleBackColor = true; - // - // chkGeneratePMR - // - this.chkGeneratePMR.AutoSize = true; - this.chkGeneratePMR.Cursor = System.Windows.Forms.Cursors.Arrow; - this.chkGeneratePMR.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkGeneratePMR.Location = new System.Drawing.Point(27, 144); - this.chkGeneratePMR.Name = "chkGeneratePMR"; - this.chkGeneratePMR.Size = new System.Drawing.Size(215, 20); - this.chkGeneratePMR.TabIndex = 7; - this.chkGeneratePMR.Text = "Generate auto PMR messages."; - this.chkGeneratePMR.UseVisualStyleBackColor = true; - // - // chkGenerateObservables - // - this.chkGenerateObservables.AutoSize = true; - this.chkGenerateObservables.Cursor = System.Windows.Forms.Cursors.Arrow; - this.chkGenerateObservables.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkGenerateObservables.Location = new System.Drawing.Point(27, 118); - this.chkGenerateObservables.Name = "chkGenerateObservables"; - this.chkGenerateObservables.Size = new System.Drawing.Size(223, 20); - this.chkGenerateObservables.TabIndex = 6; - this.chkGenerateObservables.Text = "Generate and build observables."; - this.chkGenerateObservables.UseVisualStyleBackColor = true; - // - // chkUpdateDatabase - // - this.chkUpdateDatabase.AutoSize = true; - this.chkUpdateDatabase.Cursor = System.Windows.Forms.Cursors.Arrow; - this.chkUpdateDatabase.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUpdateDatabase.Location = new System.Drawing.Point(27, 92); - this.chkUpdateDatabase.Name = "chkUpdateDatabase"; - this.chkUpdateDatabase.Size = new System.Drawing.Size(181, 20); - this.chkUpdateDatabase.TabIndex = 5; - this.chkUpdateDatabase.Text = "Update database entities."; - this.chkUpdateDatabase.UseVisualStyleBackColor = true; - // - // pictureBox1 - // - this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Arrow; - this.pictureBox1.Image = global::Tango.BuildExtensions.Properties.Resources.machine_trans_small; - this.pictureBox1.Location = new System.Drawing.Point(499, 47); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(63, 68); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox1.TabIndex = 4; - this.pictureBox1.TabStop = false; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Cursor = System.Windows.Forms.Cursors.Arrow; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(24, 47); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(266, 16); - this.label2.TabIndex = 1; - this.label2.Text = "Select the components you want to initialize."; - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.label1.Cursor = System.Windows.Forms.Cursors.Arrow; - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Margin = new System.Windows.Forms.Padding(0); - this.label1.Name = "label1"; - this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); - this.label1.Size = new System.Drawing.Size(594, 29); - this.label1.TabIndex = 0; - this.label1.Text = "Tango Initializer"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // BuildForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); - this.ClientSize = new System.Drawing.Size(596, 285); - this.ControlBox = false; - this.Controls.Add(this.panel1); - this.ForeColor = System.Drawing.Color.Gainsboro; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "BuildForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Tango Initializer"; - this.TopMost = true; - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.CheckBox chkUpdateDatabase; - private System.Windows.Forms.CheckBox chkGenerateObservables; - private System.Windows.Forms.CheckBox chkGeneratePMR; - private System.Windows.Forms.CheckBox chkUpdateAndBuildPMR; - private System.Windows.Forms.CheckBox chkBuildSolution; - private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Button btnCancel; - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.cs b/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.cs deleted file mode 100644 index ff75ec321..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Tango.BuildExtensions -{ - public partial class BuildForm : Form - { - public bool UpdateDataBaseEntities { get; set; } - public bool GenerateAndBuildObservables { get; set; } - public bool GenerateAutoPmrMessages { get; set; } - public bool UpdateAndBuildPmrMessages { get; set; } - public bool BuildSolution { get; set; } - - public BuildForm() - { - InitializeComponent(); - - btnOK.Click += BtnOK_Click; - btnCancel.Click += BtnCancel_Click; - } - - private void BtnCancel_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); - } - - private void BtnOK_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - - UpdateDataBaseEntities = chkUpdateDatabase.Checked; - GenerateAndBuildObservables = chkGenerateObservables.Checked; - GenerateAutoPmrMessages = chkGeneratePMR.Checked; - UpdateAndBuildPmrMessages = chkUpdateAndBuildPMR.Checked; - BuildSolution = chkBuildSolution.Checked; - - Close(); - } - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.resx b/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/BuildForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Software/Visual_Studio/Tango.BuildExtensions/Key.snk b/Software/Visual_Studio/Tango.BuildExtensions/Key.snk deleted file mode 100644 index e536d20c4..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Key.snk and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.Designer.cs b/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.Designer.cs deleted file mode 100644 index fd70df334..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.Designer.cs +++ /dev/null @@ -1,138 +0,0 @@ -namespace Tango.BuildExtensions -{ - partial class SelectForm - { - /// - /// 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.label1 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.lbSTatus = new System.Windows.Forms.Label(); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Margin = new System.Windows.Forms.Padding(0); - this.label1.Name = "label1"; - this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); - this.label1.Size = new System.Drawing.Size(483, 29); - this.label1.TabIndex = 0; - this.label1.Text = "Tango Initializer"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.label1.UseWaitCursor = true; - // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.pictureBox1); - this.panel1.Controls.Add(this.lbSTatus); - this.panel1.Controls.Add(this.progressBar1); - this.panel1.Controls.Add(this.label1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(485, 156); - this.panel1.TabIndex = 1; - this.panel1.UseWaitCursor = true; - // - // pictureBox1 - // - this.pictureBox1.Image = global::Tango.BuildExtensions.Properties.Resources.machine_trans_small; - this.pictureBox1.Location = new System.Drawing.Point(12, 40); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(63, 68); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox1.TabIndex = 3; - this.pictureBox1.TabStop = false; - this.pictureBox1.UseWaitCursor = true; - // - // lbSTatus - // - this.lbSTatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbSTatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbSTatus.Location = new System.Drawing.Point(41, 56); - this.lbSTatus.Name = "lbSTatus"; - this.lbSTatus.Size = new System.Drawing.Size(404, 44); - this.lbSTatus.TabIndex = 2; - this.lbSTatus.Text = "Initializing..."; - this.lbSTatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.lbSTatus.UseWaitCursor = true; - // - // progressBar1 - // - this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.progressBar1.Location = new System.Drawing.Point(11, 120); - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(461, 23); - this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; - this.progressBar1.TabIndex = 1; - this.progressBar1.UseWaitCursor = true; - this.progressBar1.Value = 50; - // - // SelectForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); - this.ClientSize = new System.Drawing.Size(485, 156); - this.ControlBox = false; - this.Controls.Add(this.panel1); - this.ForeColor = System.Drawing.Color.Gainsboro; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SelectForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Tango Initializer"; - this.TopMost = true; - this.UseWaitCursor = true; - this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.ProgressBar progressBar1; - private System.Windows.Forms.Label lbSTatus; - private System.Windows.Forms.PictureBox pictureBox1; - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.cs b/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.cs deleted file mode 100644 index 349721155..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Tango.BuildExtensions -{ - public partial class SelectForm : Form - { - public SelectForm() - { - InitializeComponent(); - } - - public void SetStatus(String text) - { - lbSTatus.Text = text; - } - - protected override bool ShowWithoutActivation - { - get - { - return true; - } - } - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.resx b/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/ProgressForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Software/Visual_Studio/Tango.BuildExtensions/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.BuildExtensions/Properties/AssemblyInfo.cs deleted file mode 100644 index e1969199b..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +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("Tango.BuildExtensions")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Tango.BuildExtensions")] -[assembly: AssemblyCopyright("")] -[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)] - -// 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/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.Designer.cs deleted file mode 100644 index 7e1f6dd26..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.Designer.cs +++ /dev/null @@ -1,83 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.BuildExtensions.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.BuildExtensions.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap machine_trans_16x16 { - get { - object obj = ResourceManager.GetObject("machine-trans-16x16", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap machine_trans_small { - get { - object obj = ResourceManager.GetObject("machine_trans_small", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.resx b/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.resx deleted file mode 100644 index b51e9537e..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/Properties/Resources.resx +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - ..\Resources\machine-trans-small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\machine-trans-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommand.png b/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommand.png deleted file mode 100644 index b22d975cb..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommand.png and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico b/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico deleted file mode 100644 index d323b07fb..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommand.png b/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommand.png deleted file mode 100644 index b22d975cb..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommand.png and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico b/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico deleted file mode 100644 index d323b07fb..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-16x16.png b/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-16x16.png deleted file mode 100644 index 920049c15..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-16x16.png and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-small.png b/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-small.png deleted file mode 100644 index fb9a19df9..000000000 Binary files a/Software/Visual_Studio/Tango.BuildExtensions/Resources/machine-trans-small.png and /dev/null differ diff --git a/Software/Visual_Studio/Tango.BuildExtensions/Tango.BuildExtensions.csproj b/Software/Visual_Studio/Tango.BuildExtensions/Tango.BuildExtensions.csproj deleted file mode 100644 index e20a42e3c..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/Tango.BuildExtensions.csproj +++ /dev/null @@ -1,245 +0,0 @@ - - - - - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - true - - - true - - - Key.snk - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {43A25F41-EE8C-4A29-94D2-4CBC603E6B29} - Library - Properties - Tango.BuildExtensions - Tango.BuildExtensions - v4.6 - true - true - true - true - true - false - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - Form - - - BuildForm.cs - - - Form - - - ProgressForm.cs - - - - True - True - Resources.resx - - - - - True - True - VSPackage.resx - - - - - - - - Designer - - - - - - - - Menus.ctmenu - - - - - - - - - - ..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll - - - False - - - False - - - False - - - False - - - - False - - - ..\packages\Microsoft.VisualStudio.CoreUtility.15.0.26201\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - True - - - ..\packages\Microsoft.VisualStudio.Imaging.15.0.26201\lib\net45\Microsoft.VisualStudio.Imaging.dll - True - - - ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.15.0.15.0.26201\lib\Microsoft.VisualStudio.Shell.15.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Framework.15.0.26201\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Threading.15.0.240\lib\net45\Microsoft.VisualStudio.Threading.dll - True - - - ..\packages\Microsoft.VisualStudio.Utilities.15.0.26201\lib\net45\Microsoft.VisualStudio.Utilities.dll - True - - - ..\packages\Microsoft.VisualStudio.Validation.15.0.82\lib\net45\Microsoft.VisualStudio.Validation.dll - True - - - False - - - - - - - - - ..\packages\TestStack.White.0.13.3\lib\net40\TestStack.White.dll - - - True - - - - - BuildForm.cs - - - ProgressForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - - - true - VSPackage - ResXFileCodeGenerator - VSPackage.Designer.cs - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommand.cs b/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommand.cs deleted file mode 100644 index d462e5f75..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommand.cs +++ /dev/null @@ -1,598 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Copyright (c) Company. All rights reserved. -// -//------------------------------------------------------------------------------ - -using System; -using System.ComponentModel.Design; -using System.Globalization; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using System.Collections.Generic; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio; -using System.Linq; -using TestStack.White.UIItems.Finders; -using TestStack.White.InputDevices; -using TestStack.White.UIItems; -using VSLangProj; -using System.Runtime.InteropServices; -using TestStack.White.WindowsAPI; -using System.IO; - -namespace Tango.BuildExtensions -{ - /// - /// Command handler - /// - internal sealed class TangoBuildCommand - { - private DTE2 _dte; - private IList _projects; - private SelectForm _form; - private TestStack.White.Application _application; - private TestStack.White.UIItems.WindowItems.Window _window; - private System.Diagnostics.Process _vsProcess; - - private const String dalProjectName = "Tango.DAL.Remote"; - private const String edmxModelName = "RemoteADO.edmx"; - private const String observablesGeneratorProjectName = "Tango.DBObservablesGenerator.CLI"; - private const String observablesProjectName = "Tango.BL"; - private const String pmrGeneratorProjectName = "Tango.PMRGenerator.CLI"; - private const String pmrProjectName = "Tango.PMR"; - - #region Redundant - - /// - /// Command ID. - /// - public const int CommandId = 0x0100; - - /// - /// Command menu group (command set GUID). - /// - public static readonly Guid CommandSet = new Guid("c03a7b01-8109-4ec5-8f90-858bed027e5d"); - - /// - /// VS Package that provides this command, not null. - /// - private readonly Package package; - - /// - /// Initializes a new instance of the class. - /// Adds our command handlers for menu (commands must exist in the command table file) - /// - /// Owner package, not null. - private TangoBuildCommand(Package package) - { - if (package == null) - { - throw new ArgumentNullException("package"); - } - - this.package = package; - - OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; - if (commandService != null) - { - var menuCommandID = new CommandID(CommandSet, CommandId); - var menuItem = new MenuCommand(this.MenuItemCallback, menuCommandID); - commandService.AddCommand(menuItem); - } - } - - /// - /// Gets the instance of the command. - /// - public static TangoBuildCommand Instance - { - get; - private set; - } - - /// - /// Gets the service provider from the owner package. - /// - private IServiceProvider ServiceProvider - { - get - { - return this.package; - } - } - - /// - /// Initializes the singleton instance of the command. - /// - /// Owner package, not null. - public static void Initialize(Package package) - { - Instance = new TangoBuildCommand(package); - } - - /// - /// This function is the callback used to execute the command when the menu item is clicked. - /// See the constructor to see how the menu item is associated with this function using - /// OleMenuCommandService service and MenuCommand class. - /// - /// Event sender. - /// Event args. - private void MenuItemCallback(object sender, EventArgs e) - { - Start(); - } - - #endregion - - #region Main - - private void Start() - { - _form = null; - - BuildForm buildForm = new BuildForm(); - if (buildForm.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; - - System.Threading.Tasks.Task.Factory.StartNew(() => - { - _projects = Projects().ToList(); - - String vsWindowTitle = _dte.DTE.MainWindow.Caption; - _vsProcess = System.Diagnostics.Process.GetProcesses().ToList().SingleOrDefault(x => x.MainWindowTitle == vsWindowTitle); - _application = TestStack.White.Application.Attach(_vsProcess); - _window = _application.GetWindow(vsWindowTitle); - - OpenProgressForm(); - - try - { - if (buildForm.UpdateDataBaseEntities) - { - UpdateDatabaseEntities(); - } - if (buildForm.GenerateAndBuildObservables) - { - GenerateAndBuildObservables(); - } - if (buildForm.GenerateAutoPmrMessages) - { - GenerateAutoPMRMessages(); - } - if (buildForm.UpdateAndBuildPmrMessages) - { - UpdateAndBuildPmrMessages(); - } - if (buildForm.BuildSolution) - { - BuildSolution(); - } - - SetStatusText("Done!"); - Wait(1000); - CloseProgressForm(); - } - catch (Exception ex) - { - CloseProgressForm(); - ShowMessage(ex.Message); - } - }); - } - - private void UpdateDatabaseEntities() - { - var project = _projects.SingleOrDefault(x => x.Name == dalProjectName); - - if (project == null) - { - throw new NullReferenceException("Could not find the Tango solution!"); - } - - var projectItems = project.ProjectItems.OfType().ToList(); - - SetStatusText("Locating " + edmxModelName + " scheme..."); - - var items = GetProjectItemsDeep(project); - - var edmx = GetProjectItemsDeep(project).SingleOrDefault(x => x.Name == edmxModelName); - - if (edmx == null) - { - throw new NullReferenceException("Could not locate " + edmxModelName + "!"); - } - - SetStatusText("Expanding diagram..."); - - edmx.ExpandView(); - - SetStatusText("Opening edmx diagram window..."); - - Window win = edmx.Open(EnvDTE.Constants.vsViewKindPrimary); - win.Visible = true; - - SetStatusText("Waiting for edmx diagram window..."); - - _window.WaitTill(() => _window.Get(SearchCriteria.ByText(edmxModelName + " [Diagram1]")) != null); - - SetStatusText("Cleaning up edmx scheme..."); - - _dte.MainWindow.Activate(); - _dte.ExecuteCommand("Edit.SelectAll"); - Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DELETE); - WaitForWindowOpen("Delete Unmapped Tables and Views").PressKey(KeyboardInput.SpecialKeys.RETURN); - WaitForWindowClose("Delete Unmapped Tables and Views"); - - _window.WaitWhileBusy(); - - SetStatusText("Reinitializing edmx scheme..."); - - var window = WindowInfo.GetWindow(edmxModelName + " [Diagram1]*"); - window.SetActive(); - - Keyboard.Instance.HoldKey(KeyboardInput.SpecialKeys.SHIFT); - Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.F10); - Keyboard.Instance.LeaveAllKeys(); - - Wait(100); - - for (int i = 0; i < 7; i++) - { - Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN); - Wait(10); - } - - Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN); - - var updateWindow = WaitForWindowOpen("Update Wizard"); - - _window.WaitWhileBusy(); - - Wait(1000); - - updateWindow.PressKey(KeyboardInput.SpecialKeys.SPACE); - - Wait(50); - - updateWindow.PressKey(KeyboardInput.SpecialKeys.RETURN); - - SetStatusText("Generating edmx scheme..."); - - WaitForWindowClose("Update Wizard"); - - _window.WaitWhileBusy(); - - SetStatusText("Saving changes..."); - - win.Close(vsSaveChanges.vsSaveChangesYes); - - _window.WaitWhileBusy(); - - foreach (var template in edmx.ProjectItems.OfType().Where(x => x.Name.EndsWith(".tt"))) - { - SetStatusText("Running custom tool for " + template.Name + "..."); - (template.Object as VSProjectItem).RunCustomTool(); - _window.WaitWhileBusy(); - } - - _window.WaitWhileBusy(); - - SetStatusText("Building project " + dalProjectName + "..."); - - _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); - - if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) - { - throw new ExternalException(dalProjectName + " failed to build!"); - } - } - - private void GenerateAndBuildObservables() - { - var project = _projects.SingleOrDefault(x => x.Name == observablesGeneratorProjectName); - - if (project == null) - { - throw new NullReferenceException("Could not locate project " + observablesGeneratorProjectName); - } - - SetStatusText("Building project " + observablesGeneratorProjectName + "..."); - - _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); - - _dte.Solution.Properties.Item("StartupProject").Value = observablesGeneratorProjectName; - - SetStatusText("Executing observables generator..."); - - _dte.ExecuteCommand("Debug.Start"); - - WaitForWindowOpen("Tango Observables Generator"); - - WaitForWindowClose("Tango Observables Generator"); - - var observablesProject = _projects.SingleOrDefault(x => x.Name == observablesProjectName); - - if (observablesProject == null) - { - throw new NullReferenceException("Could not locate project " + observablesProjectName); - } - - SetStatusText("Updating " + observablesProjectName + "..."); - - foreach (var file in Directory.GetFiles(Path.GetDirectoryName(observablesProject.FileName), "*.cs", SearchOption.AllDirectories)) - { - String parentFolderName = Path.GetFileName(Path.GetDirectoryName(file)); - - if (parentFolderName != "Debug" && parentFolderName != "Release" && parentFolderName != "obj") - { - SetStatusText("Adding/Updating file " + Path.GetFileName(file) + "..."); - observablesProject.ProjectItems.AddFromFile(file); - Wait(10); - } - } - - SetStatusText("Building project " + observablesProjectName + "..."); - - _dte.Solution.SolutionBuild.BuildProject("Debug", observablesProject.FullName, true); - - if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) - { - throw new ExternalException(observablesProjectName + " failed to build!"); - } - } - - private void GenerateAutoPMRMessages() - { - var project = _projects.SingleOrDefault(x => x.Name == pmrGeneratorProjectName); - - if (project == null) - { - throw new NullReferenceException("Could not locate project " + pmrGeneratorProjectName); - } - - SetStatusText("Building project " + pmrGeneratorProjectName + "..."); - - _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); - - _dte.Solution.Properties.Item("StartupProject").Value = pmrGeneratorProjectName; - - SetStatusText("Executing PMR generator..."); - - _dte.ExecuteCommand("Debug.Start"); - - WaitForWindowOpen("Tango PMR Generator"); - - WaitForWindowClose("Tango PMR Generator"); - } - - private void UpdateAndBuildPmrMessages() - { - var project = _projects.SingleOrDefault(x => x.Name == pmrProjectName); - - if (project == null) - { - throw new NullReferenceException("Could not locate project " + pmrProjectName); - } - - SetStatusText("Updating " + pmrProjectName + "..."); - - foreach (var file in Directory.GetFiles(Path.GetDirectoryName(project.FileName), "*.cs", SearchOption.AllDirectories)) - { - String parentFolderName = Path.GetFileName(Path.GetDirectoryName(file)); - - if (parentFolderName != "Debug" && parentFolderName != "Release" && parentFolderName != "obj") - { - SetStatusText("Adding/Updating file " + Path.GetFileName(file) + "..."); - project.ProjectItems.AddFromFile(file); - Wait(10); - } - } - - SetStatusText("Building project " + pmrProjectName + "..."); - - _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); - - if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) - { - throw new ExternalException(pmrProjectName + " failed to build!"); - } - } - - private void BuildSolution() - { - SetStatusText("Building solution..."); - _dte.Solution.SolutionBuild.Build(true); - - if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) - { - throw new ExternalException("Error building solution!"); - } - } - - #endregion - - #region Solution & Projects - - public DTE2 GetActiveIDE() - { - // Get an instance of currently running Visual Studio IDE. - DTE2 dte2 = Package.GetGlobalService(typeof(DTE)) as DTE2; - _dte = dte2; - return dte2; - } - - public IList Projects() - { - Projects projects = GetActiveIDE().Solution.Projects; - List list = new List(); - var item = projects.GetEnumerator(); - while (item.MoveNext()) - { - var project = item.Current as Project; - if (project == null) - { - continue; - } - - if (project.Kind == ProjectKinds.vsProjectKindSolutionFolder) - { - list.AddRange(GetSolutionFolderProjects(project)); - } - else - { - list.Add(project); - } - } - - return list; - } - - private IEnumerable GetSolutionFolderProjects(Project solutionFolder) - { - List list = new List(); - for (var i = 1; i <= solutionFolder.ProjectItems.Count; i++) - { - var subProject = solutionFolder.ProjectItems.Item(i).SubProject; - if (subProject == null) - { - continue; - } - - // If this is another solution folder, do a recursive call, otherwise add - if (subProject.Kind == ProjectKinds.vsProjectKindSolutionFolder) - { - list.AddRange(GetSolutionFolderProjects(subProject)); - } - else - { - list.Add(subProject); - } - } - return list; - } - - private List GetProjectItemsDeep(Project project) - { - List results = new List(); - FillProjectItems(project.ProjectItems.OfType().ToList(), results); - return results; - } - - private void FillProjectItems(List rootItems, List results) - { - foreach (var item in rootItems) - { - results.Add(item); - - if (item.ProjectItems.Count > 0) - { - FillProjectItems(item.ProjectItems.OfType().ToList(), results); - } - } - } - - #endregion - - #region Notifications - - private void WriteToConsole(String text) - { - // Get the output window - var outputWindow = Package.GetGlobalService(typeof(SVsOutputWindow)) as IVsOutputWindow; - - // Ensure that the desired pane is visible - var paneGuid = Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.GeneralPane_guid; - IVsOutputWindowPane pane; - outputWindow.CreatePane(paneGuid, "General", 1, 0); - outputWindow.GetPane(paneGuid, out pane); - - // Output the message - pane.OutputString(text + Environment.NewLine); - } - - private void ShowMessage(String text) - { - // Show a message box to prove we were here - - VsShellUtilities.ShowMessageBox( - ServiceProvider, - text, - "Tango Initializer", - OLEMSGICON.OLEMSGICON_INFO, - OLEMSGBUTTON.OLEMSGBUTTON_OK, - OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); - } - - #endregion - - #region Windows API - - private WindowInfo WaitForWindowOpen(String title) - { - WindowInfo window = null; - - do - { - window = WindowInfo.GetAllWindows().SelectMany(x => x.Children).FirstOrDefault(x => x.Caption == title); - } while (window == null); - - return window; - } - - private void WaitForWindowClose(String title) - { - while (WindowInfo.GetAllWindows().SelectMany(x => x.Children).ToList().Exists(x => x.Caption == title)) - { - System.Threading.Thread.Sleep(100); - } - } - - #endregion - - #region Threading - - private void Wait(int milli) - { - System.Threading.Thread.Sleep(milli); - } - - #endregion - - #region Status Form - - private void OpenProgressForm() - { - System.Threading.Thread thread = new System.Threading.Thread(() => - { - _form = new SelectForm(); - var handle = _form.Handle; - _form.ShowDialog(); - }); - - thread.SetApartmentState(System.Threading.ApartmentState.STA); - thread.Start(); - - while (_form == null || !_form.IsHandleCreated) { } - } - - private void SetStatusText(String text) - { - _form.Invoke(new Action(() => - { - _form.SetStatus(text); - })); - } - - private void CloseProgressForm() - { - _form.Invoke(new Action(() => - { - _form.Close(); - _form = null; - })); - } - - #endregion - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.cs b/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.cs deleted file mode 100644 index f31bb8193..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.cs +++ /dev/null @@ -1,75 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Copyright (c) Company. All rights reserved. -// -//------------------------------------------------------------------------------ - -using System; -using System.ComponentModel.Design; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Runtime.InteropServices; -using Microsoft.VisualStudio; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.Win32; - -namespace Tango.BuildExtensions -{ - /// - /// This is the class that implements the package exposed by this assembly. - /// - /// - /// - /// The minimum requirement for a class to be considered a valid package for Visual Studio - /// is to implement the IVsPackage interface and register itself with the shell. - /// This package uses the helper classes defined inside the Managed Package Framework (MPF) - /// to do it: it derives from the Package class that provides the implementation of the - /// IVsPackage interface and uses the registration attributes defined in the framework to - /// register itself and its components with the shell. These attributes tell the pkgdef creation - /// utility what data to put into .pkgdef file. - /// - /// - /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. - /// - /// - [PackageRegistration(UseManagedResourcesOnly = true)] - [InstalledProductRegistration("#1110", "#1112", "1.0", IconResourceID = 1400)] // Info on this package for Help/About - [ProvideMenuResource("Menus.ctmenu", 1)] - [Guid(TangoBuildCommandPackage.PackageGuidString)] - [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] - public sealed class TangoBuildCommandPackage : Package - { - /// - /// TangoBuildCommandPackage GUID string. - /// - public const string PackageGuidString = "f911efc8-1a59-4b5f-953d-d715ddd70710"; - - /// - /// Initializes a new instance of the class. - /// - public TangoBuildCommandPackage() - { - // Inside this method you can place any initialization code that does not require - // any Visual Studio service because at this point the package object is created but - // not sited yet inside Visual Studio environment. The place to do all the other - // initialization is the Initialize method. - } - - #region Package Members - - /// - /// Initialization of the package; this method is called right after the package is sited, so this is the place - /// where you can put all the initialization code that rely on services provided by VisualStudio. - /// - protected override void Initialize() - { - TangoBuildCommand.Initialize(this); - base.Initialize(); - } - - #endregion - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.vsct b/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.vsct deleted file mode 100644 index 06eec602e..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/TangoBuildCommandPackage.vsct +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.Designer.cs b/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.Designer.cs deleted file mode 100644 index 13fd3a51b..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tango.BuildExtensions { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class VSPackage { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal VSPackage() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.BuildExtensions.VSPackage", typeof(VSPackage).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). - /// - internal static System.Drawing.Icon _400 { - get { - object obj = ResourceManager.GetObject("400", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.resx b/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.resx deleted file mode 100644 index 4d0826c19..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/VSPackage.resx +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - Resources\BuildTangoCommandPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - TangoBuildCommand Extension - - - TangoBuildCommand Visual Stuido Extension Detailed Info - - - Resources\TangoBuildCommandPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/WindowInfo.cs b/Software/Visual_Studio/Tango.BuildExtensions/WindowInfo.cs deleted file mode 100644 index 535ee7ce1..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/WindowInfo.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using TestStack.White.InputDevices; -using TestStack.White.WindowsAPI; - -namespace Tango.BuildExtensions -{ - public class WindowInfo - { - [DllImport("user32.dll", EntryPoint = "GetDesktopWindow")] - static extern IntPtr GetDesktopWindow(); - - [DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)] - static extern int SendMessage(IntPtr hwndControl, uint Msg, int wParam, StringBuilder strBuffer); // get text - - [DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)] - static extern int SendMessage(IntPtr hwndControl, uint Msg, int wParam, int lParam); // text length - - [DllImport("user32.dll", EntryPoint = "FindWindowEx", CharSet = CharSet.Auto)] - static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); - - [DllImport("user32.dll")] - private static extern bool SetForegroundWindow(IntPtr hWnd); - - private static List GetAllChildrenHandles(IntPtr hParent, int maxCount) - { - List result = new List(); - int ct = 0; - IntPtr prevChild = IntPtr.Zero; - IntPtr currChild = IntPtr.Zero; - while (true && ct < maxCount) - { - currChild = FindWindowEx(hParent, prevChild, null, null); - if (currChild == IntPtr.Zero) break; - result.Add(currChild); - prevChild = currChild; - ++ct; - } - return result; - } - - private static int GetCaptionTextLength(IntPtr hTextBox) - { - // helper for GetCaptionText - uint WM_GETTEXTLENGTH = 0x000E; - int result = SendMessage(hTextBox, WM_GETTEXTLENGTH, - 0, 0); - return result; - } - - private static string GetCaptionText(IntPtr hTextBox) - { - uint WM_GETTEXT = 0x000D; - int len = GetCaptionTextLength(hTextBox); - if (len <= 0) return null; // no text. consider empty string instead. - StringBuilder sb = new StringBuilder(len + 1); - SendMessage(hTextBox, WM_GETTEXT, len + 1, sb); - return sb.ToString(); - } - - public IntPtr Handle { get; set; } - public int Level { get; set; } - public String Caption { get; set; } - public WindowInfo Parent { get; set; } - public List Children { get; set; } - - public WindowInfo() - { - Children = new List(); - } - - public void SetActive() - { - SetForegroundWindow(Handle); - } - - public void PressKey(KeyboardInput.SpecialKeys key) - { - SetActive(); - Keyboard.Instance.PressSpecialKey(key); - } - - public override string ToString() - { - return Caption; - } - - public static List GetAllWindows() - { - List windows = new List(); - - IntPtr hDesktop = GetDesktopWindow(); - WindowInfo desktop = new WindowInfo(); - desktop.Handle = hDesktop; - desktop.Level = 0; - desktop.Caption = "(Desktop)"; - desktop.Parent = null; - windows.Add(desktop); - - FillWindows(desktop, desktop.Children); - - return windows; - } - - private static void FlattenWindows(WindowInfo parent, List windows) - { - windows.Add(parent); - - foreach (var window in parent.Children) - { - windows.Add(window); - FlattenWindows(window, windows); - } - } - - public static WindowInfo GetWindow(String title) - { - var windows = GetAllWindows(); - - List flatList = new List(); - FlattenWindows(windows.First(), flatList); - - return flatList.FirstOrDefault(x => x.Caption == title); - } - - private static void FillWindows(WindowInfo parent, List windows) - { - foreach (var handle in GetAllChildrenHandles(parent.Handle, 5000)) - { - WindowInfo child = new WindowInfo(); - child.Handle = handle; - child.Level = parent.Level + 1; - child.Caption = GetCaptionText(handle); - child.Parent = parent; - - if (child.Caption != null) - { - windows.Add(child); - } - - FillWindows(child, child.Children); - } - } - } -} diff --git a/Software/Visual_Studio/Tango.BuildExtensions/index.html b/Software/Visual_Studio/Tango.BuildExtensions/index.html deleted file mode 100644 index 1fee824a3..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/index.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - Getting Started - - - -
- - -
-
-

Creating a Visual Studio Extension

- -

This project enables developers to create an extension for Visual Studio. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

-

Add new features

- -
    -
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. -
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. -
  5. Choose from the available item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Command, Tool Window, Toolbox Control, and then click Add.
  6. -
- -

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add additional item templates.

- -

Run and debug

-

To run the project, press F5. Visual Studio will:

- -
    -
  • Build the extension from the VSIX project.
  • -
  • Create a VSIX package from the VSIX project.
  • -
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • -
- -

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

- -
-
-
-

Visual Studio Extensibility Resources

- -
    -
  1. Visual Studio documentation
    Detailed documentation and API reference material for building extensions.
  2. -
  3. Extension samples on GitHub
    Use a sample project to kickstart your development.
  4. -
  5. Extensibility chat room on Gitter
    Meet other extension developers and exchange tips and tricks for extension development.
  6. -
  7. Channel 9 videos on extensibility
    Watch videos from the product team on Visual Studio extensibility.
  8. -
  9. Extensibility Tools
    Install an optional helper tool that adds extra IDE support for extension authors.
  10. -
-

Give us feedback

- -
-
-
-
- - diff --git a/Software/Visual_Studio/Tango.BuildExtensions/packages.config b/Software/Visual_Studio/Tango.BuildExtensions/packages.config deleted file mode 100644 index c81549d43..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/packages.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BuildExtensions/source.extension.vsixmanifest b/Software/Visual_Studio/Tango.BuildExtensions/source.extension.vsixmanifest deleted file mode 100644 index 44c933587..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/source.extension.vsixmanifest +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Tango Build Extensions - Build automation extensions for Twine Tango system. - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/Tango.BuildExtensions/stylesheet.css b/Software/Visual_Studio/Tango.BuildExtensions/stylesheet.css deleted file mode 100644 index d5e9c71a8..000000000 --- a/Software/Visual_Studio/Tango.BuildExtensions/stylesheet.css +++ /dev/null @@ -1,129 +0,0 @@ -body { - margin: 0; - padding: 0; - border: 0; - color: #1E1E1E; - font-size: 13px; - font-family: "Segoe UI", Helvetica, Arial, sans-serif; - line-height: 1.45; - word-wrap: break-word; -} - -/* General & 'Reset' Stuff */ - - -.container { - width: 980px; - margin: 0 auto; -} - -section { - display: block; - margin: 0; -} - -h1, h2, h3, h4, h5, h6 { - margin: 0; -} - -/* Header,
- header - container - h1 - project name - h2 - project description -*/ - -#header { - color: #FFF; - background: #68217a; - position:relative; -} -#hangcloud { - width: 190px; - height: 160px; - background: url("../images/bannerart03.png"); - position: absolute; - top: 0; - right: -30px; -} -h1, h2 { - font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; - line-height: 1; - margin: 0 18px; - padding: 0; -} -#header h1 { - font-size: 3.4em; - padding-top: 18px; - font-weight: normal; - margin-left: 15px; -} - -#header h2 { - font-size: 1.5em; - margin-top: 10px; - padding-bottom: 18px; - font-weight: normal; -} - - -#main_content { - width: 100%; - display: flex; - flex-direction: row; -} - - -h1, h2, h3, h4, h5, h6 { - font-weight: bolder; -} - -#main_content h1 { - font-size: 1.8em; - margin-top: 34px; -} - - #main_content h1:first-child { - margin-top: 30px; - } - -#main_content h2 { - font-size: 1.4em; - font-weight: bold; -} -p, ul { - margin: 11px 18px; -} - -#main_content a { - color: #06C; - text-decoration: none; -} -ul { - margin-top: 13px; - margin-left: 18px; - padding-left: 0; -} - ul li { - margin-left: 18px; - padding-left: 0; - } -#lpanel { - width: 620px; - float: left; -} -#rpanel ul { - list-style-type: none; - width: 300px; -} - #rpanel ul li { - line-height: 1.8em; - } -#rpanel { - background: #e7e7e7; - width: 360px; - float: right; -} - -#rpanel div { - width: 300px; -} diff --git a/Software/Visual_Studio/Tango.Core/IO/TemporaryFolder.cs b/Software/Visual_Studio/Tango.Core/IO/TemporaryFolder.cs index f9cc4a088..c29640f19 100644 --- a/Software/Visual_Studio/Tango.Core/IO/TemporaryFolder.cs +++ b/Software/Visual_Studio/Tango.Core/IO/TemporaryFolder.cs @@ -47,7 +47,7 @@ namespace Tango.Core.IO { if (Directory.Exists(Path)) { - Directory.Delete(Path); + Directory.Delete(Path, true); } return true; diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSORS.cs new file mode 100644 index 000000000..789fb0903 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSORS.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class HARDWARE_SPEED_SENSORS + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string HARDWARE_SPEED_SENSOR_TYPE_GUID { get; set; } + public string HARDWARE_VERSION_GUID { get; set; } + public int RESOLUTION_BITS { get; set; } + public double PERIMETER { get; set; } + + public virtual HARDWARE_SPEED_SENSOR_TYPES HARDWARE_SPEED_SENSOR_TYPES { get; set; } + public virtual HARDWARE_VERSIONS HARDWARE_VERSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSOR_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSOR_TYPES.cs new file mode 100644 index 000000000..59d98b118 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_SPEED_SENSOR_TYPES.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class HARDWARE_SPEED_SENSOR_TYPES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public HARDWARE_SPEED_SENSOR_TYPES() + { + this.HARDWARE_SPEED_SENSORS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public int CODE { get; set; } + public string NAME { get; set; } + public string DESCRIPTION { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection HARDWARE_SPEED_SENSORS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs index b78fe45b1..8948e6e17 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs @@ -21,6 +21,7 @@ namespace Tango.DAL.Remote.DB this.HARDWARE_DANCERS = new HashSet(); this.HARDWARE_MOTORS = new HashSet(); this.HARDWARE_PID_CONTROLS = new HashSet(); + this.HARDWARE_SPEED_SENSORS = new HashSet(); this.HARDWARE_WINDERS = new HashSet(); } @@ -39,6 +40,8 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HARDWARE_PID_CONTROLS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection HARDWARE_SPEED_SENSORS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HARDWARE_WINDERS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index 303927711..9cd8a0449 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -54,6 +54,8 @@ namespace Tango.DAL.Remote.DB public virtual DbSet HARDWARE_MOTORS { get; set; } public virtual DbSet HARDWARE_PID_CONTROL_TYPES { get; set; } public virtual DbSet HARDWARE_PID_CONTROLS { get; set; } + public virtual DbSet HARDWARE_SPEED_SENSOR_TYPES { get; set; } + public virtual DbSet HARDWARE_SPEED_SENSORS { get; set; } public virtual DbSet HARDWARE_VERSIONS { get; set; } public virtual DbSet HARDWARE_WINDER_TYPES { get; set; } public virtual DbSet HARDWARE_WINDERS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 5c66fe623..c7d768912 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -427,6 +427,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -1298,6 +1321,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1898,6 +1947,8 @@ + + @@ -2046,6 +2097,14 @@ + + + + + + + + @@ -2257,6 +2316,8 @@ + + @@ -2453,6 +2514,14 @@ + + + + + + + + @@ -3059,6 +3128,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3072,6 +3167,7 @@ + @@ -4175,6 +4271,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5044,6 +5166,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index c86db79d6..dc7bcc663 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,75 +5,77 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -113,6 +115,8 @@ + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index 3bc4eccec..bc7c6749b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -152,6 +152,12 @@ RemoteADO.tt + + RemoteADO.tt + + + RemoteADO.tt + RemoteADO.tt diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensor.cs new file mode 100644 index 000000000..489c0f4fd --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensor.cs @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: HardwareSpeedSensor.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Hardware { + + /// Holder for reflection information generated from HardwareSpeedSensor.proto + public static partial class HardwareSpeedSensorReflection { + + #region Descriptor + /// File descriptor for HardwareSpeedSensor.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static HardwareSpeedSensorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlIYXJkd2FyZVNwZWVkU2Vuc29yLnByb3RvEhJUYW5nby5QTVIuSGFyZHdh", + "cmUaHUhhcmR3YXJlU3BlZWRTZW5zb3JUeXBlLnByb3RvIo4BChNIYXJkd2Fy", + "ZVNwZWVkU2Vuc29yEkwKF0hhcmR3YXJlU3BlZWRTZW5zb3JUeXBlGAEgASgO", + "MisuVGFuZ28uUE1SLkhhcmR3YXJlLkhhcmR3YXJlU3BlZWRTZW5zb3JUeXBl", + "EhYKDlJlc29sdXRpb25CaXRzGAIgASgFEhEKCVBlcmltZXRlchgDIAEoAUIe", + "Chxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareSpeedSensorTypeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareSpeedSensor), global::Tango.PMR.Hardware.HardwareSpeedSensor.Parser, new[]{ "HardwareSpeedSensorType", "ResolutionBits", "Perimeter" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class HardwareSpeedSensor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HardwareSpeedSensor()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Hardware.HardwareSpeedSensorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardwareSpeedSensor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardwareSpeedSensor(HardwareSpeedSensor other) : this() { + hardwareSpeedSensorType_ = other.hardwareSpeedSensorType_; + resolutionBits_ = other.resolutionBits_; + perimeter_ = other.perimeter_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardwareSpeedSensor Clone() { + return new HardwareSpeedSensor(this); + } + + /// Field number for the "HardwareSpeedSensorType" field. + public const int HardwareSpeedSensorTypeFieldNumber = 1; + private global::Tango.PMR.Hardware.HardwareSpeedSensorType hardwareSpeedSensorType_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Hardware.HardwareSpeedSensorType HardwareSpeedSensorType { + get { return hardwareSpeedSensorType_; } + set { + hardwareSpeedSensorType_ = value; + } + } + + /// Field number for the "ResolutionBits" field. + public const int ResolutionBitsFieldNumber = 2; + private int resolutionBits_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ResolutionBits { + get { return resolutionBits_; } + set { + resolutionBits_ = value; + } + } + + /// Field number for the "Perimeter" field. + public const int PerimeterFieldNumber = 3; + private double perimeter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Perimeter { + get { return perimeter_; } + set { + perimeter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as HardwareSpeedSensor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(HardwareSpeedSensor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (HardwareSpeedSensorType != other.HardwareSpeedSensorType) return false; + if (ResolutionBits != other.ResolutionBits) return false; + if (Perimeter != other.Perimeter) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (HardwareSpeedSensorType != 0) hash ^= HardwareSpeedSensorType.GetHashCode(); + if (ResolutionBits != 0) hash ^= ResolutionBits.GetHashCode(); + if (Perimeter != 0D) hash ^= Perimeter.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (HardwareSpeedSensorType != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) HardwareSpeedSensorType); + } + if (ResolutionBits != 0) { + output.WriteRawTag(16); + output.WriteInt32(ResolutionBits); + } + if (Perimeter != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Perimeter); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (HardwareSpeedSensorType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwareSpeedSensorType); + } + if (ResolutionBits != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ResolutionBits); + } + if (Perimeter != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(HardwareSpeedSensor other) { + if (other == null) { + return; + } + if (other.HardwareSpeedSensorType != 0) { + HardwareSpeedSensorType = other.HardwareSpeedSensorType; + } + if (other.ResolutionBits != 0) { + ResolutionBits = other.ResolutionBits; + } + if (other.Perimeter != 0D) { + Perimeter = other.Perimeter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + hardwareSpeedSensorType_ = (global::Tango.PMR.Hardware.HardwareSpeedSensorType) input.ReadEnum(); + break; + } + case 16: { + ResolutionBits = input.ReadInt32(); + break; + } + case 25: { + Perimeter = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensorType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensorType.cs new file mode 100644 index 000000000..0d623b491 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareSpeedSensorType.cs @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: HardwareSpeedSensorType.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Hardware { + + /// Holder for reflection information generated from HardwareSpeedSensorType.proto + public static partial class HardwareSpeedSensorTypeReflection { + + #region Descriptor + /// File descriptor for HardwareSpeedSensorType.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static HardwareSpeedSensorTypeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch1IYXJkd2FyZVNwZWVkU2Vuc29yVHlwZS5wcm90bxISVGFuZ28uUE1SLkhh", + "cmR3YXJlKjEKF0hhcmR3YXJlU3BlZWRTZW5zb3JUeXBlEhYKEkRlZmF1bHRT", + "cGVlZFNlbnNvchAAQh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFyZHdhcmVi", + "BnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.HardwareSpeedSensorType), }, null)); + } + #endregion + + } + #region Enums + public enum HardwareSpeedSensorType { + /// + ///Default Speed Sensor + /// + [pbr::OriginalName("DefaultSpeedSensor")] DefaultSpeedSensor = 0, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 1489f27a0..b8561f61f 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -127,6 +127,8 @@ + + diff --git a/Software/Visual_Studio/Tango.Protobuf/CompilerProgressEventArgs.cs b/Software/Visual_Studio/Tango.Protobuf/CompilerProgressEventArgs.cs new file mode 100644 index 000000000..bd56d360f --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/CompilerProgressEventArgs.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf +{ + public class CompilerProgressEventArgs : EventArgs + { + public int Current { get; set; } + public int Total { get; set; } + public String File { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.Protobuf/IProtoCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/IProtoCompiler.cs index 65b07786f..15d65b767 100644 --- a/Software/Visual_Studio/Tango.Protobuf/IProtoCompiler.cs +++ b/Software/Visual_Studio/Tango.Protobuf/IProtoCompiler.cs @@ -11,6 +11,11 @@ namespace Tango.Protobuf ///
public interface IProtoCompiler : IDisposable { + /// + /// Occurs when the compiler has made some progress. + /// + event EventHandler CompilationProgress; + /// /// Compiles the specified .proto message file. /// diff --git a/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs index d58d21ea9..2e51de6df 100644 --- a/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs +++ b/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs @@ -21,6 +21,13 @@ namespace Tango.Protobuf private const String COMPILERS_FOLDER_NAME = "ProtoCompilers"; //Compilers folder name. protected String _compilersPath; //Compilers folder path. private LogManager logManager = LogManager.Default; + private int _currentProgress; + private int _totalProgress; + + /// + /// Occurs when the compiler has made some progress. + /// + public event EventHandler CompilationProgress; /// /// Gets the compiler language. @@ -57,6 +64,13 @@ namespace Tango.Protobuf { logManager.Log("Compiling file " + inputFile); + CompilationProgress?.Invoke(this, new CompilerProgressEventArgs() + { + Current = _currentProgress++, + Total = _totalProgress, + File = inputFile, + }); + var tmpPath = TemporaryManager.Default.CreateFolder(); logManager.Log("Temp path: " + tmpPath); @@ -159,6 +173,9 @@ namespace Tango.Protobuf /// public virtual CompilerFolderResult CompileFolder(string sourceFolder, params String[] includeFolders) { + _currentProgress = 0; + _totalProgress = Directory.GetFiles(sourceFolder, "*.proto", SearchOption.AllDirectories).Length; + if (!UsesDefaultStructure) { logManager.Log("Compiling folder: " + sourceFolder); diff --git a/Software/Visual_Studio/Tango.Protobuf/Tango.Protobuf.csproj b/Software/Visual_Studio/Tango.Protobuf/Tango.Protobuf.csproj index efade39c9..f45a082e4 100644 --- a/Software/Visual_Studio/Tango.Protobuf/Tango.Protobuf.csproj +++ b/Software/Visual_Studio/Tango.Protobuf/Tango.Protobuf.csproj @@ -47,6 +47,7 @@ + diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 4c276c2f4..9ad92d56d 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -171,7 +171,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.BugReporter", "Utilit EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VSIX", "VSIX", "{03937A28-630D-49B6-8344-6980FF7BF7DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.BuildExtensions", "Tango.BuildExtensions\Tango.BuildExtensions.csproj", "{43A25F41-EE8C-4A29-94D2-4CBC603E6B29}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.BuildExtensions", "VSIX\Tango.BuildExtensions\Tango.BuildExtensions.csproj", "{43A25F41-EE8C-4A29-94D2-4CBC603E6B29}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs index 6a63d6591..ae18bb6f4 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs @@ -31,6 +31,7 @@ namespace Tango.PMRGenerator.CLI GenerateHardwarePidControls(db, pmrFolder); GenerateHardwareDispensers(db, pmrFolder); GenerateHardwareWinders(db, pmrFolder); + GenerateHardwareSpeedSensors(db, pmrFolder); GenerateLiquidTypes(db, pmrFolder); GenerateWindingMethods(db, pmrFolder); GenerateSpoolTypes(db, pmrFolder); @@ -243,6 +244,44 @@ namespace Tango.PMRGenerator.CLI File.WriteAllText(Path.Combine(pmrFolder, "Hardware", messageFile.Name + ".proto"), messageString); } + private static void GenerateHardwareSpeedSensors(ObservablesContext db, String pmrFolder) + { + Console.WriteLine("Generating Hardware Speed Sensor Types..."); + + ProtoEnumFile enumFile = new ProtoEnumFile(); + enumFile.Name = "HardwareSpeedSensorType"; + enumFile.Package = "Tango.PMR.Hardware"; + + foreach (var field in db.HardwareSpeedSensorTypes.ToList().OrderBy(x => x.Code)) + { + enumFile.Fields.Add(new EnumerationField() + { + Name = field.Name.Replace(" ", ""), + Value = field.Code, + Description = field.Description, + }); + } + + Console.WriteLine("Generating Hardware Speed Sensor..."); + ProtoMessageFile messageFile = new ProtoMessageFile(); + messageFile.Name = "HardwareSpeedSensor"; + messageFile.Package = "Tango.PMR.Hardware"; + messageFile.Imports.Add("HardwareSpeedSensorType.proto"); + + messageFile.Properties.Add(new ProtoProperty("HardwareSpeedSensorType", "HardwareSpeedSensorType")); + + foreach (var prop in typeof(HardwareSpeedSensor).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive)) + { + messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType))); + } + + String enumString = enumFile.GenerateCode(); + String messageString = messageFile.GenerateCode(); + + File.WriteAllText(Path.Combine(pmrFolder, "Hardware", enumFile.Name + ".proto"), enumString); + File.WriteAllText(Path.Combine(pmrFolder, "Hardware", messageFile.Name + ".proto"), messageString); + } + private static void GenerateLiquidTypes(ObservablesContext db, String pmrFolder) { Console.WriteLine("Generating Dispenser Liquid Types..."); diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Program.cs index 1f58f11fd..621a6d10f 100644 --- a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Program.cs @@ -13,6 +13,8 @@ namespace Tango.Protobuf.CLI { try { + Console.Title = "Tango Protobuf Compiler"; + if (args.Length == 0) { return ExitHelp(); @@ -40,6 +42,21 @@ namespace Tango.Protobuf.CLI try { var compiler = CompilerFactory.CreateCompiler(language); + + compiler.CompilationProgress += (x, e) => + { + try + { + Console.SetCursorPosition(0, 0); + Console.Write(new string(' ', Console.WindowWidth)); + Console.SetCursorPosition(0, 0); + Console.Write("Compiling " + Path.GetFileName(e.File) + "..."); + Console.SetCursorPosition(Console.WindowWidth - 7, 0); + Console.Write("(% " + Math.Round((((double)e.Current / (double)e.Total) * 100d), 0) + ")"); + } + catch { } + }; + var result = compiler.CompileFolder(Path.GetFullPath(options.SourceFolder), options.Includes != null ? options.Includes.Split(',') : null); result.Save(Path.GetFullPath(options.OutputFolder)); } diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.Designer.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.Designer.cs new file mode 100644 index 000000000..4b95a83b0 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.Designer.cs @@ -0,0 +1,232 @@ +namespace Tango.BuildExtensions +{ + partial class BuildForm + { + /// + /// 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.panel1 = new System.Windows.Forms.Panel(); + this.btnCancel = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.chkBuildSolution = new System.Windows.Forms.CheckBox(); + this.chkUpdateAndBuildPMR = new System.Windows.Forms.CheckBox(); + this.chkGeneratePMR = new System.Windows.Forms.CheckBox(); + this.chkGenerateObservables = new System.Windows.Forms.CheckBox(); + this.chkUpdateDatabase = new System.Windows.Forms.CheckBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btnCancel); + this.panel1.Controls.Add(this.btnOK); + this.panel1.Controls.Add(this.chkBuildSolution); + this.panel1.Controls.Add(this.chkUpdateAndBuildPMR); + this.panel1.Controls.Add(this.chkGeneratePMR); + this.panel1.Controls.Add(this.chkGenerateObservables); + this.panel1.Controls.Add(this.chkUpdateDatabase); + this.panel1.Controls.Add(this.pictureBox1); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(596, 285); + this.panel1.TabIndex = 2; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btnCancel.Cursor = System.Windows.Forms.Cursors.Arrow; + this.btnCancel.FlatAppearance.BorderSize = 0; + this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.Location = new System.Drawing.Point(349, 230); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(114, 42); + this.btnCancel.TabIndex = 11; + this.btnCancel.Text = "CANCEL"; + this.btnCancel.UseVisualStyleBackColor = false; + // + // btnOK + // + this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOK.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btnOK.Cursor = System.Windows.Forms.Cursors.Arrow; + this.btnOK.FlatAppearance.BorderSize = 0; + this.btnOK.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.btnOK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); + this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOK.Location = new System.Drawing.Point(469, 230); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(114, 42); + this.btnOK.TabIndex = 10; + this.btnOK.Text = "START"; + this.btnOK.UseVisualStyleBackColor = false; + // + // chkBuildSolution + // + this.chkBuildSolution.AutoSize = true; + this.chkBuildSolution.Cursor = System.Windows.Forms.Cursors.Arrow; + this.chkBuildSolution.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkBuildSolution.Location = new System.Drawing.Point(27, 196); + this.chkBuildSolution.Name = "chkBuildSolution"; + this.chkBuildSolution.Size = new System.Drawing.Size(108, 20); + this.chkBuildSolution.TabIndex = 9; + this.chkBuildSolution.Text = "Build Solution"; + this.chkBuildSolution.UseVisualStyleBackColor = true; + // + // chkUpdateAndBuildPMR + // + this.chkUpdateAndBuildPMR.AutoSize = true; + this.chkUpdateAndBuildPMR.Cursor = System.Windows.Forms.Cursors.Arrow; + this.chkUpdateAndBuildPMR.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkUpdateAndBuildPMR.Location = new System.Drawing.Point(27, 170); + this.chkUpdateAndBuildPMR.Name = "chkUpdateAndBuildPMR"; + this.chkUpdateAndBuildPMR.Size = new System.Drawing.Size(233, 20); + this.chkUpdateAndBuildPMR.TabIndex = 8; + this.chkUpdateAndBuildPMR.Text = "Update and build PMR messages."; + this.chkUpdateAndBuildPMR.UseVisualStyleBackColor = true; + // + // chkGeneratePMR + // + this.chkGeneratePMR.AutoSize = true; + this.chkGeneratePMR.Cursor = System.Windows.Forms.Cursors.Arrow; + this.chkGeneratePMR.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkGeneratePMR.Location = new System.Drawing.Point(27, 144); + this.chkGeneratePMR.Name = "chkGeneratePMR"; + this.chkGeneratePMR.Size = new System.Drawing.Size(215, 20); + this.chkGeneratePMR.TabIndex = 7; + this.chkGeneratePMR.Text = "Generate auto PMR messages."; + this.chkGeneratePMR.UseVisualStyleBackColor = true; + // + // chkGenerateObservables + // + this.chkGenerateObservables.AutoSize = true; + this.chkGenerateObservables.Cursor = System.Windows.Forms.Cursors.Arrow; + this.chkGenerateObservables.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkGenerateObservables.Location = new System.Drawing.Point(27, 118); + this.chkGenerateObservables.Name = "chkGenerateObservables"; + this.chkGenerateObservables.Size = new System.Drawing.Size(223, 20); + this.chkGenerateObservables.TabIndex = 6; + this.chkGenerateObservables.Text = "Generate and build observables."; + this.chkGenerateObservables.UseVisualStyleBackColor = true; + // + // chkUpdateDatabase + // + this.chkUpdateDatabase.AutoSize = true; + this.chkUpdateDatabase.Cursor = System.Windows.Forms.Cursors.Arrow; + this.chkUpdateDatabase.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.chkUpdateDatabase.Location = new System.Drawing.Point(27, 92); + this.chkUpdateDatabase.Name = "chkUpdateDatabase"; + this.chkUpdateDatabase.Size = new System.Drawing.Size(181, 20); + this.chkUpdateDatabase.TabIndex = 5; + this.chkUpdateDatabase.Text = "Update database entities."; + this.chkUpdateDatabase.UseVisualStyleBackColor = true; + // + // pictureBox1 + // + this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.pictureBox1.Image = global::Tango.BuildExtensions.Properties.Resources.machine_trans_small; + this.pictureBox1.Location = new System.Drawing.Point(499, 47); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(63, 68); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 4; + this.pictureBox1.TabStop = false; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(24, 47); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(266, 16); + this.label2.TabIndex = 1; + this.label2.Text = "Select the components you want to initialize."; + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.label1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.label1.Size = new System.Drawing.Size(594, 29); + this.label1.TabIndex = 0; + this.label1.Text = "Tango Initializer"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // BuildForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.ClientSize = new System.Drawing.Size(596, 285); + this.ControlBox = false; + this.Controls.Add(this.panel1); + this.ForeColor = System.Drawing.Color.Gainsboro; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "BuildForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Tango Initializer"; + this.TopMost = true; + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.CheckBox chkUpdateDatabase; + private System.Windows.Forms.CheckBox chkGenerateObservables; + private System.Windows.Forms.CheckBox chkGeneratePMR; + private System.Windows.Forms.CheckBox chkUpdateAndBuildPMR; + private System.Windows.Forms.CheckBox chkBuildSolution; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.cs new file mode 100644 index 000000000..ff75ec321 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Tango.BuildExtensions +{ + public partial class BuildForm : Form + { + public bool UpdateDataBaseEntities { get; set; } + public bool GenerateAndBuildObservables { get; set; } + public bool GenerateAutoPmrMessages { get; set; } + public bool UpdateAndBuildPmrMessages { get; set; } + public bool BuildSolution { get; set; } + + public BuildForm() + { + InitializeComponent(); + + btnOK.Click += BtnOK_Click; + btnCancel.Click += BtnCancel_Click; + } + + private void BtnCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + + private void BtnOK_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + + UpdateDataBaseEntities = chkUpdateDatabase.Checked; + GenerateAndBuildObservables = chkGenerateObservables.Checked; + GenerateAutoPmrMessages = chkGeneratePMR.Checked; + UpdateAndBuildPmrMessages = chkUpdateAndBuildPMR.Checked; + BuildSolution = chkBuildSolution.Checked; + + Close(); + } + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.resx b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/BuildForm.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/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Key.snk b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Key.snk new file mode 100644 index 000000000..e536d20c4 Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Key.snk differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.Designer.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.Designer.cs new file mode 100644 index 000000000..fd70df334 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.Designer.cs @@ -0,0 +1,138 @@ +namespace Tango.BuildExtensions +{ + partial class SelectForm + { + /// + /// 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.label1 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.lbSTatus = new System.Windows.Forms.Label(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.label1.Size = new System.Drawing.Size(483, 29); + this.label1.TabIndex = 0; + this.label1.Text = "Tango Initializer"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.label1.UseWaitCursor = true; + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.pictureBox1); + this.panel1.Controls.Add(this.lbSTatus); + this.panel1.Controls.Add(this.progressBar1); + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(485, 156); + this.panel1.TabIndex = 1; + this.panel1.UseWaitCursor = true; + // + // pictureBox1 + // + this.pictureBox1.Image = global::Tango.BuildExtensions.Properties.Resources.machine_trans_small; + this.pictureBox1.Location = new System.Drawing.Point(12, 40); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(63, 68); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 3; + this.pictureBox1.TabStop = false; + this.pictureBox1.UseWaitCursor = true; + // + // lbSTatus + // + this.lbSTatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbSTatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbSTatus.Location = new System.Drawing.Point(41, 56); + this.lbSTatus.Name = "lbSTatus"; + this.lbSTatus.Size = new System.Drawing.Size(404, 44); + this.lbSTatus.TabIndex = 2; + this.lbSTatus.Text = "Initializing..."; + this.lbSTatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbSTatus.UseWaitCursor = true; + // + // progressBar1 + // + this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.progressBar1.Location = new System.Drawing.Point(11, 120); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(461, 23); + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.progressBar1.TabIndex = 1; + this.progressBar1.UseWaitCursor = true; + this.progressBar1.Value = 50; + // + // SelectForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.ClientSize = new System.Drawing.Size(485, 156); + this.ControlBox = false; + this.Controls.Add(this.panel1); + this.ForeColor = System.Drawing.Color.Gainsboro; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SelectForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Tango Initializer"; + this.TopMost = true; + this.UseWaitCursor = true; + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Label lbSTatus; + private System.Windows.Forms.PictureBox pictureBox1; + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.cs new file mode 100644 index 000000000..349721155 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Tango.BuildExtensions +{ + public partial class SelectForm : Form + { + public SelectForm() + { + InitializeComponent(); + } + + public void SetStatus(String text) + { + lbSTatus.Text = text; + } + + protected override bool ShowWithoutActivation + { + get + { + return true; + } + } + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.resx b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/ProgressForm.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/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/AssemblyInfo.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..e1969199b --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +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("Tango.BuildExtensions")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.BuildExtensions")] +[assembly: AssemblyCopyright("")] +[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)] + +// 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/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.Designer.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.Designer.cs new file mode 100644 index 000000000..7e1f6dd26 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.BuildExtensions.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.BuildExtensions.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap machine_trans_16x16 { + get { + object obj = ResourceManager.GetObject("machine-trans-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap machine_trans_small { + get { + object obj = ResourceManager.GetObject("machine_trans_small", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.resx b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.resx new file mode 100644 index 000000000..b51e9537e --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\machine-trans-small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\machine-trans-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommand.png b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommand.png new file mode 100644 index 000000000..b22d975cb Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommand.png differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico new file mode 100644 index 000000000..d323b07fb Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/BuildTangoCommandPackage.ico differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommand.png b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommand.png new file mode 100644 index 000000000..b22d975cb Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommand.png differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico new file mode 100644 index 000000000..d323b07fb Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/TangoBuildCommandPackage.ico differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-16x16.png b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-16x16.png new file mode 100644 index 000000000..920049c15 Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-16x16.png differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-small.png b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-small.png new file mode 100644 index 000000000..fb9a19df9 Binary files /dev/null and b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Resources/machine-trans-small.png differ diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Tango.BuildExtensions.csproj b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Tango.BuildExtensions.csproj new file mode 100644 index 000000000..b5b5ed45e --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/Tango.BuildExtensions.csproj @@ -0,0 +1,245 @@ + + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + true + + + true + + + Key.snk + + + + Debug + AnyCPU + 2.0 + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {43A25F41-EE8C-4A29-94D2-4CBC603E6B29} + Library + Properties + Tango.BuildExtensions + Tango.BuildExtensions + v4.6 + true + true + true + true + true + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + Form + + + BuildForm.cs + + + Form + + + ProgressForm.cs + + + + True + True + Resources.resx + + + + + True + True + VSPackage.resx + + + + + + + + Designer + + + + + + + + Menus.ctmenu + + + + + + + + + + ..\..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll + + + False + + + False + + + False + + + False + + + + False + + + ..\..\packages\Microsoft.VisualStudio.CoreUtility.15.0.26201\lib\net45\Microsoft.VisualStudio.CoreUtility.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Imaging.15.0.26201\lib\net45\Microsoft.VisualStudio.Imaging.dll + True + + + ..\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Shell.15.0.15.0.26201\lib\Microsoft.VisualStudio.Shell.15.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Shell.Framework.15.0.26201\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll + True + + + True + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll + True + + + True + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll + True + + + True + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll + True + + + ..\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Threading.15.0.240\lib\net45\Microsoft.VisualStudio.Threading.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Utilities.15.0.26201\lib\net45\Microsoft.VisualStudio.Utilities.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Validation.15.0.82\lib\net45\Microsoft.VisualStudio.Validation.dll + True + + + False + + + + + + + + + ..\..\packages\TestStack.White.0.13.3\lib\net40\TestStack.White.dll + + + True + + + + + BuildForm.cs + + + ProgressForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + + + true + VSPackage + ResXFileCodeGenerator + VSPackage.Designer.cs + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs new file mode 100644 index 000000000..36506e5b0 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs @@ -0,0 +1,626 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Company. All rights reserved. +// +//------------------------------------------------------------------------------ + +using System; +using System.ComponentModel.Design; +using System.Globalization; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using System.Collections.Generic; +using EnvDTE; +using EnvDTE80; +using Microsoft.VisualStudio; +using System.Linq; +using TestStack.White.UIItems.Finders; +using TestStack.White.InputDevices; +using TestStack.White.UIItems; +using VSLangProj; +using System.Runtime.InteropServices; +using TestStack.White.WindowsAPI; +using System.IO; + +namespace Tango.BuildExtensions +{ + /// + /// Command handler + /// + internal sealed class TangoBuildCommand + { + private DTE2 _dte; + private IList _projects; + private SelectForm _form; + private TestStack.White.Application _application; + private TestStack.White.UIItems.WindowItems.Window _window; + private System.Diagnostics.Process _vsProcess; + + private const String dalProjectName = "Tango.DAL.Remote"; + private const String edmxModelName = "RemoteADO.edmx"; + private const String observablesGeneratorProjectName = "Tango.DBObservablesGenerator.CLI"; + private const String observablesProjectName = "Tango.BL"; + private const String pmrGeneratorProjectName = "Tango.PMRGenerator.CLI"; + private const String pmrProjectName = "Tango.PMR"; + private const String protoCliProjectName = "Tango.Protobuf.CLI"; + + #region Redundant + + /// + /// Command ID. + /// + public const int CommandId = 0x0100; + + /// + /// Command menu group (command set GUID). + /// + public static readonly Guid CommandSet = new Guid("c03a7b01-8109-4ec5-8f90-858bed027e5d"); + + /// + /// VS Package that provides this command, not null. + /// + private readonly Package package; + + /// + /// Initializes a new instance of the class. + /// Adds our command handlers for menu (commands must exist in the command table file) + /// + /// Owner package, not null. + private TangoBuildCommand(Package package) + { + if (package == null) + { + throw new ArgumentNullException("package"); + } + + this.package = package; + + OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; + if (commandService != null) + { + var menuCommandID = new CommandID(CommandSet, CommandId); + var menuItem = new MenuCommand(this.MenuItemCallback, menuCommandID); + commandService.AddCommand(menuItem); + } + } + + /// + /// Gets the instance of the command. + /// + public static TangoBuildCommand Instance + { + get; + private set; + } + + /// + /// Gets the service provider from the owner package. + /// + private IServiceProvider ServiceProvider + { + get + { + return this.package; + } + } + + /// + /// Initializes the singleton instance of the command. + /// + /// Owner package, not null. + public static void Initialize(Package package) + { + Instance = new TangoBuildCommand(package); + } + + /// + /// This function is the callback used to execute the command when the menu item is clicked. + /// See the constructor to see how the menu item is associated with this function using + /// OleMenuCommandService service and MenuCommand class. + /// + /// Event sender. + /// Event args. + private void MenuItemCallback(object sender, EventArgs e) + { + Start(); + } + + #endregion + + #region Main + + private void Start() + { + _form = null; + + BuildForm buildForm = new BuildForm(); + if (buildForm.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; + + System.Threading.Tasks.Task.Factory.StartNew(() => + { + _projects = Projects().ToList(); + + String vsWindowTitle = _dte.DTE.MainWindow.Caption; + _vsProcess = System.Diagnostics.Process.GetProcesses().ToList().SingleOrDefault(x => x.MainWindowTitle == vsWindowTitle); + _application = TestStack.White.Application.Attach(_vsProcess); + _window = _application.GetWindow(vsWindowTitle); + + OpenProgressForm(); + + try + { + if (buildForm.UpdateDataBaseEntities) + { + UpdateDatabaseEntities(); + } + if (buildForm.GenerateAndBuildObservables) + { + GenerateAndBuildObservables(); + } + if (buildForm.GenerateAutoPmrMessages) + { + GenerateAutoPMRMessages(); + } + if (buildForm.UpdateAndBuildPmrMessages) + { + UpdateAndBuildPmrMessages(); + } + if (buildForm.BuildSolution) + { + BuildSolution(); + } + + SetStatusText("Done!"); + Wait(1000); + CloseProgressForm(); + } + catch (Exception ex) + { + CloseProgressForm(); + ShowMessage(ex.Message); + } + }); + } + + private void UpdateDatabaseEntities() + { + var project = _projects.SingleOrDefault(x => x.Name == dalProjectName); + + if (project == null) + { + throw new NullReferenceException("Could not find the Tango solution!"); + } + + var projectItems = project.ProjectItems.OfType().ToList(); + + SetStatusText("Locating " + edmxModelName + " scheme..."); + + var items = GetProjectItemsDeep(project); + + var edmx = GetProjectItemsDeep(project).SingleOrDefault(x => x.Name == edmxModelName); + + if (edmx == null) + { + throw new NullReferenceException("Could not locate " + edmxModelName + "!"); + } + + SetStatusText("Expanding diagram..."); + + edmx.ExpandView(); + + SetStatusText("Opening edmx diagram window..."); + + Window win = edmx.Open(EnvDTE.Constants.vsViewKindPrimary); + win.Visible = true; + + SetStatusText("Waiting for edmx diagram window..."); + + _window.WaitTill(() => _window.Get(SearchCriteria.ByText(edmxModelName + " [Diagram1]")) != null); + + SetStatusText("Cleaning up edmx scheme..."); + + _dte.MainWindow.Activate(); + _dte.ExecuteCommand("Edit.SelectAll"); + Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DELETE); + WaitForWindowOpen("Delete Unmapped Tables and Views").PressKey(KeyboardInput.SpecialKeys.RETURN); + WaitForWindowClose("Delete Unmapped Tables and Views"); + + _window.WaitWhileBusy(); + + SetStatusText("Reinitializing edmx scheme..."); + + var window = WindowInfo.GetWindow(edmxModelName + " [Diagram1]*"); + window.SetActive(); + + Keyboard.Instance.HoldKey(KeyboardInput.SpecialKeys.SHIFT); + Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.F10); + Keyboard.Instance.LeaveAllKeys(); + + Wait(100); + + for (int i = 0; i < 7; i++) + { + Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN); + Wait(10); + } + + Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN); + + var updateWindow = WaitForWindowOpen("Update Wizard"); + + _window.WaitWhileBusy(); + + Wait(1000); + + updateWindow.PressKey(KeyboardInput.SpecialKeys.SPACE); + + Wait(50); + + updateWindow.PressKey(KeyboardInput.SpecialKeys.RETURN); + + SetStatusText("Generating edmx scheme..."); + + WaitForWindowClose("Update Wizard"); + + _window.WaitWhileBusy(); + + SetStatusText("Saving changes..."); + + win.Close(vsSaveChanges.vsSaveChangesYes); + + _window.WaitWhileBusy(); + + foreach (var template in edmx.ProjectItems.OfType().Where(x => x.Name.EndsWith(".tt"))) + { + SetStatusText("Running custom tool for " + template.Name + "..."); + (template.Object as VSProjectItem).RunCustomTool(); + _window.WaitWhileBusy(); + } + + _window.WaitWhileBusy(); + + SetStatusText("Building project " + dalProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); + + if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) + { + throw new ExternalException(dalProjectName + " failed to build!"); + } + } + + private void GenerateAndBuildObservables() + { + var project = _projects.SingleOrDefault(x => x.Name == observablesGeneratorProjectName); + + if (project == null) + { + throw new NullReferenceException("Could not locate project " + observablesGeneratorProjectName); + } + + SetStatusText("Building project " + observablesGeneratorProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); + + _dte.Solution.Properties.Item("StartupProject").Value = observablesGeneratorProjectName; + + SetStatusText("Executing observables generator..."); + + _dte.ExecuteCommand("Debug.Start"); + + WaitForWindowOpen("Tango Observables Generator"); + + WaitForWindowClose("Tango Observables Generator"); + + var observablesProject = _projects.SingleOrDefault(x => x.Name == observablesProjectName); + + if (observablesProject == null) + { + throw new NullReferenceException("Could not locate project " + observablesProjectName); + } + + SetStatusText("Updating " + observablesProjectName + "..."); + + foreach (var file in Directory.GetFiles(Path.GetDirectoryName(observablesProject.FileName), "*.cs", SearchOption.AllDirectories)) + { + String parentFolderName = Path.GetFileName(Path.GetDirectoryName(file)); + + if (parentFolderName != "Debug" && parentFolderName != "Release" && parentFolderName != "obj") + { + SetStatusText("Adding/Updating file " + Path.GetFileName(file) + "..."); + observablesProject.ProjectItems.AddFromFile(file); + Wait(10); + } + } + + SetStatusText("Building project " + observablesProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", observablesProject.FullName, true); + + if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) + { + throw new ExternalException(observablesProjectName + " failed to build!"); + } + } + + private void GenerateAutoPMRMessages() + { + var project = _projects.SingleOrDefault(x => x.Name == pmrGeneratorProjectName); + + if (project == null) + { + throw new NullReferenceException("Could not locate project " + pmrGeneratorProjectName); + } + + SetStatusText("Building project " + pmrGeneratorProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); + + _dte.Solution.Properties.Item("StartupProject").Value = pmrGeneratorProjectName; + + SetStatusText("Executing PMR generator..."); + + _dte.ExecuteCommand("Debug.Start"); + + WaitForWindowOpen("Tango PMR Generator"); + + WaitForWindowClose("Tango PMR Generator"); + } + + private void UpdateAndBuildPmrMessages() + { + var protoProject = _projects.SingleOrDefault(x => x.Name == protoCliProjectName); + + if (protoProject == null) + { + throw new NullReferenceException("Could not locate project " + protoCliProjectName); + } + + SetStatusText("Building project " + protoCliProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", protoProject.FullName, true); + + if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) + { + throw new ExternalException(protoCliProjectName + " failed to build!"); + } + + _dte.Solution.Properties.Item("StartupProject").Value = protoCliProjectName; + + SetStatusText("Executing Tango Proto Compiler..."); + + _dte.ExecuteCommand("Debug.Start"); + + WaitForWindowOpen("Tango Protobuf Compiler"); + + WaitForWindowClose("Tango Protobuf Compiler"); + + + var project = _projects.SingleOrDefault(x => x.Name == pmrProjectName); + + if (project == null) + { + throw new NullReferenceException("Could not locate project " + pmrProjectName); + } + + SetStatusText("Updating " + pmrProjectName + "..."); + + foreach (var file in Directory.GetFiles(Path.GetDirectoryName(project.FileName), "*.cs", SearchOption.AllDirectories)) + { + String parentFolderName = Path.GetFileName(Path.GetDirectoryName(file)); + + if (parentFolderName != "Debug" && parentFolderName != "Release" && parentFolderName != "obj") + { + SetStatusText("Adding/Updating file " + Path.GetFileName(file) + "..."); + project.ProjectItems.AddFromFile(file); + Wait(10); + } + } + + SetStatusText("Building project " + pmrProjectName + "..."); + + _dte.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true); + + if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) + { + throw new ExternalException(pmrProjectName + " failed to build!"); + } + } + + private void BuildSolution() + { + SetStatusText("Building solution..."); + _dte.Solution.SolutionBuild.Build(true); + + if (_dte.Solution.SolutionBuild.LastBuildInfo > 0) + { + throw new ExternalException("Error building solution!"); + } + } + + #endregion + + #region Solution & Projects + + public DTE2 GetActiveIDE() + { + // Get an instance of currently running Visual Studio IDE. + DTE2 dte2 = Package.GetGlobalService(typeof(DTE)) as DTE2; + _dte = dte2; + return dte2; + } + + public IList Projects() + { + Projects projects = GetActiveIDE().Solution.Projects; + List list = new List(); + var item = projects.GetEnumerator(); + while (item.MoveNext()) + { + var project = item.Current as Project; + if (project == null) + { + continue; + } + + if (project.Kind == ProjectKinds.vsProjectKindSolutionFolder) + { + list.AddRange(GetSolutionFolderProjects(project)); + } + else + { + list.Add(project); + } + } + + return list; + } + + private IEnumerable GetSolutionFolderProjects(Project solutionFolder) + { + List list = new List(); + for (var i = 1; i <= solutionFolder.ProjectItems.Count; i++) + { + var subProject = solutionFolder.ProjectItems.Item(i).SubProject; + if (subProject == null) + { + continue; + } + + // If this is another solution folder, do a recursive call, otherwise add + if (subProject.Kind == ProjectKinds.vsProjectKindSolutionFolder) + { + list.AddRange(GetSolutionFolderProjects(subProject)); + } + else + { + list.Add(subProject); + } + } + return list; + } + + private List GetProjectItemsDeep(Project project) + { + List results = new List(); + FillProjectItems(project.ProjectItems.OfType().ToList(), results); + return results; + } + + private void FillProjectItems(List rootItems, List results) + { + foreach (var item in rootItems) + { + results.Add(item); + + if (item.ProjectItems.Count > 0) + { + FillProjectItems(item.ProjectItems.OfType().ToList(), results); + } + } + } + + #endregion + + #region Notifications + + private void WriteToConsole(String text) + { + // Get the output window + var outputWindow = Package.GetGlobalService(typeof(SVsOutputWindow)) as IVsOutputWindow; + + // Ensure that the desired pane is visible + var paneGuid = Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.GeneralPane_guid; + IVsOutputWindowPane pane; + outputWindow.CreatePane(paneGuid, "General", 1, 0); + outputWindow.GetPane(paneGuid, out pane); + + // Output the message + pane.OutputString(text + Environment.NewLine); + } + + private void ShowMessage(String text) + { + // Show a message box to prove we were here + + VsShellUtilities.ShowMessageBox( + ServiceProvider, + text, + "Tango Initializer", + OLEMSGICON.OLEMSGICON_INFO, + OLEMSGBUTTON.OLEMSGBUTTON_OK, + OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); + } + + #endregion + + #region Windows API + + private WindowInfo WaitForWindowOpen(String title) + { + WindowInfo window = null; + + do + { + window = WindowInfo.GetAllWindows().SelectMany(x => x.Children).FirstOrDefault(x => x.Caption == title); + } while (window == null); + + return window; + } + + private void WaitForWindowClose(String title) + { + while (WindowInfo.GetAllWindows().SelectMany(x => x.Children).ToList().Exists(x => x.Caption == title)) + { + System.Threading.Thread.Sleep(100); + } + } + + #endregion + + #region Threading + + private void Wait(int milli) + { + System.Threading.Thread.Sleep(milli); + } + + #endregion + + #region Status Form + + private void OpenProgressForm() + { + System.Threading.Thread thread = new System.Threading.Thread(() => + { + _form = new SelectForm(); + var handle = _form.Handle; + _form.ShowDialog(); + }); + + thread.SetApartmentState(System.Threading.ApartmentState.STA); + thread.Start(); + + while (_form == null || !_form.IsHandleCreated) { } + } + + private void SetStatusText(String text) + { + _form.Invoke(new Action(() => + { + _form.SetStatus(text); + })); + } + + private void CloseProgressForm() + { + _form.Invoke(new Action(() => + { + _form.Close(); + _form = null; + })); + } + + #endregion + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.cs new file mode 100644 index 000000000..f31bb8193 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.cs @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Company. All rights reserved. +// +//------------------------------------------------------------------------------ + +using System; +using System.ComponentModel.Design; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.InteropServices; +using Microsoft.VisualStudio; +using Microsoft.VisualStudio.OLE.Interop; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using Microsoft.Win32; + +namespace Tango.BuildExtensions +{ + /// + /// This is the class that implements the package exposed by this assembly. + /// + /// + /// + /// The minimum requirement for a class to be considered a valid package for Visual Studio + /// is to implement the IVsPackage interface and register itself with the shell. + /// This package uses the helper classes defined inside the Managed Package Framework (MPF) + /// to do it: it derives from the Package class that provides the implementation of the + /// IVsPackage interface and uses the registration attributes defined in the framework to + /// register itself and its components with the shell. These attributes tell the pkgdef creation + /// utility what data to put into .pkgdef file. + /// + /// + /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. + /// + /// + [PackageRegistration(UseManagedResourcesOnly = true)] + [InstalledProductRegistration("#1110", "#1112", "1.0", IconResourceID = 1400)] // Info on this package for Help/About + [ProvideMenuResource("Menus.ctmenu", 1)] + [Guid(TangoBuildCommandPackage.PackageGuidString)] + [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] + public sealed class TangoBuildCommandPackage : Package + { + /// + /// TangoBuildCommandPackage GUID string. + /// + public const string PackageGuidString = "f911efc8-1a59-4b5f-953d-d715ddd70710"; + + /// + /// Initializes a new instance of the class. + /// + public TangoBuildCommandPackage() + { + // Inside this method you can place any initialization code that does not require + // any Visual Studio service because at this point the package object is created but + // not sited yet inside Visual Studio environment. The place to do all the other + // initialization is the Initialize method. + } + + #region Package Members + + /// + /// Initialization of the package; this method is called right after the package is sited, so this is the place + /// where you can put all the initialization code that rely on services provided by VisualStudio. + /// + protected override void Initialize() + { + TangoBuildCommand.Initialize(this); + base.Initialize(); + } + + #endregion + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.vsct b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.vsct new file mode 100644 index 000000000..06eec602e --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommandPackage.vsct @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.Designer.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.Designer.cs new file mode 100644 index 000000000..13fd3a51b --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.BuildExtensions { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class VSPackage { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal VSPackage() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.BuildExtensions.VSPackage", typeof(VSPackage).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon _400 { + get { + object obj = ResourceManager.GetObject("400", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.resx b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.resx new file mode 100644 index 000000000..4d0826c19 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/VSPackage.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + Resources\BuildTangoCommandPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + TangoBuildCommand Extension + + + TangoBuildCommand Visual Stuido Extension Detailed Info + + + Resources\TangoBuildCommandPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/WindowInfo.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/WindowInfo.cs new file mode 100644 index 000000000..535ee7ce1 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/WindowInfo.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TestStack.White.InputDevices; +using TestStack.White.WindowsAPI; + +namespace Tango.BuildExtensions +{ + public class WindowInfo + { + [DllImport("user32.dll", EntryPoint = "GetDesktopWindow")] + static extern IntPtr GetDesktopWindow(); + + [DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)] + static extern int SendMessage(IntPtr hwndControl, uint Msg, int wParam, StringBuilder strBuffer); // get text + + [DllImport("user32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)] + static extern int SendMessage(IntPtr hwndControl, uint Msg, int wParam, int lParam); // text length + + [DllImport("user32.dll", EntryPoint = "FindWindowEx", CharSet = CharSet.Auto)] + static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); + + [DllImport("user32.dll")] + private static extern bool SetForegroundWindow(IntPtr hWnd); + + private static List GetAllChildrenHandles(IntPtr hParent, int maxCount) + { + List result = new List(); + int ct = 0; + IntPtr prevChild = IntPtr.Zero; + IntPtr currChild = IntPtr.Zero; + while (true && ct < maxCount) + { + currChild = FindWindowEx(hParent, prevChild, null, null); + if (currChild == IntPtr.Zero) break; + result.Add(currChild); + prevChild = currChild; + ++ct; + } + return result; + } + + private static int GetCaptionTextLength(IntPtr hTextBox) + { + // helper for GetCaptionText + uint WM_GETTEXTLENGTH = 0x000E; + int result = SendMessage(hTextBox, WM_GETTEXTLENGTH, + 0, 0); + return result; + } + + private static string GetCaptionText(IntPtr hTextBox) + { + uint WM_GETTEXT = 0x000D; + int len = GetCaptionTextLength(hTextBox); + if (len <= 0) return null; // no text. consider empty string instead. + StringBuilder sb = new StringBuilder(len + 1); + SendMessage(hTextBox, WM_GETTEXT, len + 1, sb); + return sb.ToString(); + } + + public IntPtr Handle { get; set; } + public int Level { get; set; } + public String Caption { get; set; } + public WindowInfo Parent { get; set; } + public List Children { get; set; } + + public WindowInfo() + { + Children = new List(); + } + + public void SetActive() + { + SetForegroundWindow(Handle); + } + + public void PressKey(KeyboardInput.SpecialKeys key) + { + SetActive(); + Keyboard.Instance.PressSpecialKey(key); + } + + public override string ToString() + { + return Caption; + } + + public static List GetAllWindows() + { + List windows = new List(); + + IntPtr hDesktop = GetDesktopWindow(); + WindowInfo desktop = new WindowInfo(); + desktop.Handle = hDesktop; + desktop.Level = 0; + desktop.Caption = "(Desktop)"; + desktop.Parent = null; + windows.Add(desktop); + + FillWindows(desktop, desktop.Children); + + return windows; + } + + private static void FlattenWindows(WindowInfo parent, List windows) + { + windows.Add(parent); + + foreach (var window in parent.Children) + { + windows.Add(window); + FlattenWindows(window, windows); + } + } + + public static WindowInfo GetWindow(String title) + { + var windows = GetAllWindows(); + + List flatList = new List(); + FlattenWindows(windows.First(), flatList); + + return flatList.FirstOrDefault(x => x.Caption == title); + } + + private static void FillWindows(WindowInfo parent, List windows) + { + foreach (var handle in GetAllChildrenHandles(parent.Handle, 5000)) + { + WindowInfo child = new WindowInfo(); + child.Handle = handle; + child.Level = parent.Level + 1; + child.Caption = GetCaptionText(handle); + child.Parent = parent; + + if (child.Caption != null) + { + windows.Add(child); + } + + FillWindows(child, child.Children); + } + } + } +} diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/index.html b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/index.html new file mode 100644 index 000000000..1fee824a3 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/index.html @@ -0,0 +1,65 @@ + + + + + + + + Getting Started + + + +
+ + +
+
+

Creating a Visual Studio Extension

+ +

This project enables developers to create an extension for Visual Studio. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

+

Add new features

+ +
    +
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. +
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. +
  5. Choose from the available item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Command, Tool Window, Toolbox Control, and then click Add.
  6. +
+ +

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add additional item templates.

+ +

Run and debug

+

To run the project, press F5. Visual Studio will:

+ +
    +
  • Build the extension from the VSIX project.
  • +
  • Create a VSIX package from the VSIX project.
  • +
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • +
+ +

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

+ +
+
+
+

Visual Studio Extensibility Resources

+ +
    +
  1. Visual Studio documentation
    Detailed documentation and API reference material for building extensions.
  2. +
  3. Extension samples on GitHub
    Use a sample project to kickstart your development.
  4. +
  5. Extensibility chat room on Gitter
    Meet other extension developers and exchange tips and tricks for extension development.
  6. +
  7. Channel 9 videos on extensibility
    Watch videos from the product team on Visual Studio extensibility.
  8. +
  9. Extensibility Tools
    Install an optional helper tool that adds extra IDE support for extension authors.
  10. +
+

Give us feedback

+ +
+
+
+
+ + diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/packages.config b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/packages.config new file mode 100644 index 000000000..c81549d43 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/packages.config @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/source.extension.vsixmanifest b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/source.extension.vsixmanifest new file mode 100644 index 000000000..b55a2f85f --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/source.extension.vsixmanifest @@ -0,0 +1,21 @@ + + + + + Tango Build Extensions + Build automation extensions for Twine Tango system. + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/stylesheet.css b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/stylesheet.css new file mode 100644 index 000000000..d5e9c71a8 --- /dev/null +++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/stylesheet.css @@ -0,0 +1,129 @@ +body { + margin: 0; + padding: 0; + border: 0; + color: #1E1E1E; + font-size: 13px; + font-family: "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1.45; + word-wrap: break-word; +} + +/* General & 'Reset' Stuff */ + + +.container { + width: 980px; + margin: 0 auto; +} + +section { + display: block; + margin: 0; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; +} + +/* Header,
+ header - container + h1 - project name + h2 - project description +*/ + +#header { + color: #FFF; + background: #68217a; + position:relative; +} +#hangcloud { + width: 190px; + height: 160px; + background: url("../images/bannerart03.png"); + position: absolute; + top: 0; + right: -30px; +} +h1, h2 { + font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1; + margin: 0 18px; + padding: 0; +} +#header h1 { + font-size: 3.4em; + padding-top: 18px; + font-weight: normal; + margin-left: 15px; +} + +#header h2 { + font-size: 1.5em; + margin-top: 10px; + padding-bottom: 18px; + font-weight: normal; +} + + +#main_content { + width: 100%; + display: flex; + flex-direction: row; +} + + +h1, h2, h3, h4, h5, h6 { + font-weight: bolder; +} + +#main_content h1 { + font-size: 1.8em; + margin-top: 34px; +} + + #main_content h1:first-child { + margin-top: 30px; + } + +#main_content h2 { + font-size: 1.4em; + font-weight: bold; +} +p, ul { + margin: 11px 18px; +} + +#main_content a { + color: #06C; + text-decoration: none; +} +ul { + margin-top: 13px; + margin-left: 18px; + padding-left: 0; +} + ul li { + margin-left: 18px; + padding-left: 0; + } +#lpanel { + width: 620px; + float: left; +} +#rpanel ul { + list-style-type: none; + width: 300px; +} + #rpanel ul li { + line-height: 1.8em; + } +#rpanel { + background: #e7e7e7; + width: 360px; + float: right; +} + +#rpanel div { + width: 300px; +} -- cgit v1.3.1