diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-25 11:35:18 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-25 11:35:18 +0200 |
| commit | 5c8596be64deacfbe282c03ba21cec66ed4e2494 (patch) | |
| tree | a8d3632748b8a56859936810e170883f92e4fbc0 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | c3b9b401883c2ef45accfa2d26c7ff6276691c34 (diff) | |
| parent | fdb539e472eaaaff74a05aa661e471543ae07313 (diff) | |
| download | Tango-5c8596be64deacfbe282c03ba21cec66ed4e2494.tar.gz Tango-5c8596be64deacfbe282c03ba21cec66ed4e2494.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
4 files changed, 35 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index bf8eddd91..70422a8ca 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -680,7 +680,7 @@ </StackPanel> </Border> - <Border Style="{StaticResource JobFieldBorder}"> + <Border Style="{StaticResource JobFieldBorder}" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <StackPanel Margin="20 5 5 5" Width="140"> <StackPanel Orientation="Horizontal"> <Image Source="../Images/repeat.png" Width="32"></Image> @@ -792,7 +792,7 @@ </StackPanel> - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 180 0"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 180 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" /> <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>MEDIA LIQUIDS</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock> <materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" /> @@ -898,7 +898,7 @@ </DockPanel> </Grid> <Grid Margin="0 10 10 0"> - <controls:MultiSelectListBox x:Name="listStops" AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> + <controls:MultiSelectListBox x:Name="listStops" ScrollViewer.HorizontalScrollBarVisibility="Disabled" AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> <ListBox.Template> <ControlTemplate TargetType="{x:Type ListBox}"> <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" @@ -1404,7 +1404,7 @@ <Grid Background="{StaticResource TransparentBackgroundBrush100}"> <Grid.Style> <Style TargetType="Grid"> - <Setter Property="Width" Value="640"></Setter> + <Setter Property="Width" Value="740"></Setter> <Setter Property="LayoutTransform"> <Setter.Value> <ScaleTransform ScaleY="1" ScaleX="0"></ScaleTransform> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml index 499d6dc89..954ac5f0e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml @@ -6,6 +6,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" @@ -13,6 +14,11 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + <UserControl.Resources> + <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter"/> + </UserControl.Resources> + <Grid Margin="20"> <DockPanel> <Grid DockPanel.Dock="Bottom"> @@ -44,6 +50,9 @@ <TextBlock FontWeight="SemiBold">Name</TextBlock> <TextBox Text="{Binding ActiveMachine.Name}"></TextBox> + <TextBlock FontWeight="SemiBold">Head Type</TextBlock> + <ComboBox ItemsSource="{Binding Source={x:Type enumerations:HeadTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveMachine.MachineHeadType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + <TextBlock FontWeight="SemiBold">Machine Version</TextBlock> <ComboBox Background="Transparent" ItemsSource="{Binding ActiveMachineAdapter.MachineVersions}" SelectedItem="{Binding ActiveMachine.MachineVersion}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index 5c55892ba..3b3a307ad 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -24,6 +24,7 @@ using Tango.Core.ExtensionMethods; using Tango.MachineStudio.Common.Authentication; using Tango.BL.ActionLogs; using Tango.BL.DTO; +using Tango.BL.Enumerations; namespace Tango.MachineStudio.RML.ViewModels { @@ -410,6 +411,8 @@ namespace Tango.MachineStudio.RML.ViewModels Rml rml = new Rml(); rml.Name = name; + rml.DisplayName = name; + rml.QualificationDate = DateTime.UtcNow; rml.Manufacturer = "Twine"; rml.Code = Rmls.Max(x => x.Code) + 1; rml.MediaMaterial = Materials.FirstOrDefault(); @@ -501,6 +504,9 @@ namespace Tango.MachineStudio.RML.ViewModels cloned.Guid = Guid.NewGuid().ToString(); cloned.ID = 0; cloned.Name = name; + cloned.DisplayName = name; + cloned.RmlQualificationLevel = RmlQualifications.Provisional; + cloned.QualificationDate = DateTime.UtcNow; ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); group.Name = rml.GetActiveProcessGroup().Name; @@ -674,6 +680,11 @@ namespace Tango.MachineStudio.RML.ViewModels ActiveRML.LastUpdated = DateTime.UtcNow; + if (_rmlBeforeSave.QualificationLevel != ActiveRML.QualificationLevel) + { + ActiveRML.QualificationDate = DateTime.UtcNow; + } + if (SelectedCCT != null) { if (SelectedCCT.IsNew) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index e34854046..2c8d538d0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:global="clr-namespace:Tango.MachineStudio.RML" + xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" @@ -19,6 +20,7 @@ <UserControl.Resources> <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter> + <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter"/> </UserControl.Resources> <Grid Margin="20"> @@ -58,6 +60,15 @@ <TextBlock Text="Name:" ></TextBlock> <TextBox Text="{Binding ActiveRML.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBlock Text="Display Name:" ></TextBlock> + <TextBox Text="{Binding ActiveRML.DisplayName,UpdateSourceTrigger=PropertyChanged}"></TextBox> + + <TextBlock Text="Head Type:" ></TextBlock> + <ComboBox ItemsSource="{Binding Source={x:Type enumerations:HeadTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlHeadType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + + <TextBlock Text="Qualification Level:" ></TextBlock> + <ComboBox ItemsSource="{Binding Source={x:Type enumerations:RmlQualifications},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlQualificationLevel}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + <TextBlock Text="Manufacturer:" ></TextBlock> <TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox> |
