aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.pngbin0 -> 1159 bytes
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.pngbin0 -> 117743 bytes
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Resources/lib_template.csx2
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj6
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestProject.cs2
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestDesignerViewVM.cs147
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs39
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml9
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml89
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml21
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerView.xaml20
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml4
-rw-r--r--Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Script.cs8
-rw-r--r--Software/Visual_Studio/Tango.FSE.sln89
14 files changed, 337 insertions, 99 deletions
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
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/project_small.png
Binary files 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
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Images/test_tools.png
Binary files 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 @@
<ItemGroup>
<Resource Include="Images\project.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\test_tools.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\project_small.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
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<ITestDesignerView>, ITestLogger
+ public class TestDesignerViewVM : FSEViewModel<ITestDesignerView>, ITestLogger, INavigationObjectReceiver<NavigationObject>
{
+ 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<Script> RenameLibraryCommand { get; set; }
#endregion
@@ -195,12 +205,13 @@ namespace Tango.FSE.Stubs.ViewModels
SaveAsProjectCommand = new RelayCommand(SaveAsProject);
OpenProjectCommand = new RelayCommand(OpenProject);
AddLibraryCommand = new RelayCommand(AddNewLibrary);
- ClearOutputCommand = new RelayCommand(ClearOutput);
+ ClearOutputCommand = new RelayCommand(Clear);
DeleteLibraryCommand = new RelayCommand<Script>(DeleteLibrary);
PublishProjectCommand = new RelayCommand(PublishProject);
LoadPublishedProjectCommand = new RelayCommand(LoadPublishedProject);
UnPublishProjectCommand = new RelayCommand(UnPublishProject);
TogglePublishPanelCommand = new RelayCommand(() => IsPublishPanelOpened = !IsPublishPanelOpened);
+ RenameLibraryCommand = new RelayCommand<Script>(RenameLibrary);
}
private void HighlightError(CompilationError error)
@@ -225,9 +236,8 @@ namespace Tango.FSE.Stubs.ViewModels
public override void OnApplicationStarted()
{
- _compileTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
- _compileTimer.Interval = TimeSpan.FromSeconds(2);
- _compileTimer.Tick += _compileTimer_Tick;
+ _compileTimer = new System.Timers.Timer(2000);
+ _compileTimer.Elapsed += _compileTimer_Tick;
_compileTimer.Start();
}
@@ -400,7 +410,7 @@ namespace Tango.FSE.Stubs.ViewModels
#endregion
- #region Private Methods
+ #region Reference Assemblies
private async void AddReferenceAssembly()
{
@@ -420,6 +430,22 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
+ private void LoadReferenceAssemblies()
+ {
+ LoadedAssemblies = Project.LoadReferenceAssemblies().ToObservableCollection();
+ }
+
+ private void RemoveReferenceAssembly(ReferenceAssembly assembly)
+ {
+ Project.ReferenceAssemblies.Remove(assembly);
+ _isProjectChanged = true;
+ LoadedAssemblies = Project.LoadReferenceAssemblies().ToObservableCollection();
+ }
+
+ #endregion
+
+ #region Project Management
+
private async void CreateNewProject()
{
if (await CheckDiscardProjectChanges())
@@ -459,6 +485,7 @@ namespace Tango.FSE.Stubs.ViewModels
Status = "Project saved.";
Project.Scripts.ToList().ForEach(x => x.IsChanged = false);
+ _isProjectChanged = false;
}
catch (Exception ex)
{
@@ -486,6 +513,7 @@ namespace Tango.FSE.Stubs.ViewModels
Status = "Project saved.";
Project.Scripts.ToList().ForEach(x => x.IsChanged = false);
+ _isProjectChanged = false;
}
catch (Exception ex)
{
@@ -496,33 +524,6 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
- private async void AddNewLibrary()
- {
- var result = await NotificationProvider.ShowInputBox("New Library File", "Please specify the library name", PackIconKind.Script, "MyLibrary", "Library Name", 100, "ADD LIBRARY");
-
- if (result.Confirmed)
- {
- if (Project.Scripts.Any(x => x.Name.ToLower() == result.Input.ToLower() + ".csx"))
- {
- await NotificationProvider.ShowError($"The project already contains a file named '{result.Input}'.");
- return;
- }
-
- try
- {
- var lib = Script.New(result.Input.ToTitleCase() + ".csx", Encoding.UTF8.GetString(Properties.Resources.lib_template));
- Project.Scripts.Add(lib);
- _isProjectChanged = true;
- OpenScript(lib);
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Error adding new library to test project.");
- await NotificationProvider.ShowError($"Could not add a new script to the project.\n{ex.FlattenMessage()}");
- }
- }
- }
-
private void OnProjectChanged()
{
if (Project != null)
@@ -548,11 +549,6 @@ namespace Tango.FSE.Stubs.ViewModels
InvalidateRelayCommands();
}
- private void LoadReferenceAssemblies()
- {
- LoadedAssemblies = Project.LoadReferenceAssemblies().ToObservableCollection();
- }
-
private async void OpenProject()
{
if (await CheckDiscardProjectChanges())
@@ -594,16 +590,35 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
- private void RemoveReferenceAssembly(ReferenceAssembly assembly)
- {
- Project.ReferenceAssemblies.Remove(assembly);
- _isProjectChanged = true;
- LoadedAssemblies = Project.LoadReferenceAssemblies().ToObservableCollection();
- }
+ #endregion
- private void ClearOutput()
+ #region Libraries
+
+ private async void AddNewLibrary()
{
- Logger.Clear();
+ var result = await NotificationProvider.ShowInputBox("New Library File", "Please specify the library name", PackIconKind.Script, "MyLibrary", "Library Name", 100, "ADD LIBRARY");
+
+ if (result.Confirmed)
+ {
+ if (Project.Scripts.Any(x => x.Name.ToLower() == result.Input.ToLower() + ".csx"))
+ {
+ await NotificationProvider.ShowError($"The project already contains a file named '{result.Input}'.");
+ return;
+ }
+
+ try
+ {
+ var lib = Script.New(result.Input + ".csx", Encoding.UTF8.GetString(Properties.Resources.lib_template).Replace("@LibraryName", result.Input));
+ Project.Scripts.Add(lib);
+ _isProjectChanged = true;
+ OpenScript(lib);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error adding new library to test project.");
+ await NotificationProvider.ShowError($"Could not add a new script to the project.\n{ex.FlattenMessage()}");
+ }
+ }
}
private async void DeleteLibrary(Script script)
@@ -622,6 +637,17 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
+ private async void RenameLibrary(Script script)
+ {
+ var result = await NotificationProvider.ShowInputBox("Rename Library File", "Please specify a new library name", PackIconKind.Rename, Path.GetFileNameWithoutExtension(script.Name), "Library Name", 100, "RENAME");
+
+ if (result.Confirmed)
+ {
+ script.Name = result.Input + ".csx";
+ script.IsChanged = true;
+ }
+ }
+
#endregion
#region ITestLogger
@@ -701,7 +727,7 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
- private void LoadPublishedProject(PublishedTestProject project)
+ private async void LoadPublishedProject(PublishedTestProject project)
{
try
{
@@ -710,14 +736,21 @@ namespace Tango.FSE.Stubs.ViewModels
throw new NullReferenceException("No project provided.");
}
- Project = TestProject.FromJson(project.CurrentVersion.ProjectJsonString);
- PublishedTestProject = project;
- _projectFile = null;
+ if (!await CheckDiscardProjectChanges()) return;
+
+ using (NotificationProvider.PushTaskItem("Loading published project..."))
+ {
+ await Task.Delay(1000);
+ Project = TestProject.FromJson(project.CurrentVersion.ProjectJsonString);
+ PublishedTestProject = project;
+ _projectFile = null;
+ await Task.Delay(1000);
+ }
}
catch (Exception ex)
{
LogManager.Log(ex, "Error loading published test project.");
- NotificationProvider.ShowError($"Error loading published test project.\n{ex.FlattenMessage()}");
+ await NotificationProvider.ShowError($"Error loading published test project.\n{ex.FlattenMessage()}");
}
}
@@ -794,5 +827,15 @@ namespace Tango.FSE.Stubs.ViewModels
}
#endregion
+
+ #region INavigationObjectReceiver
+
+ public async void OnNavigatedToWithObject(NavigationObject obj)
+ {
+ await Task.Delay(500);
+ LoadPublishedProject(obj.Project);
+ }
+
+ #endregion
}
}
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs
index f58d14c88..b57818dea 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ViewModels/TestRunnerViewVM.cs
@@ -4,7 +4,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
+using Tango.Core.Commands;
using Tango.FSE.Common;
+using Tango.FSE.Stubs.Views;
namespace Tango.FSE.Stubs.ViewModels
{
@@ -51,9 +53,28 @@ namespace Tango.FSE.Stubs.ViewModels
set { _isLoadingProjects = value; RaisePropertyChangedAuto(); }
}
+ public RelayCommand<PublishedTestProject> EditProjectCommand { get; set; }
+ public RelayCommand<PublishedTestProject> RunProjectCommand { get; set; }
+
public TestRunnerViewVM()
{
-
+ EditProjectCommand = new RelayCommand<PublishedTestProject>(EditProject);
+ RunProjectCommand = new RelayCommand<PublishedTestProject>(RunProject);
+ }
+
+ private void EditProject(PublishedTestProject project)
+ {
+ if (project != null)
+ {
+ NavigationManager.NavigateWithObject<
+ StubsModule,
+ TestDesignerView,
+ TestDesignerViewVM.NavigationObject>(
+ new TestDesignerViewVM.NavigationObject()
+ {
+ Project = project
+ });
+ }
}
public override void OnNavigatedTo()
@@ -87,5 +108,21 @@ namespace Tango.FSE.Stubs.ViewModels
}
}
}
+
+ private void RunProject(PublishedTestProject project)
+ {
+ SelectedView = RunnerView.TestRunnerExecutionView;
+ }
+
+ public override Task<bool> OnNavigateBackRequest()
+ {
+ if (SelectedView == RunnerView.TestRunnerExecutionView)
+ {
+ SelectedView = RunnerView.TestRunnerCatalogView;
+ return Task.FromResult(false);
+ }
+
+ return base.OnNavigateBackRequest();
+ }
}
}
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml
index 0f2d876af..8368c21d8 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml
@@ -61,6 +61,7 @@
<material:PackIcon Kind="ScriptText" />
</MenuItem.Icon>
</MenuItem>
+ <Separator/>
<MenuItem Header="Load Published Project" Command="{Binding LoadPublishedProjectCommand}">
<MenuItem.Icon>
<material:PackIcon Kind="FolderCog" />
@@ -533,7 +534,7 @@
<ScrollViewer Padding="10" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel>
<DockPanel>
- <Image Source="../Images/project.png" Width="24" RenderOptions.BitmapScalingMode="Fant" />
+ <Image Source="../Images/project_small.png" Width="20" RenderOptions.BitmapScalingMode="Fant" />
<material:PackIcon DockPanel.Dock="Right" Kind="Eye" VerticalAlignment="Center" Visibility="{Binding PublishedTestProject,Converter={StaticResource IsNullToVisibilityConverter}}">
<material:PackIcon.Style>
<Style TargetType="material:PackIcon">
@@ -591,6 +592,12 @@
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
+ <MenuItem MinWidth="180" IsEnabled="{Binding IsEntryPoint,Converter={StaticResource BooleanInverseConverter}}" Header="Rename" Command="{Binding Source={StaticResource proxy},Path=Data.RenameLibraryCommand}" CommandParameter="{Binding}">
+ <MenuItem.Icon>
+ <material:PackIcon Kind="Rename" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
<MenuItem MinWidth="180" IsEnabled="{Binding IsEntryPoint,Converter={StaticResource BooleanInverseConverter}}" Header="Delete" Command="{Binding Source={StaticResource proxy},Path=Data.DeleteLibraryCommand}" CommandParameter="{Binding}">
<MenuItem.Icon>
<material:PackIcon Kind="Delete" Foreground="{StaticResource FSE_RedBrush}" />
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml
index 94ed1d58f..1eb5b0900 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml
@@ -10,11 +10,21 @@
xmlns:local="clr-namespace:Tango.FSE.Stubs.Views"
xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:TestRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.TestRunnerViewVM}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
+ d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:TestRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.TestRunnerViewVM}" d:DesignStyle="{StaticResource FSE_User_Control_Designer}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
<Grid Margin="10">
<DockPanel>
- <Grid DockPanel.Dock="Top" Height="200">
- <TextBlock>Some into here</TextBlock>
+ <Grid Margin="95 55 0 0" DockPanel.Dock="Top" Height="200">
+ <StackPanel>
+ <TextBlock Foreground="{StaticResource FSE_GrayBrush}" LineHeight="18">
+ <Run>Welcome to the test runner.</Run>
+ <LineBreak/>
+ <Run>Below is a collection of machine tests that can be executed independently.</Run>
+ <LineBreak/>
+ <Run>Each test can yield on or more test results, and may require you to provide some input before execution.</Run>
+ <LineBreak/>
+ <Run>Pressing the 'run' button on the desired test, will navigate you to the test execution screen.</Run>
+ </TextBlock>
+ </StackPanel>
</Grid>
<Grid Margin="0 20 0 0">
<ListBox Style="{StaticResource FSE_BlankListBox}" ItemsSource="{Binding PublishedTestProjects}">
@@ -38,44 +48,53 @@
</Border.BorderBrush>
<Border.Clip>
- <RectangleGeometry RadiusX="5" RadiusY="5" Rect="0,0,350,200" />
- </Border.Clip>
- <Grid>
- <Polygon Fill="{StaticResource FSE_PrimaryBackgroundLighterBrush}" Points="0,0 150,0 0,170"></Polygon>
- <DockPanel>
- <Border CornerRadius="0 0 5 5" Padding="8" BorderThickness="0 1 0 0" BorderBrush="{StaticResource FSE_BorderBrush}" DockPanel.Dock="Bottom" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" >
- <Button Height="30" Width="140" HorizontalAlignment="Right" Style="{StaticResource FSE_RaisedButton_Dark_Hover}">
- <DockPanel>
- <material:PackIcon Kind="Play" Height="24" Width="24" Foreground="{StaticResource FSE_GreenBrush}" />
- <TextBlock Margin="10 2 0 0" VerticalAlignment="Center">RUN</TextBlock>
+ <RectangleGeometry RadiusX="5" RadiusY="5" Rect="0,0,350,200" />
+ </Border.Clip>
+ <Grid>
+ <Polygon Fill="{StaticResource FSE_PrimaryBackgroundLighterBrush}" Points="0,0 150,0 0,170"></Polygon>
+ <DockPanel>
+ <Border CornerRadius="0 0 5 5" Padding="8" BorderThickness="0 1 0 0" BorderBrush="{StaticResource FSE_BorderBrush}" DockPanel.Dock="Bottom" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" >
+ <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RunProjectCommand}" CommandParameter="{Binding}" Height="30" Width="140" HorizontalContentAlignment="Stretch" HorizontalAlignment="Right" Style="{StaticResource FSE_RaisedButton_Dark_Hover}">
+ <DockPanel>
+ <material:PackIcon Kind="Play" Height="24" Width="24" Foreground="{StaticResource FSE_GreenBrush}" />
+ <TextBlock Margin="20 2 0 0" VerticalAlignment="Center">RUN</TextBlock>
+ </DockPanel>
+ </Button>
+ </Border>
+ <DockPanel Margin="10">
+ <Image VerticalAlignment="Top" Source="../Images/project.png" Width="48" RenderOptions.BitmapScalingMode="Fant" />
+ <DockPanel Margin="10 0 0 0">
+ <TextBlock Text="{Binding Name}" DockPanel.Dock="Top" TextWrapping="Wrap" FontSize="{StaticResource FSE_LargerFontSize}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=border,Path=IsMouseOver}" Value="True">
+ <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ <TextBlock Margin="0 5 0 0" Foreground="{StaticResource FSE_GrayBrush}" TextWrapping="Wrap" Text="{Binding Description}" />
+ </DockPanel>
</DockPanel>
- </Button>
- </Border>
- <DockPanel Margin="10">
- <Image VerticalAlignment="Top" Source="../Images/project.png" Width="48" RenderOptions.BitmapScalingMode="Fant" />
- <DockPanel Margin="10 0 0 0">
- <TextBlock Text="{Binding Name}" DockPanel.Dock="Top" TextWrapping="Wrap" FontSize="{StaticResource FSE_LargerFontSize}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=border,Path=IsMouseOver}" Value="True">
- <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
- <TextBlock Margin="0 5 0 0" Foreground="{StaticResource FSE_GrayBrush}" TextWrapping="Wrap" Text="{Binding Description}" />
</DockPanel>
- </DockPanel>
- </DockPanel>
- </Grid>
- </Border>
+
+ <controls:IconButton HorizontalAlignment="Right" VerticalAlignment="Top" Cursor="Hand" Width="30" Height="30" Icon="Cogs" ToolTip="Edit this project in Test Designer" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.EditProjectCommand}" CommandParameter="{Binding}" />
+ </Grid>
+ </Border>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+
+ <Grid Background="Transparent" Visibility="{Binding IsLoadingProjects,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <ProgressBar HorizontalAlignment="Center" IsIndeterminate="{Binding IsLoadingProjects}" Style="{StaticResource FSE_CircularProgressBar}" Width="150" Height="150" />
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Loading tests collection...</TextBlock>
+ </StackPanel>
+ </Grid>
</Grid>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml
index e7de383f8..6925612ce 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml
@@ -8,8 +8,23 @@
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Tango.FSE.Stubs.Views"
mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:TestRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.TestRunnerViewVM}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
- <Grid>
-
+ d:DesignHeight="720" d:DesignWidth="1280" d:DesignStyle="{StaticResource FSE_User_Control_Designer}" d:DataContext="{d:DesignInstance Type=vm:TestRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.TestRunnerViewVM}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
+ <Grid Margin="10">
+ <DockPanel>
+ <Grid Margin="95 55 0 0" DockPanel.Dock="Top" Height="200">
+ <StackPanel>
+ <TextBlock Foreground="{StaticResource FSE_GrayBrush}" LineHeight="18">
+ <Run>Executing test aaa.</Run>
+ <LineBreak/>
+ <Run>This is the test description blaasdasd.</Run>
+ <LineBreak/>
+ <Run>Each test can yield on or more test results, and may require you to provide some input before execution.</Run>
+ </TextBlock>
+ </StackPanel>
+ </Grid>
+ <Grid Margin="0 20 0 0">
+
+ </Grid>
+ </DockPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerView.xaml
index 710decea5..1a9c173b4 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerView.xaml
@@ -12,10 +12,22 @@
d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:TestRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.TestRunnerViewVM}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
<Grid>
- <controls:NavigationControl TransitionType="Slide">
- <local:TestRunnerCatalogView/>
- <local:TestRunnerExecutionView/>
- </controls:NavigationControl>
+ <Grid>
+ <Grid Margin="20 20 0 0" Height="200" VerticalAlignment="Top">
+ <DockPanel>
+ <Image Margin="0 10 0 0" Source="../Images/test_runner.png" Stretch="None" VerticalAlignment="Top" RenderOptions.BitmapScalingMode="Fant" />
+ <StackPanel Margin="20 0 0 0">
+ <TextBlock FontSize="{StaticResource FSE_ModuleHeaderFontSize}" Foreground="{StaticResource FSE_PrimaryAccentBrush}">Test Runner</TextBlock>
+ </StackPanel>
+ </DockPanel>
+ </Grid>
+ <Grid>
+ <controls:NavigationControl TransitionType="Slide" TransitionDuration="00:00:0.2" SelectedObject="{Binding SelectedView}">
+ <local:TestRunnerCatalogView/>
+ <local:TestRunnerExecutionView/>
+ </controls:NavigationControl>
+ </Grid>
+ </Grid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml
index 6614db25d..3c21cad4b 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml
@@ -713,4 +713,8 @@
<Setter Property="ItemContainerStyle" Value="{StaticResource FSE_BlankListBoxItem}"></Setter>
</Style>
+ <Style TargetType="UserControl" x:Key="FSE_User_Control_Designer">
+ <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
+ </Style>
+
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Script.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Script.cs
index 69bc15468..c465292cb 100644
--- a/Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Script.cs
+++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Script.cs
@@ -12,7 +12,13 @@ namespace Tango.Scripting.Basic
{
public class Script : ExtendedObject, IScriptSource
{
- public String Name { get; set; }
+ private String _name;
+ public String Name
+ {
+ get { return _name; }
+ set { _name = value; RaisePropertyChangedAuto(); }
+ }
+
public bool IsEntryPoint { get; set; }
private String _code;
diff --git a/Software/Visual_Studio/Tango.FSE.sln b/Software/Visual_Studio/Tango.FSE.sln
new file mode 100644
index 000000000..fe7f056e8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.FSE.sln
@@ -0,0 +1,89 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.645
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSE", "FSE", "{C3E55397-70D9-4850-81A5-CBBCDCF4C192}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.BL", "FSE\Tango.FSE.BL\Tango.FSE.BL.csproj", "{834C81C3-09B5-45D7-BE12-E7D1E6655A7C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Common", "FSE\Tango.FSE.Common\Tango.FSE.Common.csproj", "{BC37CCCB-7392-4F78-8D1C-E9629E6E046E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Web", "FSE\Tango.FSE.Web\Tango.FSE.Web.csproj", "{D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.UI", "FSE\Tango.FSE.UI\Tango.FSE.UI.csproj", "{26C54A4F-315D-4B79-B163-EDDDE8F93A86}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Diagnostics", "FSE\Modules\Tango.FSE.Diagnostics\Tango.FSE.Diagnostics.csproj", "{8CFFA4FC-F46F-475D-A270-DAFBFB532BC8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Firmware", "FSE\Modules\Tango.FSE.Firmware\Tango.FSE.Firmware.csproj", "{7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.PPCConsole", "FSE\Modules\Tango.FSE.PPCConsole\Tango.FSE.PPCConsole.csproj", "{866B916A-207C-43F0-B403-7C4A820C2E11}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Stubs", "FSE\Modules\Tango.FSE.Stubs\Tango.FSE.Stubs.csproj", "{1754F846-4763-4000-807F-C7BFAA145DB2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.Upgrade", "FSE\Modules\Tango.FSE.Upgrade\Tango.FSE.Upgrade.csproj", "{0C0B24CB-79AF-4253-AAC3-B2BADF034675}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {834C81C3-09B5-45D7-BE12-E7D1E6655A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {834C81C3-09B5-45D7-BE12-E7D1E6655A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {834C81C3-09B5-45D7-BE12-E7D1E6655A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {834C81C3-09B5-45D7-BE12-E7D1E6655A7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC37CCCB-7392-4F78-8D1C-E9629E6E046E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC37CCCB-7392-4F78-8D1C-E9629E6E046E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC37CCCB-7392-4F78-8D1C-E9629E6E046E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC37CCCB-7392-4F78-8D1C-E9629E6E046E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {26C54A4F-315D-4B79-B163-EDDDE8F93A86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {26C54A4F-315D-4B79-B163-EDDDE8F93A86}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {26C54A4F-315D-4B79-B163-EDDDE8F93A86}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {26C54A4F-315D-4B79-B163-EDDDE8F93A86}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CFFA4FC-F46F-475D-A270-DAFBFB532BC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CFFA4FC-F46F-475D-A270-DAFBFB532BC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CFFA4FC-F46F-475D-A270-DAFBFB532BC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8CFFA4FC-F46F-475D-A270-DAFBFB532BC8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174}.Release|Any CPU.Build.0 = Release|Any CPU
+ {866B916A-207C-43F0-B403-7C4A820C2E11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {866B916A-207C-43F0-B403-7C4A820C2E11}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {866B916A-207C-43F0-B403-7C4A820C2E11}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {866B916A-207C-43F0-B403-7C4A820C2E11}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1754F846-4763-4000-807F-C7BFAA145DB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1754F846-4763-4000-807F-C7BFAA145DB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1754F846-4763-4000-807F-C7BFAA145DB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1754F846-4763-4000-807F-C7BFAA145DB2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C0B24CB-79AF-4253-AAC3-B2BADF034675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C0B24CB-79AF-4253-AAC3-B2BADF034675}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C0B24CB-79AF-4253-AAC3-B2BADF034675}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C0B24CB-79AF-4253-AAC3-B2BADF034675}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775} = {C3E55397-70D9-4850-81A5-CBBCDCF4C192}
+ {834C81C3-09B5-45D7-BE12-E7D1E6655A7C} = {C3E55397-70D9-4850-81A5-CBBCDCF4C192}
+ {BC37CCCB-7392-4F78-8D1C-E9629E6E046E} = {C3E55397-70D9-4850-81A5-CBBCDCF4C192}
+ {D6F7D31D-7F8C-45E2-AE0A-FBBD1F5F9D5F} = {C3E55397-70D9-4850-81A5-CBBCDCF4C192}
+ {26C54A4F-315D-4B79-B163-EDDDE8F93A86} = {C3E55397-70D9-4850-81A5-CBBCDCF4C192}
+ {8CFFA4FC-F46F-475D-A270-DAFBFB532BC8} = {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}
+ {7CB96D74-8B71-4A81-B4E1-6DE7BFCA6174} = {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}
+ {866B916A-207C-43F0-B403-7C4A820C2E11} = {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}
+ {1754F846-4763-4000-807F-C7BFAA145DB2} = {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}
+ {0C0B24CB-79AF-4253-AAC3-B2BADF034675} = {DBE903D1-1D6C-4B0D-8EB1-CCB447FA1775}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {44758539-3458-4A3E-89DD-68F496B34B45}
+ EndGlobalSection
+EndGlobal