aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-01-09 13:45:40 +0200
committerAvi Levkovich <avi@twine-s.com>2019-01-09 13:45:40 +0200
commitc2019e2a94afc7f25258ae38478ae74434414a1f (patch)
treeee9cf870d5738004ebd92cf841c1bdbd26793984 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
parentc84c8852f2889235a181ec74f0d2fdf8584f2a7d (diff)
parentd50d729a2b7d45ca4b22df7ff0d8823825c479b6 (diff)
downloadTango-c2019e2a94afc7f25258ae38478ae74434414a1f.tar.gz
Tango-c2019e2a94afc7f25258ae38478ae74434414a1f.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml171
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml271
4 files changed, 147 insertions, 315 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 333a31802..8ac8e6acd 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
@@ -738,8 +738,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
RemoveBrushStopCommand = new RelayCommand(RemoveSelectedBrushStops, () => SelectedBrushStop != null && CanWork);
SaveJobCommand = new RelayCommand(SaveActiveJob, () => SelectedMachine != null && CanWork);
DiscardJobCommand = new RelayCommand(BackToJobs, () => SelectedMachine != null && CanWork);
- StartJobCommand = new RelayCommand(() => StartJob(), () => ActiveJob != null && CanWork && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution)));
- StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution)));
+ StartJobCommand = new RelayCommand(() => StartJob(), () => ActiveJob != null && CanWork && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.PreventJob)));
+ StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.PreventJob)));
StopJobCommand = new RelayCommand(StopJob, () => IsJobRunning && CanWork);
CloseJobCompletionStatusCommand = new RelayCommand(CloseJobCompletionStatusBar);
LoadJobCommand = new RelayCommand(() => LoadSelectedJob(), () => SelectedMachineJob != null && CanWork);
@@ -1052,7 +1052,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
_speech.SpeakError(events.Last().EventType.Name);
- if (events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.AbortRunningJob)))
+ if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob)))
{
if (JobHandler != null)
{
@@ -1209,7 +1209,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
private void OnSelectedJobEventChanged()
{
- if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted && !_dialog_shown)
+ if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown)
{
_dialog_shown = true;
_notification.ShowModalDialog<EventDetailsViewVM, EventDetailsView>(new EventDetailsViewVM(SelectedJobEvent), (x) =>
@@ -1333,7 +1333,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
if (status.Message != null)
{
// TODO: Write to db when shlomo is not sending test messages anymore.
- _eventLogger.Log(BL.Enumerations.EventTypes.JobStatus, status.Message, false);
+ _eventLogger.Log(BL.Enumerations.EventTypes.JOB_STATUS, status.Message, false);
}
}
};
@@ -1695,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();
@@ -1845,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(() =>
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>