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.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 +++++ 27 files changed, 2574 insertions(+) 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/VSIX') 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