diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
7 files changed, 164 insertions, 317 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/JobToColumnDefinitionsConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/JobToColumnDefinitionsConverter.cs index 0aadeca68..2ce5886c6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/JobToColumnDefinitionsConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/JobToColumnDefinitionsConverter.cs @@ -21,7 +21,7 @@ namespace Tango.MachineStudio.Developer.Converters double totalLength = job.Segments.Sum(x => x.Length); - foreach (var segment in job.Segments) + foreach (var segment in job.OrderedSegments) { columns.Add(new ColumnDefinition() { Width = new GridLength(segment.Length / totalLength, GridUnitType.Star) }); } 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 b75a84a6c..8b0a89336 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 @@ -1482,7 +1482,14 @@ namespace Tango.MachineStudio.Developer.ViewModels { LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); - _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().WithMediaProperties().Build(); + if (_selectedRML != ActiveJob.Rml) + { + _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().Build(); + } + else + { + _selectedRML = ActiveJob.Rml; + } if (_selectedRML.Ccts.Count == 0) { @@ -1688,6 +1695,9 @@ namespace Tango.MachineStudio.Developer.ViewModels WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); + LogManager.Log("Loading machine spools..."); + _activeJobDbContext.Spools.Where(x => x.MachineGuid == SelectedMachine.Guid).Load(); + LogManager.Log("Setting active job..."); ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML().Build(); @@ -1708,7 +1718,7 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log("Setting selected segment..."); - _selectedSegment = ActiveJob.Segments.FirstOrDefault(); + _selectedSegment = ActiveJob.OrderedSegments.FirstOrDefault(); ActiveJob.LengthChanged -= ActiveJob_LengthChanged; ActiveJob.LengthChanged += ActiveJob_LengthChanged; @@ -1838,6 +1848,11 @@ namespace Tango.MachineStudio.Developer.ViewModels { await _machineDbContext.Jobs.Where(x => x.MachineGuid == SelectedMachine.Guid).Include(x => x.User).Include(x => x.User.Contact).LoadAsync(); + foreach (var job in SelectedMachine.Jobs) + { + await job.Reload(_machineDbContext); + } + await _machineDbContext.ColorSpaces.LoadAsync(); await Task.Factory.StartNew(() => @@ -2153,10 +2168,14 @@ namespace Tango.MachineStudio.Developer.ViewModels { LogManager.LogFormat("Duplicating {0} segments...", SelectedSegments.Count); + int start_index = SelectedSegments.Max(x => x.SegmentIndex); + + ActiveJob.Segments.Where(x => x.SegmentIndex > start_index).ToList().ForEach(x => x.SegmentIndex = x.SegmentIndex + SelectedSegments.Count); + foreach (var segment in SelectedSegments.OrderBy(x => x.SegmentIndex)) { var cloned = segment.Clone(); - cloned.SegmentIndex = ActiveJob.Segments.Max(x => x.SegmentIndex) + 1; + cloned.SegmentIndex = start_index++; ActiveJob.Segments.Add(cloned); SelectedSegment = cloned; } 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 b9c27e4f9..4fba0cc0b 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 @@ -740,7 +740,11 @@ <Image Source="../Images/ruler.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Segment Length</TextBlock> </StackPanel> - <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown x:Name="numSegmentLength" FontSize="{StaticResource NumbersFontSize}" HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Margin="0 2 0 0" Minimum="1" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedSegment.Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <mahapps:NumericUpDown.Resources> + <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> </StackPanel> </Border> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 8c58690fd..f3af53352 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -65,11 +65,11 @@ namespace Tango.MachineStudio.Developer.Views if (_vm != null && _vm.ActiveJob != null) { List<Segment> segments = new List<Segment>(); - foreach (var s in _vm.ActiveJob.Segments.OrderBy(x => x.SegmentIndex)) + foreach (var s in _vm.ActiveJob.OrderedSegments) { segments.Add(s); - if (_vm.ActiveJob.EnableInterSegment && _vm.ActiveJob.Segments.IndexOf(s) != _vm.ActiveJob.Segments.Count - 1) + if (_vm.ActiveJob.EnableInterSegment && _vm.ActiveJob.OrderedSegments.IndexOf(s) != _vm.ActiveJob.OrderedSegments.Count - 1) { segments.Add(new Segment() { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index 1cb8536e0..ab97d7858 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -196,7 +196,7 @@ </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="USER" Width="100" CanUserSort="True" SortMemberPath="User"> + <DataGridTemplateColumn Header="CREATED BY" Width="100" CanUserSort="True" SortMemberPath="User"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding User.Contact.FirstName}" VerticalAlignment="Center" FontSize="14"></TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 68cd65ad4..429450370 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -131,168 +131,6 @@ <ItemsControl.ItemTemplate> <DataTemplate> <Grid ClipToBounds="False"> - <Grid.ToolTip> - <ToolTip Background="White" Padding="0" Visibility="{Binding IsInterSegment,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Border BorderThickness="1" BorderBrush="#202020" CornerRadius="3" Padding="5"> - <StackPanel Background="White"> - <ItemsControl ItemsSource="{Binding BrushStops[0].LiquidVolumes}" VerticalAlignment="Center"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0"> - <ContentControl.Foreground> - <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> - </ContentControl.Foreground> - <TextBlock Foreground="#202020" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Volume,StringFormat=0.00}"></TextBlock> - </ContentControl> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - - <DataGrid Margin="0 10 0 0" SelectedIndex="-1" IsReadOnly="True" ItemsSource="{Binding BrushStops[0].LiquidVolumes}" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" Background="Transparent" SelectionUnit="FullRow"> - <DataGrid.CellStyle> - <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> - <Setter Property="BorderThickness" Value="0"/> - <Setter Property="FocusVisualStyle" Value="{x:Null}"/> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTemplateColumn Header="IDS PACK"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <Grid x:Name="t0"> - <Polygon x:Name="t1" Points="0,0 15,0 0,15 0,0" Margin="-15 -11 0 0"> - <Polygon.Fill> - <SolidColorBrush x:Name="t2" Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter},FallbackValue={StaticResource dummyColor}}" /> - </Polygon.Fill> - </Polygon> - <TextBlock FontWeight="SemiBold" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}"></TextBlock> - </Grid> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="D/F"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding IdsPack.DispenserType.NlPerPulse,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="STEP"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}"> - <ComboBox.ItemContainerStyle> - <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> - <Setter Property="Background" Value="#ECECEC"></Setter> - </Style> - </ComboBox.ItemContainerStyle> - <ComboBox.ItemTemplate> - <DataTemplate> - <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> - </DataTemplate> - </ComboBox.ItemTemplate> - </ComboBox> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="MAX NL / CM"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding LiquidMaxNanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="VOLUME"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding Volume,StringFormat='0.0'}"></Run> - <Run Text="%" Foreground="Gray"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="FORMULA"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding IdsPack.IdsPackFormula.Name}"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="NL / CM"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding NanoliterPerCentimeter,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="NL / SEC"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock VerticalAlignment="Center"> - <Run Text="{Binding NanoliterPerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(nl)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTemplateColumn Header="PULSE / SEC"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <Label VerticalAlignment="Center"> - <Label.Style> - <Style TargetType="Label"> - <Setter Property="Content"> - <Setter.Value> - <TextBlock> - <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </Setter.Value> - </Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding DispenserStepDivision}" Value="{x:Static dispensing:DispenserStepDivisions.Auto}"> - <Setter Property="Content" Value="Auto"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding DispenserStepDivision,Converter={StaticResource IsNotConverter},ConverterParameter={x:Static dispensing:DispenserStepDivisions.Auto}}" Value="True"> - <Setter Property="Content"> - <Setter.Value> - <TextBlock> - <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run> - <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run> - </TextBlock> - </Setter.Value> - </Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Label.Style> - </Label> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - </DataGrid.Columns> - </DataGrid> - </StackPanel> - </Border> - </ToolTip> - </Grid.ToolTip> <Grid.Width> <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJobStatus.CurrentUnitTotalProgress"></Binding> @@ -317,14 +155,7 @@ </materialDesign:PackIcon> </StackPanel> - <Rectangle Height="30" Margin="0 10 0 0" VerticalAlignment="Center"> - <Rectangle.Fill> - <MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}"> - <Binding Path="."></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJob"></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.RunningJob.Length"></Binding> - </MultiBinding> - </Rectangle.Fill> + <Rectangle Height="30" Margin="0 10 0 0" VerticalAlignment="Center" Fill="{Binding SegmentBrush}"> </Rectangle> <Canvas Height="30" HorizontalAlignment="Center" Width="80"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index cff53ea8d..c9c7a4efc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -207,173 +207,166 @@ </Grid> <Grid HorizontalAlignment="Right"> - <Grid RenderTransformOrigin="1,0.5"> - <Grid.Style> - <Style TargetType="Grid"> - <Setter Property="LayoutTransform"> - <Setter.Value> - <ScaleTransform ScaleY="1" ScaleX="0" /> - </Setter.Value> - </Setter> + <ContentControl> + <ContentControl.Style> + <Style TargetType="ContentControl"> + <Setter Property="Visibility" Value="Collapsed"></Setter> + <Setter Property="Content" Value="{x:Null}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=toggleOutline,Path=IsChecked}" Value="True"> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="LayoutTransform.ScaleX" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation To="0" Duration="00:00:0.2" Storyboard.TargetProperty="LayoutTransform.ScaleX" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - </Style.Triggers> - </Style> - </Grid.Style> - <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="White"> - <Grid> - <ScrollViewer Padding="20" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> - <StackPanel> - <TextBlock Text="JOB OUTLINE" HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="30"></TextBlock> + <Setter Property="Visibility" Value="Visible"></Setter> + <Setter Property="Content"> + <Setter.Value> + <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="White"> + <Grid> + <ScrollViewer Padding="20" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.IsVirtualizing="True"> + <StackPanel> + <TextBlock Text="JOB OUTLINE" HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="30"></TextBlock> - <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">BASIC</TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket,Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">BASIC</TextBlock> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket,Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">SPOOL</TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.Spool,Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">SPOOL</TextBlock> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.Spool,Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">PROCESS PARAMETERS</TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.ProcessParameters,Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="Settings" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">PROCESS PARAMETERS</TextBlock> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.ProcessParameters,Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="Settings" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">SEGMENTS</TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.Segments}" AlternationCount="10000"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel> - <TextBlock FontSize="14" FontWeight="SemiBold" Margin="0 10 0 0"> + <TextBlock FontSize="17" FontWeight="SemiBold" Margin="0 20 0 0">SEGMENTS</TextBlock> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding JobHandler.JobTicket.Segments}" AlternationCount="10000" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Expander IsExpanded="False" Background="Transparent"> + <Expander.Header> + <TextBlock FontSize="14" FontWeight="SemiBold"> <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run> <Run Text="SEGMENT"></Run> - </TextBlock> + </TextBlock> + </Expander.Header> + <StackPanel> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <TextBlock FontSize="12" FontWeight="SemiBold" Margin="27 10 0 0">BRUSH STOPS</TextBlock> - <ItemsControl Margin="40 0 0 0" ItemsSource="{Binding BrushStops}" AlternationCount="10000"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel> - <TextBlock FontSize="11" FontWeight="SemiBold" Margin="0 5 0 0"> + <TextBlock FontSize="12" FontWeight="SemiBold" Margin="27 10 0 0">BRUSH STOPS</TextBlock> + <ItemsControl Margin="40 0 0 0" ItemsSource="{Binding BrushStops}" AlternationCount="10000" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel> + <TextBlock FontSize="11" FontWeight="SemiBold" Margin="0 5 0 0"> <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run> <Run Text="STOP"></Run> - </TextBlock> + </TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="Pencil" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <TextBlock FontSize="12" FontWeight="SemiBold" Margin="27 10 0 0">DISPENSERS</TextBlock> - <ItemsControl Margin="40 0 0 0" ItemsSource="{Binding Dispensers}" AlternationCount="10000"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel> - <TextBlock FontSize="11" FontWeight="SemiBold" Margin="0 5 0 0"> + <TextBlock FontSize="12" FontWeight="SemiBold" Margin="27 10 0 0">DISPENSERS</TextBlock> + <ItemsControl Margin="40 0 0 0" ItemsSource="{Binding Dispensers}" AlternationCount="10000" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel> + <TextBlock FontSize="11" FontWeight="SemiBold" Margin="0 5 0 0"> <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run> <Run Text="DISPENSER"></Run> - </TextBlock> + </TextBlock> - <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> - <materialDesign:PackIcon Kind="ArrowRightBoldCircle" Width="12" Height="12" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> + <ItemsControl Margin="10 0 0 0" ItemsSource="{Binding Converter={StaticResource ObjectToPropertiesConverter}}" VirtualizingPanel.IsVirtualizing="True"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 5 0 0"> + <materialDesign:PackIcon Kind="ArrowRightBoldCircle" Width="12" Height="12" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"> <Run Text="{Binding Name,Mode=OneWay}"></Run><Run>:</Run> <Run Text="{Binding Value,Mode=OneWay}" FontWeight="SemiBold"></Run> - </TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </StackPanel> - </ScrollViewer> - </Grid> - </Border> - </Grid> + </TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </Expander> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </StackPanel> + </ScrollViewer> + </Grid> + </Border> + </Setter.Value> + </Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </ContentControl.Style> + + </ContentControl> <Border VerticalAlignment="Center" HorizontalAlignment="Left" Background="White" Width="30" Height="120" CornerRadius="10 0 0 10" Margin="-28 0 0 0" BorderBrush="Gray" BorderThickness="1 1 0 1"> <ToggleButton x:Name="toggleOutline" BorderThickness="0" Cursor="Hand" Background="Transparent"> @@ -385,7 +378,7 @@ <ToggleButton.Template> <ControlTemplate TargetType="ToggleButton"> <Border Background="Transparent"> - <ContentPresenter></ContentPresenter> + <ContentPresenter></ContentPresenter> </Border> <ControlTemplate.Triggers> |
