diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-09 20:27:29 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-09 20:27:29 +0300 |
| commit | 23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4 (patch) | |
| tree | 9fc86e45ca156e736f5bc9b17605677f8f4ea0c2 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | 24b3ae08ee6da1350f31541cf4966958cfde8a74 (diff) | |
| download | Tango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.tar.gz Tango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.zip | |
Notifications list, GUI changes.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
7 files changed, 284 insertions, 106 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs new file mode 100644 index 000000000..b227aa5f8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; + +namespace Tango.PPC.UI.Converters +{ + public class CollectionToCountConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var collection = value as System.Collections.ICollection; + if (collection != null) + { + return collection.Count; + } + return 0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Machine outline.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Machine outline.png Binary files differnew file mode 100644 index 000000000..67c89b46e --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/Machine outline.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index ac1972f5f..cc8f7b4ab 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -303,6 +303,7 @@ namespace Tango.PPC.UI.Notifications item.RemoveAction = () => { PopNotification(item); }; NotificationItems.Insert(0, item); RaisePropertyChanged(nameof(HasNotificationItems)); + RaisePropertyChanged(nameof(NotificationItems)); return item; } @@ -325,6 +326,7 @@ namespace Tango.PPC.UI.Notifications LogManager.Log($"Popping out NotificationItem '{item.GetType().Name}'."); NotificationItems.Remove(item); RaisePropertyChanged(nameof(HasNotificationItems)); + RaisePropertyChanged(nameof(NotificationItems)); } /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 7ed27a3ce..ec2e6b1a0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -140,6 +140,7 @@ <DependentUpon>RunningJobViewerEureka.xaml</DependentUpon> </Compile> <Compile Include="Converters\AppBarItemConverter.cs" /> + <Compile Include="Converters\CollectionToCountConverter.cs" /> <Compile Include="Converters\ItemBaseConverter.cs" /> <Compile Include="Converters\LengthToWeightConverter.cs" /> <Compile Include="Converters\LengthWithSpoolsConverter.cs" /> @@ -553,6 +554,7 @@ <Resource Include="Images\Job Issues\ttime_left.png" /> <Resource Include="Images\Job Issues\thread_type.png" /> <Resource Include="Images\Job Issues\Events.png" /> + <Resource Include="Images\Job Issues\Machine outline.png" /> <Content Include="Manifests\release.xml" /> <Content Include="Manifests\debug.xml" /> <None Include="firmware_package.tfp"> @@ -877,7 +879,7 @@ if $(ConfigurationName) == Debug "rc.exe" "$(TargetPath)" --set-version-string " </PropertyGroup> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index f9bc4cefb..8e5d3e0f9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; +using Tango.BL.Enumerations; using Tango.Core.Commands; using Tango.Integration.Operation; using Tango.PPC.Common; @@ -44,7 +45,9 @@ namespace Tango.PPC.UI.ViewModels IsDyeingProcess = (_runningJobStatus != null && _runningJobStatus.CurrentSegment != null); if(_runningJobStatus != null && _runningJobStatus.CurrentSegment != null) { - CurrentBrushStop = _runningJobStatus.CurrentSegment.FirstBrushStop; + var segment = Job.Segments.FirstOrDefault(x=>x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex); + if(segment != null) + CurrentBrushStop = segment.FirstBrushStop; } RaisePropertyChangedAuto(); } @@ -101,11 +104,56 @@ namespace Tango.PPC.UI.ViewModels if(_currentBrushStop != value) { _currentBrushStop = value; + OnUpdateCurrentBrush(); RaisePropertyChangedAuto(); } } } + public double CyanOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Cyan); } + } + + public double MagentaOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Magenta); } + } + + public double YellowOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Yellow); } + } + + public double BlackOutput + { + get { return GetVolumeLiquidType(LiquidTypes.Black); } + } + + public double LightCyanOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightCyan); } + } + + public double LightMagentaOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightMagenta); } + } + + public double LightYellowOutput + { + get { return GetVolumeLiquidType(LiquidTypes.LightYellow); } + } + + //public double TransparentInkOutput + //{ + // get { return GetVolumeLiquidType(LiquidTypes.TransparentInk); } + //} + + //public double LubricantOutput + //{ + // get { return GetVolumeLiquidType(LiquidTypes.Lubricant); } + //} #endregion @@ -127,6 +175,8 @@ namespace Tango.PPC.UI.ViewModels /// </summary> public RelayCommand OverviewViewCommand { get; set; } + public RelayCommand ClearAllNotificationsCommand { get; set; } + #endregion public MachineStatusViewVM() @@ -136,23 +186,21 @@ namespace Tango.PPC.UI.ViewModels GoToJobCommand = new RelayCommand(GoToJob, () => CanStopped()); JobStatusViewCommand = new RelayCommand(JobStatusView); OverviewViewCommand = new RelayCommand(OverviewView); + ClearAllNotificationsCommand = new RelayCommand(ClearAllNotifications); IsJobStatusViewEnable = true; IsEnabledStopButton = false; IsSpoolView = false; } - + + #region printing + public override void OnApplicationStarted() { MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted; MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded; } - - private bool CanStopped() - { - return IsEnabledStopButton; - } - + private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) { _handler = e.JobHandler; @@ -211,17 +259,10 @@ namespace Tango.PPC.UI.ViewModels AbortCommand.RaiseCanExecuteChanged(); }); } + + #endregion - private void StopJob() - { - _handler?.Cancel(); - } - - private void AbortJob() - { - _handler?.Cancel(); - Job = null; - } + #region Methods private void GoToJob() { @@ -230,8 +271,6 @@ namespace Tango.PPC.UI.ViewModels NavigationManager.ClearHistoryExcept<JobsView>(); } - #region Public Methods - /// <summary> /// Toggles the application technician mode. /// </summary> @@ -246,9 +285,7 @@ namespace Tango.PPC.UI.ViewModels ApplicationManager.ExitTechnicianMode(); } } - - protected void JobStatusView() { IsJobStatusViewEnable = true; @@ -259,6 +296,51 @@ namespace Tango.PPC.UI.ViewModels IsJobStatusViewEnable = false; } + private double GetVolumeLiquidType(LiquidTypes liquidType) + { + if(CurrentBrushStop != null && CurrentBrushStop.LiquidVolumes != null && CurrentBrushStop.LiquidVolumes.Count > 0) + { + var lt = CurrentBrushStop.LiquidVolumes.FirstOrDefault(x => x.LiquidType == liquidType); + + if (lt != null) + { + return Math.Round(lt.Volume, 2); + } + } + return 0; + } + + private bool CanStopped() + { + return IsEnabledStopButton; + } + + private void StopJob() + { + _handler?.Cancel(); + } + + private void AbortJob() + { + _handler?.Cancel(); + Job = null; + } + + protected void ClearAllNotifications() + { + NotificationProvider.NotificationItems.Where(x=>x.CanClose).ToList().ForEach(y=> NotificationProvider.PopNotification(y)); + } + + protected void OnUpdateCurrentBrush() + { + RaisePropertyChanged(nameof(CyanOutput)); + RaisePropertyChanged(nameof(LightCyanOutput)); + RaisePropertyChanged(nameof(MagentaOutput)); + RaisePropertyChanged(nameof(LightMagentaOutput)); + RaisePropertyChanged(nameof(YellowOutput)); + RaisePropertyChanged(nameof(LightYellowOutput)); + RaisePropertyChanged(nameof(BlackOutput)); + } #endregion } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml index fe42576b4..10750bba3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml @@ -208,7 +208,7 @@ </Grid> </Grid> - <Grid Background="Gainsboro" Grid.Column="2" Width="960" Height="1280"> + <Grid Background="Gainsboro" Grid.Column="2" Width="1260" Height="1280"> <Viewbox > <local:MachineStatusView /> </Viewbox> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index d98a8823d..18c9b3adb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -7,15 +7,16 @@ xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:locaControls="clr-namespace:Tango.PPC.UI.Controls" - xmlns:locaConverters="clr-namespace:Tango.PPC.UI.Converters" + xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters" xmlns:global="clr-namespace:Tango.PPC.UI" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="932" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> <UserControl.Resources> - <locaConverters:LengthToWeightConverter x:Key="LengthToWeightConverter" /> - <locaConverters:LengthWithSpoolsConverter x:Key="LengthWithSpoolsConverter"/> + <localConverters:LengthToWeightConverter x:Key="LengthToWeightConverter" /> + <localConverters:LengthWithSpoolsConverter x:Key="LengthWithSpoolsConverter"/> + <localConverters:CollectionToCountConverter x:Key="CollectionToCountConverter"/> <Style x:Key="LinkRoundButtonStyle" TargetType="{x:Type touch:TouchButton}"> <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter> @@ -115,7 +116,7 @@ </UserControl.Resources> - <Grid Width="960" Height="1280"> + <Grid Width="1260" Height="1280"> <Grid.ColumnDefinitions> <ColumnDefinition Width="32"></ColumnDefinition> <ColumnDefinition Width="1*"></ColumnDefinition> @@ -193,8 +194,12 @@ <DockPanel Grid.Row="1" Margin="0 25 0 0"> <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Width="200" MinHeight="30" HorizontalAlignment="Right" Margin="0 0 0 0"> - <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 0 20 0" CornerRadius="17" Height="34" Width="164" ThumbWidth="80" LeftText="Total" RightText="Spool" ThumbCornerRadius="13" IsChecked="{Binding IsSpoolView}" ></touch:TouchToggleSlider> + <StackPanel Orientation="Vertical"> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 0 20 0" CornerRadius="17" Height="36" Width="164" ThumbWidth="80" LeftText="Total" RightText="Spool" ThumbCornerRadius="13" IsChecked="{Binding IsSpoolView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 20 20 0" CornerRadius="17" Height="36" Width="164" ThumbWidth="80" LeftText="Length" RightText="Weight" ThumbCornerRadius="13" IsChecked="{Binding IsSpoolView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> + </StackPanel> </StackPanel> + <UniformGrid DockPanel.Dock="Left" Columns="1" Rows="5" HorizontalAlignment="Left" Margin="0 0 0 0" Height="420" VerticalAlignment="Top"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <Image Source="../Images/Job Issues/thread_type.png" Stretch="None" VerticalAlignment="Top"/> @@ -412,10 +417,10 @@ <!--<TextBlock Margin="0 0 -50 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Right"> <Run Text="x"></Run><Run Text="{Binding RunningJobStatus.RemainingUnits}"></Run> </TextBlock>--> - </Grid> - <touch:MultiRangeSlider x:Name="PART_LowerSlider" Height="30" Margin="0 0 0 0" Minimum="0" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}" Foreground="{StaticResource TangoDarkForegroundBrush}" + </Grid> + <touch:MultiRangeSlider x:Name="PART_LowerSlider" Height="30" Margin="0 0 0 0" Minimum="0" Maximum="{Binding RunningJobStatus.CurrentUnitTotalProgress}" Value="{Binding RunningJobStatus.CurrentUnitProgress}" Foreground="{StaticResource TangoDarkForegroundBrush}" IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" IsEnabled="False" /> - <UniformGrid DockPanel.Dock="Bottom" Columns="4" Rows="1" HorizontalAlignment="Left" Margin="0 35 0 0" Height="Auto" VerticalAlignment="Top" Width="900"> + <UniformGrid DockPanel.Dock="Bottom" Columns="4" Rows="1" HorizontalAlignment="Left" Margin="0 35 0 0" Height="Auto" VerticalAlignment="Top" Width="1200"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <Image Source="../Images/Job Issues/job_length.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> <StackPanel Orientation="Vertical" Margin="15 0 0 0"> @@ -499,7 +504,7 @@ </StackPanel> </UniformGrid> <Grid Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> - <ContentControl x:Name="leftBrushValues" HorizontalAlignment="Left" Content="{Binding CurrentBrushStop}" Width="Auto" Height="Auto" Background="Aqua" Margin="0 30 0 0"> + <ContentControl x:Name="leftBrushValues" HorizontalAlignment="Left" Content="{Binding CurrentBrushStop}" Width="Auto" Height="Auto" Margin="0 30 0 0"> <ContentControl.Style> <Style TargetType="ContentControl"> <Setter Property="ContentTemplate"> @@ -531,44 +536,81 @@ <Image Source="../Images/Job Issues/output.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" Height="Auto"/> <TextBlock VerticalAlignment="Center" Margin="15 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" >Output</TextBlock> </StackPanel> - <UniformGrid Columns="7" Rows="1" Margin="0 30 0 0" Width="440" HorizontalAlignment="Left"> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">C</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightCyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LC</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">M</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightPink" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LM</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">Y</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightYellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LY</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">K</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">86</TextBlock> - </StackPanel> - </UniformGrid> - </StackPanel> + <UniformGrid Margin="0 35 0 0" Rows="1" Columns="7" Height="Auto" Width="435" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + </UniformGrid> + <UniformGrid Columns="7" Rows="1" Margin="0 30 0 0" Width="440" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">C</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding CyanOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightCyan" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LC</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightCyanOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">M</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding MagentaOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightPink" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LM</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightMagentaOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">Y</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding YellowOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightYellow" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LY</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightYellowOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">K</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding BlackOutput}"></TextBlock> + </StackPanel> + </UniformGrid> + </StackPanel> </Grid> </Grid> @@ -609,7 +651,7 @@ </StackPanel> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" DockPanel.Dock="Left"> <Image Source="../Images/Job Issues/job_length.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> - <TextBlock Margin="20 10 0 0" MinWidth="25" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}" > + <TextBlock Margin="20 10 0 0" Width="50" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}" > <TextBlock.Text> <MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay"> <Binding Path="RunningJobStatus.ProgressMinusSettingUp" Mode="OneWay"/> @@ -618,9 +660,9 @@ </TextBlock.Text> </TextBlock> </StackPanel> - <StackPanel Orientation="Vertical" Margin="30 5 30 0" > + <StackPanel Orientation="Vertical" Margin="30 8 30 0" > <locaControls:RunningJobViewerEureka Height="16" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" /> - <touch:MultiRangeSlider x:Name="PART_LowerSlider1" Height="26" Margin="0 0 0 0" Minimum="0" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}" Foreground="{StaticResource TangoDarkForegroundBrush}" + <touch:MultiRangeSlider x:Name="PART_LowerSlider1" Height="26" Margin="0 0 0 0" Minimum="0" Maximum="{Binding RunningJobStatus.CurrentUnitTotalProgress}" Value="{Binding RunningJobStatus.CurrentUnitProgress}" Foreground="{StaticResource TangoDarkForegroundBrush}" IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" IsEnabled="False" /> </StackPanel> </DockPanel> @@ -635,13 +677,13 @@ <UniformGrid Columns="5" Rows="1" Height="150"> </UniformGrid> - <Grid Height="150"> - + <Grid > + <Image Source="../Images/Job Issues/Machine outline.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="Auto" Height="Auto"/> </Grid> </StackPanel> </Grid> - <Grid Grid.Row="2" x:Name="IncLevels"> + <Grid Grid.Row="2" x:Name="IncLevels" Margin="0 20 0 0"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" > <Image Source="../Images/Job Issues/job_length.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> @@ -661,38 +703,55 @@ <touch:TouchExpander x:Name="Notifications" Style="{StaticResource TouchRoundedExpander}" IsTabStop="False" KeyboardNavigation.TabNavigation ="None" BorderThickness="0" IsExpanded="false" CornerRadius="20 20 0 0" > <touch:TouchExpander.Header> <DockPanel > - <touch:TouchButton Margin="0 0 20 0" Content="Clear All" DockPanel.Dock="Right" Width="120" Height="38" HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="1" CornerRadius="19" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoPrimaryAccentBrush}" > + <touch:TouchButton Margin="0 0 20 0" Content="Clear All" DockPanel.Dock="Right" Width="120" Height="38" HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="1" CornerRadius="19" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding ClearAllNotificationsCommand}" > </touch:TouchButton> <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" > <Image Source="../Images/Job Issues/Events.png" MaxWidth="33" Stretch="Fill" Height="36"/> <TextBlock VerticalAlignment="Center" Margin="20 4 0 0" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}">Notifications</TextBlock> - <TextBlock Margin="1000 0 0 0" VerticalAlignment="Center" FontWeight="Normal" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontWeight="Normal" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}"> <Run Text="(" ></Run> - <Run Text="7(TEST)"></Run> + <Run Text="{Binding NotificationProvider.NotificationItems, Mode=OneWay, Converter={StaticResource CollectionToCountConverter}}"></Run> <Run Text=" new Events)" ></Run> </TextBlock> </StackPanel> </DockPanel> </touch:TouchExpander.Header> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> - <ItemsControl ClipToBounds="False" ItemsSource="{Binding NotificationProvider.NotificationItems}" > + <ListBox ClipToBounds="False" ItemsSource="{Binding NotificationProvider.NotificationItems}" HorizontalAlignment="Stretch" MaxHeight="258" > + <ListBox.Style> + <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource BlankListBox}"> + <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"></Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ListBox}"> + <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> + <touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False" + Style="{StaticResource TouchVerticalScrollViewer}"> + <ItemsPresenter /> + </touch:TouchScrollViewer> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </ListBox.Style> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> + <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <Border BorderThickness="1" Margin="-1 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}" Width="935"> - <DockPanel HorizontalAlignment="Stretch" > - <Grid DockPanel.Dock="Right" Width="40" HorizontalAlignment="Right" VerticalAlignment="Stretch" Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}"> - <Grid Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" Width="14" Height="14"> - <touch:TouchIcon Icon="Close" Foreground="Black" /> - </Grid> - <touch:TouchButton Opacity="0" Background="Transparent" Style="{StaticResource TangoFlatButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" Padding="5" /> - </Grid> - <touch:TouchIcon Margin="24 12 15 12" DockPanel.Dock="Left" Height="32"> + <Grid HorizontalAlignment="Stretch" Width="1220" Height="62"> + <Border BorderThickness="1" Margin="-1 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}"> + <Grid HorizontalAlignment="Stretch" > + <Grid.ColumnDefinitions> + <ColumnDefinition Width="56"/> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="56"/> + </Grid.ColumnDefinitions> + <touch:TouchIcon Margin="24 0 0 0" DockPanel.Dock="Left" Height="32" Grid.Column="0"> <touch:TouchIcon.Style> <Style TargetType="touch:TouchIcon"> <Setter Property="Icon" Value="Information"></Setter> @@ -701,11 +760,11 @@ <Setter Property="Icon" Value="InformationOutline"></Setter> <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"/> </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Success"> - <Setter Property="Icon" Value="Check"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/> - </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Warning"> + <DataTrigger Binding="{Binding MessageType}" Value="Success"> + <Setter Property="Icon" Value="Check"/> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/> + </DataTrigger> + <DataTrigger Binding="{Binding MessageType}" Value="Warning"> <Setter Property="Icon" Value="AlertCircleOutline"></Setter> <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"/> </DataTrigger> @@ -721,20 +780,23 @@ </Style> </touch:TouchIcon.Style> </touch:TouchIcon> - - <StackPanel Margin="20 3 40 3" VerticalAlignment="Center"> - <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock> - - <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" > - - </TextBlock> - + <StackPanel Margin="15 3 20 3" VerticalAlignment="Center" Grid.Column="1"> + <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock> + <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" /> </StackPanel> - </DockPanel> + <Grid Grid.Column="2" Width="40" HorizontalAlignment="Right" VerticalAlignment="Stretch" Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}"> + <Grid Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" Width="14" Height="14"> + <touch:TouchIcon Icon="Close" Foreground="Black" /> + </Grid> + <touch:TouchButton Opacity="0" Background="Transparent" Style="{StaticResource TangoFlatButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" Padding="5" /> + </Grid> + + </Grid> </Border> + </Grid> </DataTemplate> </ItemsControl.ItemTemplate> - </ItemsControl> + </ListBox> </Grid> </touch:TouchExpander> </Grid> |
