aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-17 13:32:58 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-17 13:32:58 +0200
commit071dc67e905d23347ac6b5cc4573972d91dd0ea3 (patch)
tree0410bf19ca3224767acb8a03e485808c04e5c360 /Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs
parent92c52918e13dbbaf2a658945c349a6d04c29aa81 (diff)
downloadTango-071dc67e905d23347ac6b5cc4573972d91dd0ea3.tar.gz
Tango-071dc67e905d23347ac6b5cc4573972d91dd0ea3.zip
Upgraded EF from 6.0 to 6.2 for all projects.
Improved EF first load with pre-compiled views and model store. Implemented auto generate views in Tango Build VSIX.
Diffstat (limited to 'Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs')
-rw-r--r--Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs61
1 files changed, 60 insertions, 1 deletions
diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs
index 624124ef2..407530570 100644
--- a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs
+++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/TangoBuildCommand.cs
@@ -38,6 +38,7 @@ namespace Tango.BuildExtensions
private const String edmxModelName = "RemoteADO.edmx";
private const String observablesGeneratorProjectName = "Tango.DBObservablesGenerator.CLI";
private const String observablesProjectName = "Tango.BL";
+ private const String observablesContextName = "ObservablesContext.cs";
private const String pmrGeneratorProjectName = "Tango.PMRGenerator.CLI";
private const String pmrProjectName = "Tango.PMR";
private const String protoCliProjectName = "Tango.Protobuf.CLI";
@@ -146,8 +147,12 @@ namespace Tango.BuildExtensions
OpenVSProgress("Tango Build Engine", "Initializing...", true);
+ String current_startup_project = DTE.Solution.Properties.Item("StartupProject").Value.ToString();
+
try
{
+
+
if (buildForm.UpdateDataBaseEntities)
{
UpdateDatabaseEntities();
@@ -179,9 +184,13 @@ namespace Tango.BuildExtensions
}
catch (Exception ex)
{
- CloseVSProgress();
ShowMessage(ex.Message);
}
+ finally
+ {
+ CloseVSProgress();
+ DTE.Solution.Properties.Item("StartupProject").Value = current_startup_project;
+ }
});
}
@@ -344,6 +353,56 @@ namespace Tango.BuildExtensions
{
throw new ExternalException(observablesProjectName + " failed to build!");
}
+
+ project = _projects.SingleOrDefault(x => x.Name == observablesProjectName);
+
+ if (project == null)
+ {
+ throw new NullReferenceException("Could not locate project " + observablesProjectName);
+ }
+
+ SetVSProgress("Generating views for ObservablesContext...");
+ var views_file = GetProjectItems(project).SingleOrDefault(x => x.Name == observablesContextName);
+
+ if (views_file == null)
+ {
+ throw new NullReferenceException("Could not locate " + observablesContextName + "!");
+ }
+
+ Wait(1000);
+
+ DTE.MainWindow.Activate();
+
+ ExpandSolutionExplorerNode($"Tango\\{observablesProjectName}");
+ Wait(1000);
+
+ SelectSolutionExplorerNode($"Tango\\{observablesProjectName}\\{observablesContextName}");
+ Wait(1000);
+
+ Keyboard.Instance.HoldKey(KeyboardInput.SpecialKeys.SHIFT);
+ Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.F10);
+ Keyboard.Instance.LeaveAllKeys();
+
+ Wait(1000);
+
+ for (int i = 0; i < 3; i++)
+ {
+ Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
+ Wait(100);
+ }
+
+ Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT);
+ Wait(100);
+
+ for (int i = 0; i < 3; i++)
+ {
+ Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
+ Wait(100);
+ }
+
+ Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN);
+
+ _window.WaitWhileBusy();
}
private void GenerateAutoPMRMessages()