aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
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
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')
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml5
-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
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs34
-rw-r--r--Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Rml.cs26
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs10
-rw-r--r--Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xmlbin77024 -> 77344 bytes
-rw-r--r--Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xmlbin78606 -> 78926 bytes
13 files changed, 130 insertions, 8 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml
index 2445c5cf1..db7fe7fe8 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml
@@ -174,6 +174,11 @@
<ToggleButton IsChecked="{Binding EditingComposition.Machine.LightInksInstalled}" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Light Inks Installed</TextBlock>
</DockPanel>
+
+ <DockPanel Margin="0 20 0 0" ToolTip="Determines whether this machine supports BTSR">
+ <ToggleButton IsChecked="{Binding EditingComposition.Machine.BtsrInstalled}" />
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">BTSR Installed</TextBlock>
+ </DockPanel>
</StackPanel>
</GroupBox>
</StackPanel>
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>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml
index 9bd8f6f0a..3762ca1c7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingView.xaml
@@ -72,6 +72,16 @@
<Run FontWeight="Bold">continue</Run>
</TextBlock>
<touch:TouchComboBox Margin="0 40 0 0" Width="500" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRml}" DisplayMemberPath="Name" Title="Select thread type"></touch:TouchComboBox>
+
+ <StackPanel Margin="100 10 0 10" HorizontalAlignment="Left" Visibility="{Binding BtsrInstalled,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <DockPanel>
+ <touch:TouchIcon Icon="InformationOutline" Width="12" />
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSize}">
+ <Run>Please set the tensioner level to </Run>
+ <Run Text="{Binding BtsrSpoolTension}" FontWeight="Bold"></Run>
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
</StackPanel>
<Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs
index bb503e718..c250c561b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/ThreadLoadingViewVM.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -57,7 +58,7 @@ namespace Tango.PPC.UI.Dialogs
public Rml SelectedRml
{
get { return _selectedRml; }
- set { _selectedRml = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ set { _selectedRml = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); SetBTSRSpoolTension(); }
}
private ThreadLoadingStage _stage;
@@ -81,6 +82,20 @@ namespace Tango.PPC.UI.Dialogs
set { _error = value; RaisePropertyChangedAuto(); }
}
+ private int _btsrSpoolTension;
+ public int BtsrSpoolTension
+ {
+ get { return _btsrSpoolTension; }
+ set { _btsrSpoolTension = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _btsrInstalled;
+ public bool BtsrInstalled
+ {
+ get { return _btsrInstalled; }
+ set { _btsrInstalled = value; RaisePropertyChangedAuto(); }
+ }
+
public RelayCommand ContinueCommand { get; set; }
public RelayCommand AbortCommand { get; set; }
@@ -95,6 +110,7 @@ namespace Tango.PPC.UI.Dialogs
MachineProvider.MachineDisconnected += MachineProvider_MachineDisconnected;
IsArcHead = MachineProvider.Machine.MachineHeadType == BL.Enumerations.HeadTypes.Arc;
+ BtsrInstalled = MachineProvider.Machine.BtsrInstalled;
ContinueCommand = new RelayCommand(Continue, CanContinue);
AbortCommand = new RelayCommand(Abort);
@@ -251,7 +267,7 @@ namespace Tango.PPC.UI.Dialogs
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- rmls = await new RmlsCollectionBuilder(db).SetAll().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).WithActiveParametersGroup().BuildListAsync();
+ rmls = await new RmlsCollectionBuilder(db).SetAll().WithSpools().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).WithActiveParametersGroup().BuildListAsync();
}
var selectedRml = rmls.SingleOrDefault(x => x.Guid == _settings.LoadedRmlGuid);
@@ -260,6 +276,20 @@ namespace Tango.PPC.UI.Dialogs
SelectedRml = selectedRml != null ? selectedRml : rmls.FirstOrDefault();
}
+ private async void SetBTSRSpoolTension()
+ {
+ if (BtsrInstalled)
+ {
+ if (SelectedRml != null)
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ BtsrSpoolTension = await SelectedRml.GetRequiredBtsrSpoolTension(db);
+ }
+ }
+ }
+ }
+
protected override void Cancel()
{
CleanUp();
diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs
index 630f43495..5ea223a73 100644
--- a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs
+++ b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs
@@ -59,7 +59,7 @@ namespace Tango.BL.Builders
{
return AddQueryStep(4, (query) =>
{
- return query.Include(x => x.RmlsSpools);
+ return query.Include(x => x.RmlsSpools).Include(x => x.RmlsSpools.Select(y => y.SpoolType));
});
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
index 679226fd2..58b6749cf 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
+using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -121,7 +122,7 @@ namespace Tango.BL.Entities
{
return Task.Factory.StartNew<Rml>(() =>
{
- Rml rml = Rml.FromJson(json,new EntitySerializationStrategy(),EntitySerializationFlags.Indented);
+ Rml rml = Rml.FromJson(json, new EntitySerializationStrategy(), EntitySerializationFlags.Indented);
if (context.Rmls.Any(x => x.Guid == rml.Guid || x.Name == rml.Name))
{
@@ -142,5 +143,28 @@ namespace Tango.BL.Entities
return rml;
});
}
+
+ public async Task<int> GetRequiredBtsrSpoolTension(ObservablesContext db, SpoolType jobSpoolType = null)
+ {
+ int tension = 0;
+
+ var spoolTypes = await db.SpoolTypes.ToListAsync();
+ var spoolType = spoolTypes.FirstOrDefault(x => x.Type == SpoolTypes.StandardSpool);
+
+ if (jobSpoolType != null)
+ {
+ spoolType = jobSpoolType;
+ }
+
+ tension = spoolType != null ? spoolType.BtsrSpoolTension : 0;
+
+ var rml_spool = RmlsSpools.FirstOrDefault(x => x.SpoolType.Type == spoolType.Type);
+ if (rml_spool != null && rml_spool.BtsrSpoolTension.HasValue)
+ {
+ tension = rml_spool.BtsrSpoolTension.Value;
+ }
+
+ return tension;
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
index 75f9c785e..25b945049 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
@@ -1,8 +1,11 @@
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
@@ -15,5 +18,12 @@ namespace Tango.BL.Entities
{
}
+
+ [NotMapped]
+ [JsonIgnore]
+ public SpoolTypes Type
+ {
+ get { return (SpoolTypes)Code; }
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml
index 9dcc4a159..7b477f6bb 100644
--- a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml
+++ b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml
Binary files differ
diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml
index 03e41b4fb..fde5211de 100644
--- a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml
+++ b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml
Binary files differ