diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-02-15 15:29:13 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-02-15 15:29:13 +0200 |
| commit | 8a4a7818428d7b203cb28082c720c74831b2165f (patch) | |
| tree | a36bc4d90eb0cf418dd69c00af73863edc63998e /Software/Visual_Studio/MachineStudio/Modules | |
| parent | 1ee675bdcc0d0234f452c58fddd4024bbb0c2d8e (diff) | |
| parent | a27ffb17e0ab28c994234346d2bc93e85da710d2 (diff) | |
| download | Tango-8a4a7818428d7b203cb28082c720c74831b2165f.tar.gz Tango-8a4a7818428d7b203cb28082c720c74831b2165f.zip | |
Merged Light Inks To software !
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
12 files changed, 69 insertions, 162 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4cc41e5a7..47a94a58d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -901,7 +901,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { try { - var output = _converter.Convert(stop, false); + var output = _converter.Convert(stop, false, true); output.ApplyOnBrushStopLiquidVolumes(stop, SelectedProcessParametersTable); stop.OutOfGamutChecked = true; } @@ -940,7 +940,7 @@ namespace Tango.MachineStudio.Developer.ViewModels _hiveOpened = true; try { - HiveSuggestions = _converter.Convert(SelectedBrushStop, true).CreateHiveSuggestions(); + HiveSuggestions = _converter.Convert(SelectedBrushStop, true, true).CreateHiveSuggestions(); } catch (Exception ex) { @@ -981,7 +981,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (!_color_changed_from_hive && _hiveOpened) { SelectedBrushStop.Corrected = false; - HiveSuggestions = _converter.Convert(SelectedBrushStop, true).CreateHiveSuggestions(); + HiveSuggestions = _converter.Convert(SelectedBrushStop, true, true).CreateHiveSuggestions(); } } 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 395809c6f..e6c138c17 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 @@ -793,7 +793,7 @@ </StackPanel> - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 180 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 40 250 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" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineCreationDialogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineCreationDialogVM.cs index 4584d3508..340f92edd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineCreationDialogVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineCreationDialogVM.cs @@ -10,9 +10,9 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { public class MachineCreationDialogVM : DialogViewVM { - public List<MachineVersion> MachineVersions { get; set; } + public List<MachinePrototype> Prototypes { get; set; } - public MachineVersion SelectedMachineVersion { get; set; } + public MachinePrototype SelectedPrototype { get; set; } private bool _isNewMachine; public bool IsNewMachine @@ -35,25 +35,6 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels set { _name = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } - private bool _generateDispensers; - public bool GenerateDispensers - { - get { return _generateDispensers; } - set { _generateDispensers = value; RaisePropertyChangedAuto(); } - } - - private double _dispenserFactor; - public double DispenserFactor - { - get { return _dispenserFactor; } - set { _dispenserFactor = value; RaisePropertyChangedAuto(); } - } - - public MachineCreationDialogVM() : base() - { - DispenserFactor = 2.34; - } - protected override bool CanOK() { return base.CanOK() && !String.IsNullOrWhiteSpace(SerialNumber) && !String.IsNullOrWhiteSpace(Name); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index e3547c568..6ddf86ddb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -263,7 +263,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels _machines_action_timer = new ActionTimer(TimeSpan.FromMilliseconds(200)); _dispensers_action_timer = new ActionTimer(TimeSpan.FromMilliseconds(200)); - AddIdsCommand = new RelayCommand(AddIds, (x) => ActiveMachine != null && ActiveMachine.Configuration != null && ActiveMachine.Configuration.IdsPacks.Count < 8); + AddIdsCommand = new RelayCommand(AddIds, (x) => ActiveMachine != null && ActiveMachine.Configuration != null && ActiveMachine.Configuration.IdsPacks.Count < 10); RemoveIdsCommand = new RelayCommand(RemoveIds, (x) => SelectedIds != null); EditMachineCommand = new RelayCommand(() => LoadSelectedMachine(), () => SelectedMachine != null); BackToMachinesCommand = new RelayCommand(() => View.NavigateTo(MachineDesignerNavigationView.MachinesView)); @@ -287,7 +287,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels public override async void OnApplicationReady() { MachinesAdapter.MachineVersions = (await MachinesAdapter.Context.MachineVersions.ToListAsync()).ToObservableCollection(); - + MachinesAdapter.MachinePrototypes = (await MachinesAdapter.Context.MachinePrototypes.ToListAsync()).ToObservableCollection(); } #endregion @@ -513,7 +513,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { IsNewMachine = true; - if (machineCreationDialogVM.SelectedMachineVersion == null) + if (machineCreationDialogVM.SelectedPrototype == null) { ActiveMachine = new Machine(); ActiveMachine.Configuration = new Configuration(); @@ -526,9 +526,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels try { initHwConfig = false; - ActiveMachine = await machineCreationDialogVM.SelectedMachineVersion.CreatePrototypeMachine(ActiveMachineAdapter.Context); - ActiveMachine.SerialNumber = machineCreationDialogVM.SerialNumber; - ActiveMachine.Name = machineCreationDialogVM.Name; + ActiveMachine = machineCreationDialogVM.SelectedPrototype.CreateMachine(machineCreationDialogVM.SerialNumber, machineCreationDialogVM.Name); + ActiveMachine.MachineVersion = ActiveMachineAdapter.MachineVersions.FirstOrDefault(x => x.Guid == ActiveMachine.MachineVersionGuid); ActiveMachineAdapter.Context.Machines.Add(ActiveMachine); HardwareConfigurationViewVM = new HardwareConfigurationViewVM(_notification); @@ -537,81 +536,13 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } catch (Exception ex) { - _notification.ShowError($"Invalid machine version prototype.\n{ex.FlattenMessage()}"); + _notification.ShowError($"Invalid machine prototype.\n{ex.FlattenMessage()}"); View.NavigateTo(MachineDesignerNavigationView.MachinesView); return; } } } - if ((newMachine || clone) && machineCreationDialogVM.GenerateDispensers) - { - for (int i = 0; i < 8; i++) - { - var serial = machineCreationDialogVM.SerialNumber + "-" + (i + 1); - - var existingDispenser = await ActiveMachineAdapter.Context.Dispensers.Include(x => x.IdsPacks).SingleOrDefaultAsync(x => x.SerialNumber == serial); - - if (existingDispenser != null) - { - if (existingDispenser.IsInstalled) - { - _notification.ShowError($"Dispenser '{serial}' already exists. Cannot create machine."); - return; - } - else - { - if (!_notification.ShowErrorQuestion($"Dispenser '{serial}' already exists and is not installed. Do you wish to assign the existing dispenser to this machine?")) - { - return; - } - } - } - - Dispenser dispenser = new Dispenser(); - - if (existingDispenser == null) - { - dispenser.SerialNumber = serial; - - if (newMachine) - { - dispenser.NlPerPulse = machineCreationDialogVM.DispenserFactor; - dispenser.DispenserTypeGuid = ActiveMachineAdapter.DispenserTypes.First().Guid; - } - else - { - var packBefore = machineConfigBeforeClone.NoneEmptyIdsPacks.SingleOrDefault(x => x.PackIndex == i); - - if (packBefore != null) - { - dispenser.NlPerPulse = packBefore.Dispenser.NlPerPulse; - dispenser.DispenserTypeGuid = packBefore.Dispenser.DispenserType.Guid; - } - else - { - continue; - } - } - - dispenser.ProductionDate = DateTime.UtcNow; - - ActiveMachineAdapter.Context.Dispensers.Add(dispenser); - } - else - { - dispenser = existingDispenser; - } - - var idsPack = ActiveMachine.Configuration.NoneEmptyIdsPacks.SingleOrDefault(x => x.PackIndex == i); - - if (idsPack != null) - { - idsPack.Dispenser = dispenser; - idsPack.DispenserGuid = dispenser.Guid; - } - } - } ActiveMachine.OrganizationChanged -= ActiveMachine_OrganizationChanged; ActiveMachine.OrganizationChanged += ActiveMachine_OrganizationChanged; @@ -864,7 +795,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { MachineCreationDialogVM vm = new MachineCreationDialogVM(); vm.IsNewMachine = true; - vm.MachineVersions = MachinesAdapter.MachineVersions.ToList(); + vm.Prototypes = MachinesAdapter.MachinePrototypes.ToList(); _notification.ShowModalDialog<MachineCreationDialogVM, Views.MachineCreationDialog>(vm, (x) => { if (MachinesAdapter.Context.Machines.Any(y => y.SerialNumber == vm.SerialNumber || y.Name.ToLower() == vm.Name.ToLower())) @@ -873,12 +804,6 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels return; } - if (vm.SelectedMachineVersion != null && String.IsNullOrWhiteSpace(vm.SelectedMachineVersion.PrototypeMachineData)) - { - _notification.ShowError("The selected version does not contain any prototype machine data."); - return; - } - LoadSelectedMachine(true, false, vm); }, () => { }); } @@ -922,36 +847,32 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels private async void MakePrototype() { - if (ActiveMachine.MachineVersion == null) - { - _notification.ShowError("Machine version must be selected in order to make a prototype."); - return; - } + String protoName = _notification.ShowTextInput("Enter prototype name", "name"); + + if (!protoName.IsNotNullOrWhiteSpace()) return; - if (_notification.ShowQuestion($"Are you sure you wish to make this machine configuration as a prototype for version '{ActiveMachine.MachineVersion.Name}' ?")) + using (_notification.PushTaskItem($"Saving machine prototype '{protoName}'...")) { - using (_notification.PushTaskItem($"Making prototype machine for '{ActiveMachine.MachineVersion.Name}'...")) + try { - try - { - IsFree = false; + IsFree = false; - using (var db = ObservablesContext.CreateDefault()) - { - var machineVersion = await db.MachineVersions.SingleOrDefaultAsync(x => x.Guid == ActiveMachine.MachineVersionGuid); - await machineVersion.ApplyPrototypeMachine(ActiveMachine, db); - await db.SaveChangesAsync(); - } - } - catch (Exception ex) + using (var db = ObservablesContext.CreateDefault()) { - _notification.ShowError($"Error making machine version prototype\n{ex.FlattenMessage()}"); - } - finally - { - IsFree = true; + MachinePrototype prototype = MachinePrototype.CreateNew(ActiveMachine, protoName, protoName); + db.MachinePrototypes.Add(prototype); + await db.SaveChangesAsync(); + MachinesAdapter.MachinePrototypes = (await MachinesAdapter.Context.MachinePrototypes.ToListAsync()).ToObservableCollection(); } } + catch (Exception ex) + { + _notification.ShowError($"Error creating machine prototype\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } } } @@ -961,7 +882,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { MachineCreationDialogVM vm = new MachineCreationDialogVM(); vm.IsNewMachine = false; - vm.MachineVersions = MachinesAdapter.MachineVersions.ToList(); + vm.Prototypes = MachinesAdapter.MachinePrototypes.ToList(); _notification.ShowModalDialog<MachineCreationDialogVM, Views.MachineCreationDialog>(vm, (x) => { if (MachinesAdapter.Context.Machines.Any(y => y.SerialNumber == vm.SerialNumber || y.Name.ToLower() == vm.Name.ToLower())) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml index b13ffb87b..03043d04e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml @@ -134,7 +134,7 @@ <materialDesign:PackIcon Kind="Minus" Width="24" Height="24"></materialDesign:PackIcon> </Button> - <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="8" TextElement.FontSize="9"> + <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="10" TextElement.FontSize="9"> <TextBlock HorizontalAlignment="Center">1</TextBlock> <TextBlock HorizontalAlignment="Center">2</TextBlock> <TextBlock HorizontalAlignment="Center">3</TextBlock> @@ -143,6 +143,8 @@ <TextBlock HorizontalAlignment="Center">6</TextBlock> <TextBlock HorizontalAlignment="Center">7</TextBlock> <TextBlock HorizontalAlignment="Center">8</TextBlock> + <TextBlock HorizontalAlignment="Center">9</TextBlock> + <TextBlock HorizontalAlignment="Center">10</TextBlock> </UniformGrid> <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> <ListBox ItemsSource="{Binding ActiveMachine.Configuration.IdsPacks}" SelectedItem="{Binding SelectedIds}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> @@ -155,7 +157,7 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="8"></UniformGrid> + <UniformGrid Columns="10"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> @@ -439,6 +441,7 @@ <Image IsHitTestVisible="False" Width="24" Height="24" Source="../Images/injection.png" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant"></Image> <StackPanel Margin="5 0 0 0" IsHitTestVisible="False"> <TextBlock IsHitTestVisible="False" FontSize="10" Foreground="DimGray"><Run Text="{Binding SerialNumber}"></Run></TextBlock> + <TextBlock IsHitTestVisible="False" FontSize="9" Margin="0 2 0 0" Foreground="Gray"><Run Text="{Binding DispenserType.Name}"></Run></TextBlock> </StackPanel> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml index 0640b846e..f69606e29 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineCreationDialog.xaml @@ -52,28 +52,16 @@ <Grid> <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20 20 0 0" Width="400"> <TextBlock TextWrapping="Wrap" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}"> - <Run>Please specify the machine version in order to prototype the new machine with default machine settings and configuration.</Run> + <Run>Specify a machine prototype to create the new machine with default settings and configuration.</Run> </TextBlock> - <ComboBox Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}" ItemsSource="{Binding MachineVersions}" SelectedItem="{Binding SelectedMachineVersion}" DisplayMemberPath="Name" Margin="0 10 0 0" FontSize="16" materialDesign:HintAssist.Hint="NONE"></ComboBox> + <ComboBox Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}" ItemsSource="{Binding Prototypes}" SelectedItem="{Binding SelectedPrototype}" DisplayMemberPath="Name" Margin="0 10 0 0" FontSize="16" materialDesign:HintAssist.Hint="NONE"></ComboBox> <TextBlock Margin="0 20 0 0" FontSize="10">Serial Number</TextBlock> <TextBox Margin="0 2 0 0" Text="{Binding SerialNumber,UpdateSourceTrigger=PropertyChanged}"></TextBox> <TextBlock Margin="0 20 0 0" FontSize="10">Name</TextBlock> <TextBox Margin="0 2 0 0" Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> - - <CheckBox Margin="0 30 0 0" IsChecked="{Binding GenerateDispensers}"> - <TextBlock> - <Run>Automatically generate 8 dispensers for this machine</Run> - <Run>(</Run><Run Foreground="{StaticResource GrayBrush}" FontSize="10" Text="{Binding SerialNumber}"></Run><Run Foreground="{StaticResource GrayBrush}" FontSize="10">-1-8</Run><Run>)</Run> - </TextBlock> - </CheckBox> - - <StackPanel Margin="20 10 0 0" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}"> - <TextBlock FontSize="10">Dispenser max nl/cm</TextBlock> - <mahapps:NumericUpDown Minimum="0" StringFormat="0.00" Maximum="10" InterceptMouseWheel="True" Value="{Binding DispenserFactor,Mode=TwoWay}" HorizontalContentAlignment="Left" Width="95" HorizontalAlignment="Left" BorderThickness="0 0 0 1" Margin="0 2 0 0" HideUpDownButtons="True" HasDecimals="True" Background="Transparent"></mahapps:NumericUpDown> - </StackPanel> </StackPanel> </Grid> </DockPanel> 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 76517ec37..9b50de49c 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 @@ -109,8 +109,8 @@ <TextBlock FontWeight="SemiBold">Force Version Update</TextBlock> <ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.ForceVersionUpdate}"></ToggleButton> - <TextBlock FontWeight="SemiBold">Update Schema on Update</TextBlock> - <ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.PerformSchemaUpdateOnDataUpdate}"></ToggleButton> + <TextBlock FontWeight="SemiBold">Light Inks Installed</TextBlock> + <ToggleButton HorizontalAlignment="Left" IsChecked="{Binding ActiveMachine.LightInksInstalled}"></ToggleButton> </controls:TableGrid> </Grid> </Border> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml index f72344905..54e47c0d4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml @@ -69,7 +69,7 @@ <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> </Grid> - <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="8" TextElement.FontSize="9"> + <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="10" TextElement.FontSize="9"> <TextBlock HorizontalAlignment="Center">1</TextBlock> <TextBlock HorizontalAlignment="Center">2</TextBlock> <TextBlock HorizontalAlignment="Center">3</TextBlock> @@ -78,6 +78,8 @@ <TextBlock HorizontalAlignment="Center">6</TextBlock> <TextBlock HorizontalAlignment="Center">7</TextBlock> <TextBlock HorizontalAlignment="Center">8</TextBlock> + <TextBlock HorizontalAlignment="Center">9</TextBlock> + <TextBlock HorizontalAlignment="Center">10</TextBlock> </UniformGrid> <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> @@ -91,7 +93,7 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="8"></UniformGrid> + <UniformGrid Columns="10"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs index bed43d44b..af5ed51db 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs @@ -217,6 +217,9 @@ namespace Tango.MachineStudio.RML.ViewModels input.ThreadA = RML.WhitePointA; input.ThreadB = RML.WhitePointB; + input.UseLightInks = RML.UseLightInks; + input.VMax = RML.VMax; + //Validate calibration data foreach (var vm in LiquidsCalibrationData.Where(x => x.LiquidType.HasPigment)) { @@ -350,6 +353,9 @@ namespace Tango.MachineStudio.RML.ViewModels input.ThreadA = RML.WhitePointA; input.ThreadB = RML.WhitePointB; + input.UseLightInks = RML.UseLightInks; + input.VMax = RML.VMax; + foreach (var vm in LiquidsCalibrationData.Where(x => x.LiquidType.HasPigment)) { InputLiquid inputLiquid = new InputLiquid(); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml index 912ec3b0a..73f5208db 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml @@ -128,7 +128,7 @@ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock> <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock> - <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> + <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}"> <hive:HexList.ItemContainerStyle> @@ -175,7 +175,7 @@ </TextBlock.Style> </TextBlock> - <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> + <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image> <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False"> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0"> 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 b6c91f066..62b6dc335 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 @@ -168,7 +168,7 @@ <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> - <ColumnDefinition Width="260"></ColumnDefinition> + <ColumnDefinition Width="250"></ColumnDefinition> </Grid.ColumnDefinitions> <DockPanel> <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="7" CornerRadius="5"> @@ -187,7 +187,7 @@ <DropShadowEffect Opacity="0.4" /> </Border.Effect> <Grid> - <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CCT</TextBlock> + <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">Engine</TextBlock> </Grid> </Border> <Grid DockPanel.Dock="Top" Background="#35B5B5B5" Margin="20 0"> @@ -198,7 +198,7 @@ <StackPanel VerticalAlignment="Center" Width="200" Margin="5 20 5 10"> <ComboBox materialDesign:HintAssist.Hint="No CCT Defined" Margin="0 5 0 0" HorizontalContentAlignment="Center" ItemsSource="{Binding CCTS}" SelectedItem="{Binding SelectedCCT}" DisplayMemberPath="FileName" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox> - <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Right"> + <UniformGrid Columns="2" Margin="0 5 0 0" HorizontalAlignment="Center"> <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Command="{Binding ImportForwardDataCommand}"> <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> <materialDesign:PackIcon Kind="Upload" VerticalAlignment="Center" /> @@ -216,7 +216,13 @@ <TextBlock Margin="0 40 0 0" Text="Color Conversion Version:" HorizontalAlignment="Center"></TextBlock> <mahapps:NumericUpDown Minimum="1" Maximum="4" Value="{Binding ActiveRML.ColorConversionVersion}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="{StaticResource DimGrayBrush}" HasDecimals="False" Margin="0 5 0 0" /> - <CheckBox ToolTip="Use the color conversion engine to generate gradients" IsChecked="{Binding ActiveRML.UseColorLibGradients}" HorizontalAlignment="Center" Margin="0 40 0 0">Enable Gradient Generation</CheckBox> + <CheckBox ToolTip="Use the color conversion engine to generate gradients" IsChecked="{Binding ActiveRML.UseColorLibGradients}" HorizontalAlignment="Left" Margin="0 20 0 0">Enable Gradient Generation</CheckBox> + <CheckBox ToolTip="Use light inks when converting colors to liquid volumes" IsChecked="{Binding ActiveRML.UseLightInks}" HorizontalAlignment="Left" Margin="0 10 0 0">Use Light Inks</CheckBox> + + <DockPanel Margin="0 10 0 0"> + <TextBlock VerticalAlignment="Center" Text="V-Max:" ></TextBlock> + <mahapps:NumericUpDown Minimum="1" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" HorizontalAlignment="Right" Width="100" Value="{Binding ActiveRML.VMax,Mode=TwoWay}"></mahapps:NumericUpDown> + </DockPanel> </StackPanel> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index b1a1f4aa5..fd05ee28e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -84,10 +84,12 @@ <Setter Property="BorderThickness" Value="0"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + <Setter Property="Padding" Value="4"></Setter> + <Setter Property="Margin" Value="0 5 0 0"></Setter> </Style> </DataGrid.CellStyle> <DataGrid.Columns> - <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="140" /> + <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="140"/> <DataGridTextColumn Header="MANUFACTURER" Binding="{Binding Manufacturer}" Width="Auto" /> <DataGridTextColumn Header="MATERIAL" Binding="{Binding MediaMaterial.Name}" Width="Auto" /> <DataGridTextColumn Header="PURPOSE" Binding="{Binding MediaPurpose.Name}" Width="Auto" /> @@ -97,7 +99,7 @@ <DataGridTemplateColumn Header="LIQUID FACTORS" Width="1*"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0"> + <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" Margin="0 -5 0 0"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" IsItemsHost="True"></StackPanel> @@ -105,7 +107,7 @@ </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type observables:LiquidTypesRml}"> - <Grid Width="47" Height="40" Margin="10 -10 0 0"> + <Grid Width="35" Height="32" Margin="10 0 0 0"> <shapes:Hexagon StrokeThickness="1" Stroke="Gray"> <shapes:Hexagon.Fill> <LinearGradientBrush Opacity="0.7" > @@ -114,8 +116,6 @@ </LinearGradientBrush> </shapes:Hexagon.Fill> </shapes:Hexagon> - - <TextBlock FontSize="8" Width="40" TextTrimming="CharacterEllipsis" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent" Foreground="{StaticResource Hexagon.ForegroundBrush}" Text="{Binding LiquidType.Name}" FontStyle="Italic"></TextBlock> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> |
