diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-28 04:00:29 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-28 04:00:29 +0200 |
| commit | 29241b674e6e747ce64e521446e87596eb66dedd (patch) | |
| tree | 5169b73b62cff50146ca3f110818787b48bcd387 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs | |
| parent | 1cb99b7e98491a9064eb4c87b89991b5301528c1 (diff) | |
| download | Tango-29241b674e6e747ce64e521446e87596eb66dedd.tar.gz Tango-29241b674e6e747ce64e521446e87596eb66dedd.zip | |
Implemented lubrication level control per RML for PPC user.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 28 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 36 |
2 files changed, 53 insertions, 11 deletions
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 cfac759dd..6f7717a90 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 @@ -38,6 +38,7 @@ using System.IO; using Tango.ColorConversion; using Tango.Integration.Operation; using Tango.BL.Enumerations; +using Tango.PPC.Common.Lubrication; namespace Tango.PPC.Jobs.ViewModels { @@ -201,6 +202,13 @@ namespace Tango.PPC.Jobs.ViewModels set { _availableCatalogs = value; RaisePropertyChangedAuto(); } } + private RmlLubricationLevel _lubricationLevel; + public RmlLubricationLevel LubricationLevel + { + get { return _lubricationLevel; } + set { _lubricationLevel = value; RaisePropertyChangedAuto(); } + } + #endregion #region Commands @@ -453,6 +461,8 @@ namespace Tango.PPC.Jobs.ViewModels Job.ValidateOnPropertyChanged = true; + GetLubricationLevel(); + LogManager.Log("Loading RMLS..."); Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().WithSpools().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).ToList(); LogManager.Log("Loading Color Spaces..."); @@ -673,6 +683,8 @@ namespace Tango.PPC.Jobs.ViewModels // stop.ColorCatalog = replacement; //} + GetLubricationLevel(); + ResetFineTuning(); } @@ -1346,6 +1358,22 @@ namespace Tango.PPC.Jobs.ViewModels #endregion + #region Lubrication Level + + private void GetLubricationLevel() + { + if (Job != null) + { + LubricationLevel = Settings.LubricationLevels.FirstOrDefault(x => x.RmlGuid == Job.RmlGuid); + } + else + { + LubricationLevel = null; + } + } + + #endregion + #region Export Embroidery private async void ExportEmbroidery() 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 c1472793a..029ba7145 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 @@ -489,22 +489,36 @@ </touch:TouchExpander.Header> <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium"> - <controls:TableGrid RowHeight="50"> + <StackPanel> - <TextBlock>Job name:</TextBlock> - <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" /> + <DockPanel> + <TextBlock Width="100" Margin="0 0 0 5" VerticalAlignment="Bottom">Job name:</TextBlock> + <touch:TouchTextBox Margin="10 0 0 0" Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" /> + </DockPanel> - <TextBlock>Customer:</TextBlock> - <touch:TouchAutoComplete ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" /> + <DockPanel Margin="0 15 0 0"> + <TextBlock Width="100" Margin="0 0 0 5" VerticalAlignment="Bottom">Customer:</TextBlock> + <touch:TouchAutoComplete Margin="10 0 0 0" ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" /> + </DockPanel> - <TextBlock>Thread type:</TextBlock> - <touch:TouchComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" /> + <DockPanel Margin="0 15 0 0"> + <TextBlock Width="100" VerticalAlignment="Bottom" Margin="0 0 0 3">Thread type:</TextBlock> + <touch:TouchComboBox Margin="10 0 0 0" ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" /> + </DockPanel> - <TextBlock>Comment:</TextBlock> - <touch:TouchMultiLineTextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" Height="60" keyboard:KeyboardView.Container="{Binding ElementName=Container}"> + <DockPanel Margin="110 5 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" Visibility="{Binding LubricationLevel,Converter={StaticResource IsNullToVisibilityConverter}}"> + <touch:TouchIcon Icon="AlertCircleOutline" Width="16" Foreground="{StaticResource TangoGrayTextBrush}" /> + <TextBlock Margin="5 0 0 0"> + <Run Text="{Binding LubricationLevel.LubricationLevel,Mode=OneWay,Converter={StaticResource EnumToDescriptionConverter}}"></Run> + <Run>Lubrication</Run> + </TextBlock> + </DockPanel> - </touch:TouchMultiLineTextBox> - </controls:TableGrid> + <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> + </StackPanel> + </StackPanel> <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}"> <Grid.ColumnDefinitions> |
