From 268cbe1edece200f8f38844d40fa150fd8921fc5 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sat, 25 Apr 2020 16:17:22 +0300 Subject: FSE solution. Test Runner execution view.. --- .../Tango.FSE.Stubs/Images/project_small.png | Bin 0 -> 1159 bytes .../Modules/Tango.FSE.Stubs/Images/test_tools.png | Bin 0 -> 117743 bytes .../Tango.FSE.Stubs/Resources/lib_template.csx | 2 +- .../Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj | 6 + .../FSE/Modules/Tango.FSE.Stubs/TestProject.cs | 2 +- .../ViewModels/TestDesignerViewVM.cs | 147 +++++++++++++-------- .../Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs | 39 +++++- .../Tango.FSE.Stubs/Views/TestDesignerView.xaml | 9 +- .../Views/TestRunnerCatalogView.xaml | 89 ++++++++----- .../Views/TestRunnerExecutionView.xaml | 21 ++- .../Tango.FSE.Stubs/Views/TestRunnerView.xaml | 20 ++- .../FSE/Tango.FSE.Common/Resources/Styles.xaml | 4 + .../Scripting/Tango.Scripting.Basic/Script.cs | 8 +- Software/Visual_Studio/Tango.FSE.sln | 89 +++++++++++++ 14 files changed, 337 insertions(+), 99 deletions(-) create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.png create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.png create mode 100644 Software/Visual_Studio/Tango.FSE.sln (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.png b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.png new file mode 100644 index 000000000..480e53758 Binary files /dev/null and b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.png differ diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.png b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.png new file mode 100644 index 000000000..a6250add9 Binary files /dev/null and b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.png differ diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Resources/lib_template.csx b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Resources/lib_template.csx index f3fd6b36a..52ec531e7 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Resources/lib_template.csx +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Resources/lib_template.csx @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.FSE.Stubs; -public class NewLibrary +public class @LibraryName { public double Calc(double a, double b) { diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj index d4b5b2442..285d70780 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj @@ -271,6 +271,12 @@ + + + + + + diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestProject.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestProject.cs index 0bb4783dd..2ba4a74cd 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestProject.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestProject.cs @@ -39,7 +39,7 @@ namespace Tango.FSE.Stubs project.Name = name; project.Scripts.Add(Script.New("Program.csx", Encoding.UTF8.GetString(Properties.Resources.main_template), true)); - project.Scripts.Add(Script.New("lib.csx", Encoding.UTF8.GetString(Properties.Resources.lib_template))); + project.Scripts.Add(Script.New("Service.csx", Encoding.UTF8.GetString(Properties.Resources.lib_template).Replace("@LibraryName", "Service"))); project.ReferenceAssemblies.Add(ReferenceAssembly.FromType(typeof(String))); project.ReferenceAssemblies.Add(ReferenceAssembly.FromType(typeof(Enumerable))); diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestDesignerViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestDesignerViewVM.cs index 5235ba646..8ed0c2bb0 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestDesignerViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestDesignerViewVM.cs @@ -7,7 +7,9 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text; +using System.Threading; using System.Threading.Tasks; +using System.Windows; using System.Windows.Input; using System.Windows.Threading; using Tango.BL.Entities; @@ -15,6 +17,7 @@ using Tango.Core; using Tango.Core.Commands; using Tango.Core.ExtensionMethods; using Tango.FSE.Common; +using Tango.FSE.Common.Navigation; using Tango.FSE.Stubs.Contracts; using Tango.FSE.Stubs.Dialogs; using Tango.Integration.Operation; @@ -23,11 +26,17 @@ using Tango.Scripting.Editors; using Tango.SharedUI.Components; using Tango.SharedUI.Helpers; using Tango.Transport; +using static Tango.FSE.Stubs.ViewModels.TestDesignerViewVM; namespace Tango.FSE.Stubs.ViewModels { - public class TestDesignerViewVM : FSEViewModel, ITestLogger + public class TestDesignerViewVM : FSEViewModel, ITestLogger, INavigationObjectReceiver { + public class NavigationObject + { + public PublishedTestProject Project { get; set; } + } + public enum ToolWindows { Output, @@ -37,7 +46,7 @@ namespace Tango.FSE.Stubs.ViewModels Publish } - private DispatcherTimer _compileTimer; + private System.Timers.Timer _compileTimer; private String _projectFile; private String PROJECT_FILE_EXTENSION = ".tproj"; private String PROJECT_DIALOG_FILTER = $"Test Project Files|*.tproj"; @@ -159,6 +168,7 @@ namespace Tango.FSE.Stubs.ViewModels public RelayCommand LoadPublishedProjectCommand { get; set; } public RelayCommand UnPublishProjectCommand { get; set; } public RelayCommand TogglePublishPanelCommand { get; set; } + public RelayCommand