diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-09-10 07:15:23 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-09-10 07:15:23 +0300 |
| commit | 28a79338c4c250d9d6f3722a1c15c239fff56a29 (patch) | |
| tree | f92897e7fa27e0dbdaa1190b6812b1731d9363f2 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | 2718ce44b9dd90ab1e222cba82c0cbe6cac174f0 (diff) | |
| download | Tango-28a79338c4c250d9d6f3722a1c15c239fff56a29.tar.gz Tango-28a79338c4c250d9d6f3722a1c15c239fff56a29.zip | |
Major advancement on Violet predictions.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
5 files changed, 21 insertions, 47 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 4fd1a834b..a32fa58df 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 @@ -2336,10 +2336,9 @@ namespace Tango.MachineStudio.Developer.ViewModels newJob.Machine = SelectedMachine; - SelectedMachine.Jobs.Add(newJob); var segment = newJob.AddSolidSegment(); - segment.BrushStops[0].SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); + segment.BrushStops[0].SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8, SelectedMachine.Configuration); LogManager.Log("Saving selected machine to database..."); await SelectedMachine.SaveAsync(_machineDbContext); @@ -2407,7 +2406,7 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.Segment = SelectedSegment; stop.ColorSpace = ColorSpaces.FirstOrDefault(); stop.Color = Colors.Black; - stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); + stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8, SelectedMachine.Configuration); stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); SelectedSegment.BrushStops.Add(stop); // _activeJobDbContext.BrushStops.Add(stop); 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 cad54c848..ddc0d91a3 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 @@ -36,6 +36,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { public class MainViewVM : StudioViewModel<IMainView> { + private const int MAX_IDS_PACKS = 12; private INotificationProvider _notification; private IActionLogManager _actionLogManager; private IAuthenticationProvider _authentication; @@ -283,7 +284,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 < 10); + AddIdsCommand = new RelayCommand(AddIds, (x) => ActiveMachine != null && ActiveMachine.Configuration != null && ActiveMachine.Configuration.IdsPacks.Count < MAX_IDS_PACKS); RemoveIdsCommand = new RelayCommand(RemoveIds, (x) => SelectedIds != null); EditMachineCommand = new RelayCommand(() => LoadSelectedMachine(), () => SelectedMachine != null); BackToMachinesCommand = new RelayCommand(() => View.NavigateTo(MachineDesignerNavigationView.MachinesView)); 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 d1eaaaeff..9b99c9ec5 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 @@ -139,18 +139,6 @@ <materialDesign:PackIcon Kind="Minus" Width="24" Height="24"></materialDesign:PackIcon> </Button> - <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> - <TextBlock HorizontalAlignment="Center">4</TextBlock> - <TextBlock HorizontalAlignment="Center">5</TextBlock> - <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"> <ListBox.ItemContainerStyle> @@ -162,13 +150,14 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="10"></UniformGrid> + <UniformGrid Rows="1"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <Grid dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Drop="OnDropOnIdsPack"> + <Grid MaxWidth="35" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Drop="OnDropOnIdsPack"> <Grid.RowDefinitions> + <RowDefinition Height="11"/> <RowDefinition Height="1*"/> <RowDefinition Height="30"/> </Grid.RowDefinitions> @@ -179,7 +168,7 @@ </Style.Triggers> </Style> </Grid.Style> - <UniformGrid Columns="1" Rows="2"> + <UniformGrid Grid.Row="1" Columns="1" Rows="2"> <Grid Margin="2"> <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> <Image.Style> @@ -231,7 +220,7 @@ </Grid> </UniformGrid> - <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid Grid.Row="2" Margin="3" IsHitTestVisible="False"> <Grid.Style> <Style TargetType="Grid"> <Style.Triggers> @@ -258,6 +247,8 @@ </Border.Background> </Border> </Grid> + + <TextBlock Grid.Row="0" FontSize="9" HorizontalAlignment="Center" VerticalAlignment="Top" Text="{Binding PackIndex}"></TextBlock> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> 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 54e47c0d4..ea2e2e84d 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,19 +69,6 @@ <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="10" TextElement.FontSize="9"> - <TextBlock HorizontalAlignment="Center">1</TextBlock> - <TextBlock HorizontalAlignment="Center">2</TextBlock> - <TextBlock HorizontalAlignment="Center">3</TextBlock> - <TextBlock HorizontalAlignment="Center">4</TextBlock> - <TextBlock HorizontalAlignment="Center">5</TextBlock> - <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 Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemContainerStyle> @@ -93,24 +80,18 @@ </ListBox.ItemContainerStyle> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid Columns="10"></UniformGrid> + <UniformGrid Rows="1"></UniformGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <Grid dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" > + <Grid MaxWidth="35"> <Grid.RowDefinitions> + <RowDefinition Height="11"/> <RowDefinition Height="1*"/> <RowDefinition Height="30"/> </Grid.RowDefinitions> - <Grid.Style> - <Style TargetType="Grid" BasedOn="{StaticResource draggableGrid}"> - <Style.Triggers> - - </Style.Triggers> - </Style> - </Grid.Style> - <UniformGrid Columns="1" Rows="2"> + <UniformGrid Grid.Row="1" Columns="1" Rows="2"> <Grid Margin="2"> <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> <Image.Style> @@ -156,7 +137,7 @@ </Grid> </UniformGrid> - <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid Grid.Row="2" Margin="3" IsHitTestVisible="False"> <Grid.Style> <Style TargetType="Grid"> <Style.Triggers> @@ -183,6 +164,8 @@ </Border.Background> </Border> </Grid> + + <TextBlock Grid.Row="0" FontSize="9" HorizontalAlignment="Center" VerticalAlignment="Top" Text="{Binding PackIndex}"></TextBlock> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> @@ -199,7 +182,7 @@ </Style.Triggers> </Style> </Grid.Style> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="Gainsboro">NO IDS PACKS</TextBlock> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="{StaticResource BorderBrushGainsboro}">NO IDS PACKS</TextBlock> </Grid> <Rectangle VerticalAlignment="Bottom" Stroke="DimGray" StrokeThickness="1"> 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 73f5208db..c3816e93f 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="100" 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="70" 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="100" 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="70" 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"> |
