aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-18 16:57:36 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-18 16:57:36 +0200
commitec36bdb8a6fb3d460929c7f6f20e695dd98688c4 (patch)
tree7d49ec78f753367dee02df376ca77f67aca8c09f /Software/Visual_Studio/PPC/Modules
parent2d4d1733108689ebf2fc8ae2fa6fd73d649e3ae7 (diff)
downloadTango-ec36bdb8a6fb3d460929c7f6f20e695dd98688c4.tar.gz
Tango-ec36bdb8a6fb3d460929c7f6f20e695dd98688c4.zip
Added BTSR Installed to UpdateMachine and ProvisionMachine.
UpgradeToGen2. MS. FSE. Thread Loading Wizard BTSR tension.. BTSR Completed for now (except guides images).
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs13
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs14
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml10
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml10
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml4
5 files changed, 47 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
index 078296f27..3dcca8821 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs
@@ -53,13 +53,19 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Gets or sets the duration of the estimated.
/// </summary>
-
public TimeSpan EstimatedDuration
{
get { return _estimatedDuration; }
set { _estimatedDuration = value; RaisePropertyChangedAuto(); }
}
+ private int _btsrSpoolTension;
+ public int BtsrSpoolTension
+ {
+ get { return _btsrSpoolTension; }
+ set { _btsrSpoolTension = value; RaisePropertyChangedAuto(); }
+ }
+
/// <summary>
/// Gets or sets the dye command.
/// </summary>
@@ -155,6 +161,11 @@ namespace Tango.PPC.Jobs.ViewModels
.WithBrushStops()
.BuildAsync();
+ if (Job.Rml != null && _context != null)
+ {
+ BtsrSpoolTension = await Job.Rml.GetRequiredBtsrSpoolTension(_context, Job.SpoolType);
+ }
+
await Task.Factory.StartNew(() =>
{
try
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index 3a2d64977..bab4d73ab 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -209,6 +209,13 @@ namespace Tango.PPC.Jobs.ViewModels
set { _lubricationLevel = value; RaisePropertyChangedAuto(); }
}
+ private int _btsrSpoolTension;
+ public int BtsrSpoolTension
+ {
+ get { return _btsrSpoolTension; }
+ set { _btsrSpoolTension = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -673,7 +680,7 @@ namespace Tango.PPC.Jobs.ViewModels
#region RML Changed
- protected virtual void OnRmlChanged(object sender, Rml rml)
+ protected async virtual void OnRmlChanged(object sender, Rml rml)
{
foreach (var segment in Job.Segments)
{
@@ -682,6 +689,11 @@ namespace Tango.PPC.Jobs.ViewModels
GetLubricationLevel();
+ if (rml != null && _db != null)
+ {
+ BtsrSpoolTension = await rml.GetRequiredBtsrSpoolTension(_db, Job.SpoolType);
+ }
+
ResetFineTuning();
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
index ddda98df9..34ddeca8a 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml
@@ -92,6 +92,16 @@
</UniformGrid>
</Grid>
+ <StackPanel Grid.Row="2" VerticalAlignment="Top" HorizontalAlignment="Center" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" Visibility="{Binding MachineProvider.Machine.BtsrInstalled,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <DockPanel>
+ <touch:TouchIcon Icon="AlertCircleOutline" Width="16" Foreground="{StaticResource TangoGrayTextBrush}" />
+ <TextBlock Margin="5 1 0 0" VerticalAlignment="Center">
+ <Run>Required tensioner level is </Run>
+ <Run Text="{Binding BtsrSpoolTension}" FontWeight="Bold"></Run>
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+
<controls:JobSummeryViewer Height="40" Job="{Binding Job}" VerticalAlignment="Center" Margin="20 0" Grid.Row="2" />
</Grid>
</DockPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
index e3da251dc..7aef209ec 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
@@ -516,6 +516,16 @@
</TextBlock>
</DockPanel>
+ <StackPanel TextElement.Foreground="{StaticResource TangoGrayTextBrush}" Margin="110 5 0 0" HorizontalAlignment="Left" Visibility="{Binding MachineProvider.Machine.BtsrInstalled,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <DockPanel>
+ <touch:TouchIcon Icon="AlertCircleOutline" Width="16" Foreground="{StaticResource TangoGrayTextBrush}" />
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
+ <Run>Required tensioner level is </Run>
+ <Run Text="{Binding BtsrSpoolTension}" FontWeight="Bold"></Run>
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+
<StackPanel Margin="0 35 0 0">
<TextBlock>Comment:</TextBlock>
<touch:TouchMultiLineTextBox Margin="0 5 0 0" Text="{Binding Job.Description}" Height="60" keyboard:KeyboardView.Container="{Binding ElementName=Container}"></touch:TouchMultiLineTextBox>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
index 5534b1315..bf0128149 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
@@ -238,12 +238,12 @@
<StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
<UniformGrid Columns="2" Margin="0 0">
- <localControls:StateTouchButton Command="{Binding OpenCloseLeftLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseLeftLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
+ <localControls:StateTouchButton Visibility="{Binding MachineProvider.Machine.BtsrInstalled,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Command="{Binding OpenCloseLeftLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseLeftLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
<localControls:ButtonState Value="Closed" Content="OPEN LEFT LEADING WHEELS" />
<localControls:ButtonState Value="Opened" Content="CLOSE LEFT LEADING WHEELS" />
</localControls:StateTouchButton>
- <localControls:StateTouchButton Command="{Binding OpenCloseRightLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseRightLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
+ <localControls:StateTouchButton Visibility="{Binding MachineProvider.Machine.BtsrInstalled,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Command="{Binding OpenCloseRightLeadingWheelsCommand.Command}" SelectedState="{Binding OpenCloseRightLeadingWheelsCommand.State}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">
<localControls:ButtonState Value="Closed" Content="OPEN RIGHT LEADING WHEELS" />
<localControls:ButtonState Value="Opened" Content="CLOSE RIGHT LEADING WHEELS" />
</localControls:StateTouchButton>