aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/FSE')
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml8
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs1
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs7
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs19
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj1
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs12
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs15
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml54
9 files changed, 109 insertions, 10 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
index ae4444f06..538e8a795 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
@@ -241,7 +241,7 @@ namespace Tango.FSE.Statistics.ViewModels
StartSelectedDate = DateTime.Now.AddDays(-7);
EndSelectedDate = DateTime.Now;
- LengthUpperValue = 10000;
+ LengthUpperValue = 1000000;
GetStatisticsCommand = new RelayCommand(GetStatistics, () => IsFiltersAvailable);
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
index 88b460ab1..590192e28 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
@@ -442,21 +442,21 @@
<GroupBox.Header>
<TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Length</TextBox>
</GroupBox.Header>
- <mahapps:RangeSlider Focusable="True" Height="40" Margin="5 5 5 5" Minimum="0" Maximum="10000" ExtendedMode="True"
+ <mahapps:RangeSlider Focusable="True" Height="40" Margin="5 5 5 5" Minimum="0" Maximum="1000000" ExtendedMode="True"
LowerValue="{Binding LengthLowerValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
UpperValue="{Binding LengthUpperValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center" IsSnapToTickEnabled="True" FontSize="8"/>
</GroupBox>
- <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Width="130" TextBlock.Foreground="{StaticResource FSE_GrayBrush}">
+ <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Width="150" Margin="0 -5 0 0" TextBlock.Foreground="{StaticResource FSE_GrayBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
- <TextBlock HorizontalAlignment="Left" Text="{Binding LengthLowerValue}" Grid.Column="0"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000000" Style="{StaticResource FSE_NumericUpDown_Flat_Dark}" Width="60" FontSize="{StaticResource FSE_SmallerFontSize}" MinWidth="10" Height="20" Padding="2 0 0 0" MinHeight="10" HideUpDownButtons="True" Value="{Binding LengthLowerValue,UpdateSourceTrigger=PropertyChanged}" Grid.Column="0"></mahapps:NumericUpDown>
<material:PackIcon HorizontalAlignment="Center" Grid.Column="1" Kind="ArrowLeftRight" Margin="0 -2 0 0" VerticalAlignment="Center" Width="20" Height="20"></material:PackIcon>
- <TextBlock HorizontalAlignment="Right" Text="{Binding LengthUpperValue}" Grid.Column="2"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="1000000" Style="{StaticResource FSE_NumericUpDown_Flat_Dark}" Width="60" FontSize="{StaticResource FSE_SmallerFontSize}" MinWidth="10" Height="20" MinHeight="10" Padding="2 0 0 0" HideUpDownButtons="True" BorderBrush="Transparent" Value="{Binding LengthUpperValue,UpdateSourceTrigger=PropertyChanged}" Grid.Column="2"></mahapps:NumericUpDown>
</Grid>
</Grid>
</StackPanel>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
index 65299eac9..ff70bd7ba 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/IRemoteJobProvider.cs
@@ -10,6 +10,7 @@ namespace Tango.FSE.Common.RemoteJob
{
event EventHandler<RemoteJobStartedEventArgs> RemoteJobStarted;
event EventHandler<RemoteJobStoppedEventArgs> RemoteJobStopped;
+ event EventHandler<RemoteJobUpdatedEventArgs> RemoteJobUpdated;
bool IsRemoteJobRunning { get; }
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
index 001263044..d3af568aa 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobStartedEventArgs.cs
@@ -5,11 +5,18 @@ using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Integration.Operation;
+using Tango.PPC.Shared.Jobs;
namespace Tango.FSE.Common.RemoteJob
{
public class RemoteJobStartedEventArgs : EventArgs
{
+ public RemoteJobUpdateResponse RemoteJobUpdateResponse { get; set; }
public JobHandler JobHandler { get; set; }
+
+ public RemoteJobStartedEventArgs()
+ {
+ RemoteJobUpdateResponse = new RemoteJobUpdateResponse();
+ }
}
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs
new file mode 100644
index 000000000..1b548adb2
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/RemoteJob/RemoteJobUpdatedEventArgs.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Shared.Jobs;
+
+namespace Tango.FSE.Common.RemoteJob
+{
+ public class RemoteJobUpdatedEventArgs : EventArgs
+ {
+ public RemoteJobUpdateResponse RemoteJobUpdateResponse { get; set; }
+
+ public RemoteJobUpdatedEventArgs()
+ {
+ RemoteJobUpdateResponse = new RemoteJobUpdateResponse();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
index 8ef3551d5..519da38bb 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
@@ -317,6 +317,7 @@
<Compile Include="RemoteDesktop\VideoConfiguration.cs" />
<Compile Include="RemoteDesktop\VideoQuality.cs" />
<Compile Include="RemoteDesktop\VideoRecordingHandler.cs" />
+ <Compile Include="RemoteJob\RemoteJobUpdatedEventArgs.cs" />
<Compile Include="RemoteUpgrade\IRemoteUpgradeManager.cs" />
<Compile Include="RemoteUpgrade\RemoteUpgradeHandler.cs" />
<Compile Include="RemoteUpgrade\RemoteUpgradeHandlerStatus.cs" />
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
index 4c4d5430e..d3c6c44e8 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteJob/DefaultRemoteJobProvider.cs
@@ -23,8 +23,15 @@ namespace Tango.FSE.UI.RemoteJob
public event EventHandler<RemoteJobStartedEventArgs> RemoteJobStarted;
public event EventHandler<RemoteJobStoppedEventArgs> RemoteJobStopped;
+ public event EventHandler<RemoteJobUpdatedEventArgs> RemoteJobUpdated;
+
+ private bool _isRemoteJobRunning;
+ public bool IsRemoteJobRunning
+ {
+ get { return _isRemoteJobRunning; }
+ private set { _isRemoteJobRunning = value; RaisePropertyChangedAuto(); }
+ }
- public bool IsRemoteJobRunning { get; private set; }
[TangoInject]
private IMachineProvider MachineProvider { get; set; }
@@ -97,6 +104,8 @@ namespace Tango.FSE.UI.RemoteJob
JobHandler = _handler
});
+ RemoteJobUpdated?.Invoke(this, new RemoteJobUpdatedEventArgs() { RemoteJobUpdateResponse = response });
+
return;
}
@@ -105,6 +114,7 @@ namespace Tango.FSE.UI.RemoteJob
if (response.Progress.JobStatus != null)
{
_handler.RaiseStatusReceived(response.Progress.JobStatus);
+ RemoteJobUpdated?.Invoke(this, new RemoteJobUpdatedEventArgs() { RemoteJobUpdateResponse = response });
}
if (stage == RemoteJobStage.Failed && IsRemoteJobRunning)
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
index 453a0892e..07784ce1f 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs
@@ -36,6 +36,14 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
set { _runningJobStatus = value; RaisePropertyChangedAuto(); }
}
+ private RemoteJobUpdateResponse _remoteJobResponse;
+ public RemoteJobUpdateResponse RemoteJobResponse
+ {
+ get { return _remoteJobResponse; }
+ set { _remoteJobResponse = value; RaisePropertyChangedAuto(); }
+ }
+
+
private bool _isRunning;
public bool IsRunning
{
@@ -99,9 +107,15 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
RemoteJobProvider.RemoteJobStarted += RemoteJobProvider_RemoteJobStarted;
RemoteJobProvider.RemoteJobStopped += RemoteJobProvider_RemoteJobStopped;
+ RemoteJobProvider.RemoteJobUpdated += RemoteJobProvider_RemoteJobUpdated;
MachineProvider.MachineConnected += MachineProvider_MachineConnected;
}
+ private void RemoteJobProvider_RemoteJobUpdated(object sender, Common.RemoteJob.RemoteJobUpdatedEventArgs e)
+ {
+ RemoteJobResponse = e.RemoteJobUpdateResponse;
+ }
+
private void MachineProvider_MachineConnected(object sender, Common.Connection.MachineConnectedEventArgs e)
{
InitDemoJob();
@@ -119,6 +133,7 @@ namespace Tango.FSE.UI.Tiles.RemoteJob
Handler.StatusChanged -= Handler_StatusChanged;
}
+ RemoteJobResponse = e.RemoteJobUpdateResponse;
Handler = e.JobHandler;
Handler.StatusChanged += Handler_StatusChanged;
Job = e.JobHandler.Job;
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
index 1323c9298..419d34e89 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml
@@ -9,9 +9,55 @@
d:DesignHeight="100" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:RemoteJobTile, IsDesignTimeCreatable=False}">
<Grid TextElement.Foreground="{StaticResource FSE_PrimaryAccentBrush}">
<Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
- <Border Background="#292929" CornerRadius="10" VerticalAlignment="Bottom" Padding="20 0" Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
- <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsEureka="{Binding IsEureka}" IsActive="True" Margin="30 10" Height="90" />
- </Border>
- </Viewbox>
+ <Grid>
+ <Grid HorizontalAlignment="Left" Width="700" Height="200" Margin="50 -350 0 0" TextElement.Foreground="{StaticResource FSE_GrayBrush}" Visibility="{Binding IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel VerticalAlignment="Bottom">
+ <TextBlock Margin="5 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}" Text="{Binding Handler.Job.Name}" FontWeight="Bold"></TextBlock>
+ <TextBlock Margin="5 0 0 0" FontSize="{StaticResource FSE_DefaultFontSize}" Text="{Binding RemoteJobResponse.RmlName}" FontStyle="Italic"></TextBlock>
+
+ <StackPanel Orientation="Horizontal" TextElement.FontSize="11" Margin="0 10 0 0" Visibility="{Binding IsEureka,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ItemsControl ItemsSource="{Binding RemoteJobResponse.Progress.InputOutput.Input}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border Margin="5" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1" Width="45" Height="45" CornerRadius="5">
+ <DockPanel>
+ <TextBlock Margin="0 5 0 0" DockPanel.Dock="Top" Text="{Binding Item1,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock Margin="0 2 0 0" Text="{Binding Item2,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <TextBlock Margin="20 0" Text="=>" VerticalAlignment="Center"></TextBlock>
+ <ItemsControl ItemsSource="{Binding RemoteJobResponse.Progress.InputOutput.Output}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border Margin="5" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1" Width="45" Height="45" CornerRadius="5">
+ <DockPanel>
+ <TextBlock Margin="0 5 0 0" DockPanel.Dock="Top" Text="{Binding Item1,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock Margin="0 2 0 0" Text="{Binding Item2,Mode=OneWay}" HorizontalAlignment="Center"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ <Border Background="#292929" CornerRadius="10" VerticalAlignment="Bottom" Padding="20 0" Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}">
+ <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsEureka="{Binding IsEureka}" IsActive="True" Margin="30 10" Height="90" />
+ </Border>
+ </Grid>
+ </Viewbox>
</Grid>
</UserControl>