diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-03-23 13:33:53 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-03-23 13:33:53 +0200 |
| commit | 0766ff8488c961c7f73eec50fb9ee64c89da5eb1 (patch) | |
| tree | d3c5ea5015571f085ac7da513ed34e4c68937acf /Software | |
| parent | 3283eca8d5cb327779d53b6e1744e3440098bb35 (diff) | |
| download | Tango-0766ff8488c961c7f73eec50fb9ee64c89da5eb1.tar.gz Tango-0766ff8488c961c7f73eec50fb9ee64c89da5eb1.zip | |
Eureka. PPC. Job View changes. Basic mode. Summary view.
Diffstat (limited to 'Software')
15 files changed, 705 insertions, 112 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index 0b039b618..90ca8ed0c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -511,7 +511,17 @@ namespace Tango.PPC.Jobs.ViewModels job.JobSource = JobSource.Local; job.Name = "untitled"; job.NumberOfHeads = 1; - job.NumberOfUnits = 1; + + if(BuildProvider.IsEureka) + { + job.NumberOfUnits = 4; + //job.NumberOfHeads = 4; + } + else + { + job.NumberOfUnits = 1; + + } job.SampleUnitsOrMeters = 1; job.CreationDate = DateTime.UtcNow; job.JobStatus = JobStatuses.Draft; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/FirstValueCollectionConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/FirstValueCollectionConverter.cs new file mode 100644 index 000000000..9f5480e5e --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/FirstValueCollectionConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.Core; +using Tango.PPC.Jobs.Models; + +namespace Tango.PPC.Jobs.Converters +{ + public class FirstValueCollectionConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if(value is SynchronizedObservableCollection<SegmentModel>) + { + SynchronizedObservableCollection<SegmentModel> list = value as SynchronizedObservableCollection<SegmentModel>; + if(list.Count >= 1) + { + return list[0]; + } + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/TimeSpanToHoursConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/TimeSpanToHoursConverter.cs new file mode 100644 index 000000000..10c666c4e --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/TimeSpanToHoursConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.PPC.Jobs.Converters +{ + public class TimeSpanToHoursConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return ((TimeSpan)value).TotalHours; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return TimeSpan.FromHours(double.Parse(value.ToString())); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml new file mode 100644 index 000000000..e28b719ba --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml @@ -0,0 +1,35 @@ +<UserControl x:Class="Tango.PPC.Jobs.Dialogs.MessageDiscardAdvancedOptions" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs" + mc:Ignorable="d" + Background="Transparent" d:DesignHeight="630" d:DesignWidth="560" Width="480" Height="350" + d:DataContext="{d:DesignInstance Type=local:MessageDiscardAdvancedOptionsVM, IsDesignTimeCreatable=False}"> + <Border BorderBrush="{StaticResource TangoRippleDarkBrush}" Margin="-24" CornerRadius="40" BorderThickness="2" Background="{StaticResource TangoPrimaryBackgroundBrush}"> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="Auto"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <DockPanel VerticalAlignment="Top" Margin="0 16 18 18" Grid.Row="0"> + <touch:TouchIconButton DockPanel.Dock="Right" VerticalAlignment="Center" Height="46" Command="{Binding CloseCommand}" Icon="CloseCircleOutline" RippleBrush="{StaticResource TangoRippleDarkBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" HorizontalAlignment="Right" /> + </DockPanel> + + <StackPanel Grid.Row="1"> + <TextBlock Height="Auto" Margin="50 20 50 10" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold" HorizontalAlignment="Center" TextWrapping="Wrap">Discard all advanced options?</TextBlock> + + <TextBlock Height="Auto" Margin="50 20 50 10" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" FontWeight="SemiBold" HorizontalAlignment="Center" TextWrapping="Wrap">Only the first color will remain.</TextBlock> + </StackPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2"> + <touch:TouchButton Margin="0 21 0 0 " Command="{Binding CloseCommand}" Width="164" Height="60" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource TangoMessageBoxButton}" BorderThickness="2" >No</touch:TouchButton> + <touch:TouchButton Margin="40 21 0 0 " Command="{Binding OKCommand}" Width="164" Height="60" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" Background="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoLightForegroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource TangoMessageBoxButton}">Yes</touch:TouchButton> + </StackPanel> + </Grid> + </Border> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml.cs new file mode 100644 index 000000000..037f191ba --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptions.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.PPC.Jobs.Dialogs +{ + /// <summary> + /// Interaction logic for MessageDiscardAdvancedOptionsDialog.xaml + /// </summary> + public partial class MessageDiscardAdvancedOptions : UserControl + { + public MessageDiscardAdvancedOptions() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptionsVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptionsVM.cs new file mode 100644 index 000000000..8165a3013 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/MessageDiscardAdvancedOptionsVM.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.PPC.Jobs.Dialogs +{ + public class MessageDiscardAdvancedOptionsVM : DialogViewVM + { + + public MessageDiscardAdvancedOptionsVM() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index 0009fce24..22ea1c7f1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -191,6 +191,20 @@ namespace Tango.PPC.Jobs.Models } } + [JsonIgnore] + public double LengthIncludingNumberOfUnitsAndSpools + { + get + { + if(NumberSpools >= 4) + { + return LengthIncludingNumberOfUnits * NumberSpools; + } + + return LengthIncludingNumberOfUnits; + } + } + protected Rml _rml; /// <summary> @@ -335,23 +349,44 @@ namespace Tango.PPC.Jobs.Models get { return SpoolType.Guid; } } - private int _copies; - - public int Copies + private int _numberSpools; + [JsonIgnore] + public int NumberSpools { - get { return _copies; } - set { _copies = value; RaisePropertyChangedAuto(); } + get { return _numberSpools; } + set { + if(_numberSpools != value) + { + _numberSpools = value; + RaisePropertyChangedAuto(); + RaisePropertyChanged(nameof(NumberOfUnitsMultipliedBySpools)); + } + } } - private int _devidedBySpools; - - public int DevidedBySpools + protected Int32 _numberOfUnitsMultipliedBySpools; + [JsonIgnore] + public Int32 NumberOfUnitsMultipliedBySpools { - get { return _devidedBySpools; } - set { _devidedBySpools = value; RaisePropertyChangedAuto(); } - } - + get + { + return _numberOfUnitsMultipliedBySpools; + } + set + { + if (_numberOfUnitsMultipliedBySpools != value) + { + _numberOfUnitsMultipliedBySpools = value; + RaisePropertyChangedAuto(); + if (NumberSpools>=4) + { + NumberOfUnits = _numberOfUnitsMultipliedBySpools/ NumberSpools; + RaisePropertyChanged(nameof(LengthIncludingNumberOfUnitsAndSpools)); + } + } + } + } protected User _user; @@ -624,11 +659,14 @@ namespace Tango.PPC.Jobs.Models } } + [JsonIgnore] + public bool IsEureka { get; set; } + #endregion #region constructors - public JobModel(List<ColorSpace> list) + public JobModel(List<ColorSpace> list, bool isEureka) { ColorSpacesList = list; _segments = new SynchronizedObservableCollection<SegmentModel>(); @@ -643,7 +681,12 @@ namespace Tango.PPC.Jobs.Models GroupingSegments.CollectionChanged -= SegmentsGroup_CollectionChanged; GroupingSegments.CollectionChanged += SegmentsGroup_CollectionChanged; SelectAllSegments = false; - NumberOfUnits = 1; + //if not eurika + if (!isEureka) + NumberOfUnits = 1; + else + NumberOfUnits = 4; + IsEureka = isEureka; } #endregion @@ -991,7 +1034,9 @@ namespace Tango.PPC.Jobs.Models if (joblength > maxLength) { var maxRep = (maxLength == 0 ? 999 : (maxLength / Length)); - await TangoIOC.Default.GetInstance<INotificationProvider>().ShowError($"You have reached the maximum length for this job {maxLength}."); + + if(!IsEureka) + await TangoIOC.Default.GetInstance<INotificationProvider>().ShowError($"You have reached the maximum length for this job {maxLength}."); //if(NumberOfUnits > 1 && NumberOfUnits > maxRep) //{ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj index 32088bbca..d03af5551 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj @@ -143,6 +143,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Dialogs\MessageDiscardAdvancedOptions.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Dialogs\RepeatJobView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -226,6 +230,7 @@ <Compile Include="Converters\ColorTabToVisibilityConverter.cs" /> <Compile Include="Converters\DeltaLCHToTextConverter.cs" /> <Compile Include="Converters\DoubleNullConverter.cs" /> + <Compile Include="Converters\FirstValueCollectionConverter.cs" /> <Compile Include="Converters\HueValueToTextConvereter.cs" /> <Compile Include="Converters\InterSegmentLengthToWidthConverter.cs" /> <Compile Include="Converters\JobsCategoryToOpacityConverter.cs" /> @@ -236,6 +241,7 @@ <Compile Include="Converters\JobTypeToImageConverter.cs" /> <Compile Include="Converters\MarginOffsetSliderConverter .cs" /> <Compile Include="Converters\RoundDoubleConverter.cs" /> + <Compile Include="Converters\TimeSpanToHoursConverter.cs" /> <Compile Include="Dialogs\AddSegmentWarningDialog.xaml.cs"> <DependentUpon>AddSegmentWarningDialog.xaml</DependentUpon> </Compile> @@ -283,6 +289,10 @@ </Compile> <Compile Include="Dialogs\CatalogSelectionViewVM.cs" /> <Compile Include="Dialogs\JobCreationViewVM.cs" /> + <Compile Include="Dialogs\MessageDiscardAdvancedOptionsVM.cs" /> + <Compile Include="Dialogs\MessageDiscardAdvancedOptions.xaml.cs"> + <DependentUpon>MessageDiscardAdvancedOptions.xaml</DependentUpon> + </Compile> <Compile Include="Dialogs\RepeatJobView.xaml.cs"> <DependentUpon>RepeatJobView.xaml</DependentUpon> </Compile> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index 788b1eca3..7dcc349c1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -220,6 +220,30 @@ namespace Tango.PPC.Jobs.ViewModels } } + private bool _isBasicMode; + + public bool IsBasicMode + { + get { return _isBasicMode; } + set + { + if(_isBasicMode != value) + { + if(value == true && JobModel != null && JobModel.Segments.Count > 0) + { + var firstSegment = JobModel.Segments.Where(x => x.SegmentIndex == 1).FirstOrDefault(); + if(JobModel.Segments.Count > 1 || firstSegment.IsGradient ) + { + SetOrDiscardAll(); + return; + } + } + _isBasicMode = value; + RaisePropertyChangedAuto(); + } + } + } + private bool _isSummaryOpened; public bool IsSummaryOpened @@ -367,14 +391,14 @@ namespace Tango.PPC.Jobs.ViewModels _not_show_warning = false; } - #endregion + #endregion - #region Job Management + #region Job Management - /// <summary> - /// Loads the job. - /// </summary> - private async void LoadJob() + /// <summary> + /// Loads the job. + /// </summary> + private async void LoadJob() { try { @@ -454,6 +478,11 @@ namespace Tango.PPC.Jobs.ViewModels RaisePropertyChanged(nameof(SelectedRML)); await LoadRML(_selectedRML); + if(BuildProvider.IsEureka && Job.Segments.Count <= 1) + { + IsBasicMode = true; + } + else IsBasicMode = false; LoadJobModel(); @@ -515,7 +544,7 @@ namespace Tango.PPC.Jobs.ViewModels PPCSpoolType = _spoolTypes.FirstOrDefault(x => x.Type == BL.Enumerations.SpoolTypes.FlatSpool); } - var jobModel = new JobModel(ColorSpaces) + var jobModel = new JobModel(ColorSpaces, BuildProvider.IsEureka) { Name = Job.Name, Guid = Job.Guid, @@ -532,7 +561,9 @@ namespace Tango.PPC.Jobs.ViewModels Machine = Job.Machine, JobType = Job.JobType, InterSegmentLength = Job.InterSegmentLength, - EnableInterSegment = Job.EnableInterSegment + EnableInterSegment = Job.EnableInterSegment, + NumberSpools = (BuildProvider.IsEureka? 4 : 1), + NumberOfUnitsMultipliedBySpools = (BuildProvider.IsEureka ? Job.NumberOfUnits * 4 : Job.NumberOfUnits) }; Dictionary<string, SegmentsGroupModel> guidToGroup = new Dictionary<string, SegmentsGroupModel>(); if (Job.Version < 2) @@ -1414,6 +1445,49 @@ namespace Tango.PPC.Jobs.ViewModels DyeCommand.RaiseCanExecuteChanged(); } + private void SetOrDiscardAll() + { + InvokeUI(async () => + { + IsBasicMode = await MessageDiscardAllChanges(); + }); + } + + private async Task<bool> MessageDiscardAllChanges() + { + try + { + MessageDiscardAdvancedOptionsVM vm = new MessageDiscardAdvancedOptionsVM(); + vm = await NotificationProvider.ShowDialog<MessageDiscardAdvancedOptionsVM>(vm); + + if (vm.DialogResult) + { + //delete all + var segments = JobModel.OrderedSegmentsWithGroups; + var firstSegment = JobModel.Segments.Where(x=>x.SegmentIndex == 1).FirstOrDefault(); + firstSegment.SegmentsGroupModel = null; + JobModel.GroupingSegments.Clear(); + JobModel.Segments.Clear(); + JobModel.Segments.Add(firstSegment); + JobModel.GroupingSegments.Add(firstSegment); + if (firstSegment.IsGradient) + { + BrushStopModel firstbrush = firstSegment.FirstBrushStop; + firstSegment.BrushStops.Clear(); + firstSegment.BrushStops.Add(firstbrush); + firstSegment.ArrangeBrushStopsIndexes(); + } + + return true; + } + return false; + } + catch + { + return false; + } + } + #endregion #region Save from models to db diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index f8e881df7..979bca54c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -31,6 +31,8 @@ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"/> <converters:TimeSpanToMinutesConverter x:Key="TimeSpanToMinutesConverter"/> <localConverters:MarginOffsetSliderConverter x:Key="MarginOffsetSliderConverter"/> + <localConverters:FirstValueCollectionConverter x:Key="FirstValueCollectionConverter"/> + <localConverters:TimeSpanToHoursConverter x:Key="TimeSpanToHoursConverter"/> <BitmapImage x:Key="Image_Out_Of_Gamut" UriSource="../Images/JobView/error.png" /> <BitmapImage x:Key="Image_Replace_Color" UriSource="../Images/JobView/replace-color.png" /> @@ -235,9 +237,17 @@ <controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}">Segment #</controls:FastTextBlock> <controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}" Text="{Binding SegmentIndex,Mode=OneWay}"></controls:FastTextBlock> </StackPanel> - <StackPanel Margin="0 0 0 0" Orientation="Horizontal"> - <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):" FontSize="18"></controls:FastTextBlock> - <touch:TouchNumericTextBox Margin="20 0 0 0" Width="92" DockPanel.Dock="Right" Value="{Binding Length, UpdateSourceTrigger=LostFocus}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" FontSize="18" ValueChangedEnd="Length_ValueChanged" TextGotFocus="Length_BeforeChangeValue" RippleBrush="Transparent"/> + <StackPanel Margin="0 5 0 0" Orientation="Horizontal"> + <controls:FastTextBlock VerticalAlignment="Center" Text="Length (m):" FontSize="18"></controls:FastTextBlock> + <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}"> + <touch:TouchNumericTextBox Margin="20 0 0 0" Width="192" FocusSelectionMode="SelectAll" HorizontalAlignment="Left" HideUnderline="True" VerticalAlignment="Center" + Value="{Binding Length, UpdateSourceTrigger=LostFocus}" VerticalContentAlignment="Center" + StringFormat="0.0" AutoCalculateJogStep="False" + HasDecimalPoint="True" Minimum="1" Maximum="100000" + KeyboardContainer="{Binding ElementName=Container}" + FontSize="18" ValueChangedEnd="Length_ValueChanged" + TextGotFocus="Length_BeforeChangeValue" RippleBrush="Transparent"/> + </Border> </StackPanel> </StackPanel> @@ -791,12 +801,16 @@ <RowDefinition Height="1*"/> </Grid.RowDefinitions> <touch:TouchLoadingPanel x:Name="GeneralSettings" Grid.Row="1" IsLoading="{Binding IsBusy}" Margin="10 7 10 0"> - - <Border Grid.Row="1" x:Name="jobDetailsBorder" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="2" BorderBrush="{StaticResource TangoLightBorderBrush}" Margin="0 7 0 7"> + <Border Grid.Row="1" x:Name="jobDetailsBorder" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="2" BorderBrush="{StaticResource TangoLightBorderBrush}" Margin="0 7 0 7"> <Grid x:Name="job_details" HorizontalAlignment="Stretch" > + <StackPanel Orientation="Vertical"> - <StackPanel Orientation="Horizontal" MinHeight="55" VerticalAlignment="Top"> + <DockPanel> + <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Center" Width="200" MinHeight="55" HorizontalAlignment="Right" Margin="0 0 0 0"> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="20 0 110 0" CornerRadius="17" Height="34" Width="164" ThumbWidth="80" LeftText="Lenght" RightText="Weight" ThumbCornerRadius="13" ></touch:TouchToggleSlider> + </StackPanel> + <StackPanel Orientation="Horizontal" MinHeight="55" VerticalAlignment="Top" > <StackPanel.Style> <Style TargetType="StackPanel"> <Setter Property="Margin" Value="20 10 10 0"></Setter> @@ -809,22 +823,25 @@ </StackPanel.Style> <Image Source="../Images/JobView/job-details.png" Width="30" Height="30" /> <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">General Settings</TextBlock> - </StackPanel> + </StackPanel> + + </DockPanel> + <Rectangle Height="2" Margin="0 0 0 0" Fill="{StaticResource TangoDividerBrush}" VerticalAlignment="Bottom"></Rectangle> <StackPanel Orientation="Vertical" VerticalAlignment="Top"> <DockPanel HorizontalAlignment="Stretch" Margin="60 20 60 0"> - <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Thread Type" FontSize="{StaticResource TangoDialogFontSize}" Width="145"/> + <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Thread Type" FontSize="{StaticResource TangoButtonFontSize}" Width="145"/> <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}"> <touch:TouchComboBox Margin="20 0 10 10" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML ,Mode=TwoWay}" Focusable="False" KeyboardNavigation.TabNavigation ="None"> <touch:TouchComboBox.ItemTemplate> <DataTemplate> - <TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}"/> + <TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding FinalName}"/> </DataTemplate> </touch:TouchComboBox.ItemTemplate> <touch:TouchComboBox.SelectedItemTemplate> <DataTemplate> - <TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}" VerticalAlignment="Center"></TextBlock> + <TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding FinalName}" VerticalAlignment="Center"></TextBlock> </DataTemplate> </touch:TouchComboBox.SelectedItemTemplate> </touch:TouchComboBox> @@ -833,21 +850,28 @@ </StackPanel> <DockPanel HorizontalAlignment="Stretch" Margin="60 20 60 20"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right"> - <TextBlock HorizontalAlignment="Left" Margin="20 10 0 0" Text="Divided By Spools" FontSize="{StaticResource TangoDialogFontSize}" Width="Auto"/> + <TextBlock HorizontalAlignment="Left" Margin="20 10 0 0" Text="Divided By Spools" FontSize="{StaticResource TangoButtonFontSize}" Width="Auto"/> <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}" Width="120" DockPanel.Dock="Right"> - <touch:TouchTextBox BorderBrush="Transparent" Margin="0 6 0 0" FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding JobModel.DevidedBySpools}" ></touch:TouchTextBox> + <touch:TouchNumericTextBox BorderBrush="Transparent" Margin="0 0 0 0" HasDecimalPoint="False" Minimum="4" Step="4" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Value="{Binding JobModel.NumberSpools}" HideUnderline="True" RippleBrush="Transparent"></touch:TouchNumericTextBox> </Border> </StackPanel> <StackPanel Orientation="Horizontal"> - <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Copies" FontSize="{StaticResource TangoDialogFontSize}" Width="145"/> + <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Copies" FontSize="{StaticResource TangoButtonFontSize}" Width="145"/> <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}" Width="120"> - <touch:TouchTextBox BorderBrush="Transparent" Margin="0 6 0 0" FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding JobModel.Copies}"></touch:TouchTextBox> + <touch:TouchNumericTextBox BorderBrush="Transparent" HasDecimalPoint="False" Minimum="4" Step="4" Margin="0 0 0 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Value="{Binding JobModel.NumberOfUnitsMultipliedBySpools}" HideUnderline="True" RippleBrush="Transparent"></touch:TouchNumericTextBox> </Border> </StackPanel> </DockPanel> + <StackPanel Orientation="Horizontal" Margin="60 0 60 20" Visibility="{Binding IsBasicMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="White Gap (m)" FontSize="{StaticResource TangoButtonFontSize}" Width="145"/> + <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}" Width="120"> + <touch:TouchNumericTextBox BorderBrush="Transparent" HasDecimalPoint="False" Minimum="0" Margin="0 0 0 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Value="{Binding JobModel.InterSegmentLength}" HideUnderline="True" RippleBrush="Transparent"></touch:TouchNumericTextBox> + + </Border> </StackPanel> + </StackPanel> <!--<touch:TouchButton Margin="0 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding EditJobDetailsCommand}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" components:TransformationHelper.TransformWhenPressed ="False"> @@ -890,17 +914,17 @@ </Border> </touch:TouchLoadingPanel> - <touch:TouchLoadingPanel Grid.Row="2" IsLoading="{Binding IsBusy}"> - <Grid> + <touch:TouchLoadingPanel Grid.Row="2" IsLoading="{Binding IsBusy}" > + <Grid > <Grid.RowDefinitions> <RowDefinition Height="1*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> - + <Grid Grid.Row="0" x:Name="segmentsGrid" Grid.RowSpan="3" > - <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Margin="10 0 10 0" Background="{StaticResource TangoPrimaryBackgroundBrush}"> - <touch:TouchDropShadowBorder Margin="0 0 0 0" Padding="0 0 0 40" > + <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Margin="0 0 0 0" Background="{StaticResource TangoMidBackgroundBrush}"> + <touch:TouchDropShadowBorder Margin="10 0 10 0" Padding="0 0 0 0" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> @@ -908,48 +932,132 @@ <RowDefinition Height="100"/> </Grid.RowDefinitions> <Grid Grid.Row="0"> - <DockPanel> - <StackPanel x:Name="colorAndLength" DockPanel.Dock="Top" Orientation="Horizontal" VerticalAlignment="Center"> - <StackPanel.Style> - <Style TargetType="StackPanel"> - <Setter Property="Margin" Value="20 25 10 15"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IsFullMode}" Value="false"> - <Setter Property="Margin" Value="20 15 60 15"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </StackPanel.Style> - <Image Source="../Images/JobView/color-length.png" Width="30" /> - <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Properties</TextBlock> - </StackPanel> - <touch:TouchCheckBox x:Name="selectAll" Width="120" Height="22" Style="{StaticResource TouchRoundCheckBox}" Margin="28 0 0 20" IsChecked="{Binding JobModel.SelectAllSegments}" DockPanel.Dock="Top" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Left" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoMidAccentBrush}"> Select All</TextBlock> - </touch:TouchCheckBox> - </DockPanel> - <Canvas Width="250" Height="70" Margin="0 0 40 0" HorizontalAlignment="Right" VerticalAlignment="Center"> - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 20 20 10"> + <DockPanel x:Name="ColorPropertiesPanel" VerticalAlignment="Top" > + <StackPanel x:Name="AdvansedOptions" DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Margin="0 5 18 0" Height="55" HorizontalAlignment="Right" Width="Auto"> <TextBlock FontSize="20" VerticalAlignment="Center" >Advanced Options</TextBlock> - <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGreenAccent}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="20 0 110 0" Width="90" IsChecked="{Binding IsFullMode, Converter={StaticResource BooleanInverseConverter}}"></touch:TouchToggleSlider> + <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGreenAccent}" Height="28" CornerRadius="14" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 0 0 0" Width="54" IsChecked="{Binding IsBasicMode, Converter={StaticResource BooleanInverseConverter}, Mode=TwoWay}"></touch:TouchToggleSlider> </StackPanel> - </Canvas> + <DockPanel DockPanel.Dock="Left"> + <StackPanel x:Name="colorAndLength" DockPanel.Dock="Top" Orientation="Horizontal" VerticalAlignment="Center"> + <StackPanel.Style> + <Style TargetType="StackPanel"> + <Setter Property="Margin" Value="20 25 10 15"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsFullMode}" Value="false"> + <Setter Property="Margin" Value="20 15 60 15"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </StackPanel.Style> + <Image Source="../Images/JobView/color-length.png" Width="30" /> + <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Properties</TextBlock> + </StackPanel> + <touch:TouchCheckBox x:Name="selectAll" Width="120" Height="22" Style="{StaticResource TouchRoundCheckBox}" Margin="28 0 0 20" IsChecked="{Binding JobModel.SelectAllSegments}" DockPanel.Dock="Top" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Left" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <TextBlock FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoMidAccentBrush}"> Select All</TextBlock> + </touch:TouchCheckBox> + </DockPanel> + </DockPanel> + <Rectangle Height="2" Margin="0 0 0 0" Fill="{StaticResource TangoDividerBrush}" VerticalAlignment="Bottom"></Rectangle> </Grid> - <Grid Grid.Row="1" Margin="0 4 0 0"> + <Grid Grid.Row="1" Margin="0 4 0 0" Visibility="{Binding IsBasicMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <!--Border x:Name="borderDockFloat" Height="10" Margin="0 0 0 0" BorderBrush="Transparent" > <DockPanel x:Name="dockEdit" LastChildFill="False" Height="10" Width="50" HorizontalAlignment="Right" RenderTransformOrigin="0.58,2.08"/> </Border> --> - <ListBox x:Name="listSegments" Margin="10 0 10 60" Padding="0" BorderThickness="0" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplateSelector="{StaticResource GroupSegmentTemplateSelector}" Style="{StaticResource SegmentsListBox}" + <ListBox x:Name="listSegments" Margin="10 0 10 100" Padding="0" BorderThickness="0" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplateSelector="{StaticResource GroupSegmentTemplateSelector}" Style="{StaticResource SegmentsListBox}" ScrollViewer.VerticalScrollBarVisibility="Visible" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityConverter}}"/> <ListBox x:Name="collapsedListSegments" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplateSelector ="{StaticResource CollapsedGroupSegmentTemplateSelector}" Style="{StaticResource SegmentsListBox}" ScrollViewer.VerticalScrollBarVisibility="Visible" - Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin=" 0 0 0 40"/> + Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin=" 0 0 0 100"/> <!--<StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}"/>--> </Grid> + <Grid Grid.Row="1" Margin="0 4 0 0" Visibility="{Binding IsBasicMode, Converter={StaticResource BooleanToVisibilityConverter}}" > + + <Grid Height="Auto" Margin="57 15 57 0" DataContext="{Binding JobModel.Segments, Converter={StaticResource FirstValueCollectionConverter}}"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <DockPanel x:Name="header" HorizontalAlignment="Stretch" Margin="0 10 0 0"> + + + <controls:FastTextBlock VerticalAlignment="Center" DockPanel.Dock="Left" Text="Length (m):" FontSize="{StaticResource TangoButtonFontSize}"></controls:FastTextBlock> + <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}"> + <touch:TouchNumericTextBox Margin="20 0 0 0" Width="192" FocusSelectionMode="SelectAll" HorizontalAlignment="Left" HideUnderline="True" VerticalAlignment="Center" + Value="{Binding Length, UpdateSourceTrigger=LostFocus}" VerticalContentAlignment="Center" + StringFormat="0.0" AutoCalculateJogStep="False" + HasDecimalPoint="True" Minimum="1" Maximum="100000" + KeyboardContainer="{Binding ElementName=Container}" + FontSize="18" ValueChangedEnd="Length_ValueChanged" + TextGotFocus="Length_BeforeChangeValue" RippleBrush="Transparent"/> + </Border> + + + </DockPanel> + + <Border Grid.Row="1" x:Name="segmentBrush" Height="90" Margin="0 20 0 0" CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}"> + + <Border Background="{Binding SegmentBrush}" CornerRadius="20"> + <Grid> + <touch:TouchButton Margin="26 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ElementName=segmentsGrid,Path=DataContext.EditColorCommand}" CommandParameter="{Binding FirstBrushStop}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityConverter}}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0"> + <Border Height="40" Width="40" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/Edit_color.png"/> + </Border> + </touch:TouchButton> + <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"> + <!--<touch:TouchIconButton Command="{Binding ElementName=view,Path=DataContext.AddColorCommand}" CommandParameter="{Binding}" + Height="40" Width="40" Style="{StaticResource TangoRoundTouchIconButton}" Icon="Plus" Background="{StaticResource TangoRippleDarkBrush}" Foreground="{StaticResource TangoLightForegroundBrush}" Padding="12" Margin="20 0 0 0" />--> + <touch:TouchButton Margin="0 0 0 0" VerticalAlignment="Center" Command="{Binding ElementName=segmentsGrid,Path=DataContext.AddColorCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" BorderBrush="Transparent" RippleBrush="Transparent" + Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <Border Height="40" Width="40" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/AddColor.png"/> + </Border> + </touch:TouchButton> + <TextBlock VerticalAlignment="Center" Margin="20 5 0 0" FontSize="{StaticResource TangoSmallFontSize}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}">Add Color</TextBlock> + </StackPanel> + </Grid> + </Border> + </Border> + + <Grid Grid.Row="2" Margin="0 10 0 0" x:Name="colorSpacesSegment" > + <ContentControl x:Name="basicColorSpaceValues" Focusable="False" VerticalAlignment="Top" Margin="0 0 0 0" HorizontalAlignment="Left" Content="{Binding FirstBrushStop}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityConverter}}"> + <ContentControl.Style> + <Style TargetType="ContentControl"> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate/> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="HSB"> + <Setter Property="ContentTemplate" Value="{StaticResource HSB_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="RGB"> + <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="Volume"> + <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="LAB"> + <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="Catalog"> + <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" /> + </DataTrigger> + </Style.Triggers> + </Style> + </ContentControl.Style> + </ContentControl> + </Grid> + </Grid> + </Grid> + </Grid> </touch:TouchDropShadowBorder> </Grid> @@ -964,7 +1072,19 @@ <Border.Effect> <DropShadowEffect Opacity="0.5" ShadowDepth="6" Color="Silver" BlurRadius="10" Direction="270"/> </Border.Effect> - <UniformGrid Columns="5" Rows="1" DockPanel.Dock="Left" HorizontalAlignment="Stretch" > + <UniformGrid Columns="7" Rows="1" HorizontalAlignment="Stretch" Margin="0 0 70 0"> + <touch:TouchButton Style="{StaticResource TouchButtonWithDisableState}" MinHeight="50" Padding="4" Margin="20 0 0 0" EnableDropShadow="False" VerticalAlignment="Center" HorizontalAlignment="Center" Command="{Binding UndoCommand}" > + <StackPanel Orientation="Vertical" VerticalAlignment="Center" > + <Image Width="20" MaxWidth="50" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/undo.png"/> + <TextBlock FontWeight="Medium" Margin="0 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Undo</TextBlock> + </StackPanel> + </touch:TouchButton> + <touch:TouchButton Margin="0 0 0 0" Style="{StaticResource TouchButtonWithDisableState}" MinHeight="50" Padding="4" EnableDropShadow="False" VerticalAlignment="Center" HorizontalAlignment="Center" Command="{Binding RedoCommand}" > + <StackPanel Orientation="Vertical" VerticalAlignment="Center" > + <Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/redo.png"/> + <TextBlock FontWeight="Medium" Margin="0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Redo</TextBlock> + </StackPanel> + </touch:TouchButton> <touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding RepeateSegmentCommand}" IsEnabled="{Binding JobModel.HasSelectedItems}"> <StackPanel Orientation="Vertical" VerticalAlignment="Center" > <Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/repeat.png"/> @@ -1012,13 +1132,13 @@ </StackPanel> </Grid>--> </DockPanel> - <!--<Canvas Width="70" Height="70" Margin="0 3 40 0" HorizontalAlignment="Right" VerticalAlignment="Center"> + <Canvas Width="70" Height="70" Margin="0 3 40 0" HorizontalAlignment="Right" VerticalAlignment="Center" Visibility="{Binding IsBasicMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <touch:TouchButton HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding JobModeSwitchCommand}" > <Border BorderThickness="0" Background="Transparent" HorizontalAlignment="Right"> <Image Height="70" Width="70" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/job_mode.png"/> </Border> </touch:TouchButton> - </Canvas>--> + </Canvas> </Grid> </Grid> @@ -1027,15 +1147,22 @@ <touch:TouchExpander x:Name="summaryExpander" IsExpanded="{Binding IsSummaryOpened, Mode=TwoWay}" Grid.Row="3" Margin="15 0 15 0 " FontSize="{StaticResource TangoTitleFontSize}" BorderThickness="0" Style="{StaticResource TouchRoundedExpander}"> <touch:TouchExpander.Header> <DockPanel > - <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 20 0" Visibility="{Binding IsSummaryOpened, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}"> - <touch:TouchButton HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding RepeatUnitsCommand}" > - <Border CornerRadius="20" Width="130" Height="40" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}"> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}">Repeat All</TextBlock> - </Border> - </touch:TouchButton> - <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" FontWeight="SemiBold" Foreground="{StaticResource TangoPrimaryAccentBrush}"> - <Run Text="x"></Run> - <Run Text="{Binding JobModel.NumberOfUnits,Mode=OneWay}"/> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 20 0" > + + <TextBlock VerticalAlignment="Center" Margin="0 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" Visibility="{Binding IsSummaryOpened, Converter={StaticResource BooleanToVisibilityInverseConverter}, Mode=TwoWay}"> + <Run Text="Copy:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.Length,Mode=OneWay}" FontWeight="DemiBold"/> + <Run Text="m" FontWeight="DemiBold"></Run> + </TextBlock> + <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" Visibility="{Binding IsSummaryOpened, Converter={StaticResource BooleanToVisibilityInverseConverter}, Mode=TwoWay}"> + <Run Text="Total:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.LengthIncludingNumberOfUnitsAndSpools,Mode=OneWay}" FontWeight="DemiBold"/> + <Run Text="m" FontWeight="DemiBold"></Run> + </TextBlock> + <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Foreground="{StaticResource TangoDarkForegroundBrush}"> + <Run Text="Duration: "></Run> + <Run Text="{Binding JobModel.GetEstimatedDuration, Converter={StaticResource TimeSpanToHoursConverter}, FallbackValue=0, Mode=OneWay,StringFormat=0.0}"></Run> + <Run Text="h"></Run> </TextBlock> </StackPanel> <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}"> @@ -1045,13 +1172,18 @@ </DockPanel> </touch:TouchExpander.Header> - <StackPanel Margin="40 0 40 0"> - <TextBlock VerticalAlignment="Top" DockPanel.Dock="Top" Foreground="{StaticResource TangoDarkForegroundBrush}"> + <Grid Margin="40 0 40 0"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="Auto"/> + <RowDefinition Height="Auto"/> + </Grid.RowDefinitions> + <!--<TextBlock VerticalAlignment="Top" DockPanel.Dock="Top" Foreground="{StaticResource TangoDarkForegroundBrush}"> <Run Text="Unit: "></Run> <Run Text="{Binding JobModel.Length,Mode=OneWay}"/> <Run Text="m"></Run> - </TextBlock> - + </TextBlock>--> + <Grid Margin=" 0 10 0 0"> <!--<touch:TouchVirtualizedContentReplaceControl MinHeight="40"> <DataTemplate>--> @@ -1059,10 +1191,40 @@ <!--</DataTemplate> </touch:TouchVirtualizedContentReplaceControl>--> </Grid> - - <DockPanel Margin="0 20 0 0" LastChildFill="False"> - - <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center"> + <UniformGrid Grid.Row="1" Margin="0 40 0 0" Columns="4" Rows="1" HorizontalAlignment="Stretch" > + <TextBlock Text="Total:" FontWeight="DemiBold" FontSize="{StaticResource TangoDefaultFontSize}"></TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Copy:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.Length,Mode=OneWay}" FontWeight="DemiBold"/> + <Run Text="m" FontWeight="DemiBold"></Run> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Copies:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.NumberOfUnitsMultipliedBySpools,Mode=OneWay}" FontWeight="DemiBold"/> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Total:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.LengthIncludingNumberOfUnitsAndSpools,Mode=OneWay}" FontWeight="DemiBold"/> + <Run Text="m" FontWeight="DemiBold"></Run> + </TextBlock> + </UniformGrid> + <UniformGrid Grid.Row="2" Margin="0 40 0 0" Columns="4" Rows="1" HorizontalAlignment="Stretch"> + <TextBlock Text="Per Copy:" FontWeight="DemiBold" FontSize="{StaticResource TangoDefaultFontSize}"></TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Spools:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.NumberSpools,Mode=OneWay}" FontWeight="DemiBold"/> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Copies:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.NumberOfUnits,Mode=OneWay}" FontWeight="DemiBold"/> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}"> + <Run Text="Total:" FontWeight="Normal"></Run> + <Run Text="{Binding JobModel.LengthIncludingNumberOfUnits,Mode=OneWay}" FontWeight="DemiBold"/> + <Run Text="m" FontWeight="DemiBold"></Run> + </TextBlock> + </UniformGrid> + <!--<StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center"> <TextBlock> <Run Text="Total:"></Run> <Run Text="{Binding JobModel.LengthIncludingNumberOfUnits,Mode=OneWay}"></Run> @@ -1081,22 +1243,10 @@ </TextBlock.Style> <Run>(</Run><Run Text="{Binding JobModel.Length,Mode=OneWay}"></Run><Run>+</Run><Run Text="{Binding JobModel.LengthPercentageFactor,Mode=OneWay}"></Run><Run>%</Run><Run>)</Run> </TextBlock> - </StackPanel> - - <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0"> - <TextBlock Margin="0 3 0 0" VerticalAlignment="Bottom"> - <!--<Run Text="Factor: +"></Run>--> - <Run Text="Duration: "></Run> - <Run Text="{Binding JobModel.GetEstimatedDuration, Converter={StaticResource TimeSpanToMinutesConverter},FallbackValue=0, Mode=OneWay,StringFormat=0.0}"></Run> - <Run Text="min"></Run> - </TextBlock> + </StackPanel>--> - <!--<touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding JobModel.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" /> - - <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>--> - </StackPanel> - </DockPanel> - </StackPanel> + + </Grid> </touch:TouchExpander> </Border> <!--</touch:TouchDropShadowBorder>--> 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 f81b493ff..402af001c 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="1280" Height="1280"> + <Grid Background="Gainsboro" Grid.Column="2" Width="960" 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 ca7aa957b..243fa8584 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -22,7 +22,7 @@ </Style> </UserControl.Resources> - <Grid Width="1280" Height="1280"> + <Grid Width="960" Height="1280"> <Grid.ColumnDefinitions> <ColumnDefinition Width="32"></ColumnDefinition> <ColumnDefinition Width="1*"></ColumnDefinition> diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs index 15c516124..47b3670a7 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs @@ -112,6 +112,17 @@ namespace Tango.Touch.Controls } public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null)); + + public double Step + { + get { return (double)GetValue(StepProperty); } + set { SetValue(StepProperty, value); } + } + + public static readonly DependencyProperty StepProperty = + DependencyProperty.Register("Step", typeof(double), typeof(TouchNumericTextBox), new PropertyMetadata(null)); + + public double JoggingFactor { @@ -198,6 +209,14 @@ namespace Tango.Touch.Controls { value = Math.Round(value, 0); } + if (Step > 0) + { + value = Math.Round(value / Step, MidpointRounding.AwayFromZero) * Step; + } + if(Minimum > 0 && value < Minimum) + { + value = Minimum; + } if (Maximum > Minimum) { @@ -209,6 +228,7 @@ namespace Tango.Touch.Controls { value = Maximum; } + } } diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.cs index 79afdfaab..b1e7080fc 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.cs @@ -105,6 +105,48 @@ namespace Tango.Touch.Controls } public static readonly DependencyProperty CheckedThumbContentTemplateProperty = DependencyProperty.Register("CheckedThumbContentTemplate", typeof(DataTemplate), typeof(TouchToggleSlider), new PropertyMetadata(null)); + + public String LeftText + { + get { return (String)GetValue(LeftTextProperty); } + set { SetValue(LeftTextProperty, value); } + } + + public static readonly DependencyProperty LeftTextProperty = + DependencyProperty.Register("LeftText", typeof(String), typeof(TouchToggleSlider), new PropertyMetadata("")); + + public CornerRadius ThumbCornerRadius + { + get { return (CornerRadius)GetValue(ThumbCornerRadiusProperty); } + set { SetValue(ThumbCornerRadiusProperty, value); } + } + public static readonly DependencyProperty ThumbCornerRadiusProperty = + DependencyProperty.Register("ThumbCornerRadius", typeof(CornerRadius), typeof(TouchToggleSlider), new PropertyMetadata(default(CornerRadius))); + + public String RightText + { + get { return (String)GetValue(RightTextProperty); } + set { SetValue(RightTextProperty, value); } + } + + // Using a DependencyProperty as the backing store for RightText. This enables animation, styling, binding, etc... + public static readonly DependencyProperty RightTextProperty = + DependencyProperty.Register("RightText", typeof(String), typeof(TouchToggleSlider), new PropertyMetadata("")); + + + + public int ThumbWidth + { + get { return (int)GetValue(ThumbWidthProperty); } + set { SetValue(ThumbWidthProperty, value); } + } + + // Using a DependencyProperty as the backing store for ThumbWidth. This enables animation, styling, binding, etc... + public static readonly DependencyProperty ThumbWidthProperty = + DependencyProperty.Register("ThumbWidth", typeof(int), typeof(TouchToggleSlider), new PropertyMetadata(0)); + + + public TouchToggleSlider() { @@ -120,6 +162,7 @@ namespace Tango.Touch.Controls { base.OnApplyTemplate(); _grid_ellipse = GetTemplateChild("PART_GridEllipse") as Grid; + SetThumbPosition(); } protected override void OnChecked(RoutedEventArgs e) @@ -143,7 +186,15 @@ namespace Tango.Touch.Controls if (IsChecked.Value) { - ani.To = new Thickness(ActualWidth - _grid_ellipse.ActualWidth - 4, 0, 0, 0); + if (ActualWidth != 0 && _grid_ellipse.ActualWidth == 0) + { + ani.To = new Thickness(ActualWidth - (ActualWidth/2) - 4, 0, 0, 0); + } + else + { + ani.To = new Thickness(ActualWidth - _grid_ellipse.ActualWidth - 4, 0, 0, 0); + } + } else { diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml index 7d26fdcff..adb76ebd3 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleSlider.xaml @@ -62,7 +62,7 @@ </Grid> </Grid> - <Grid HorizontalAlignment="Left" x:Name="PART_GridEllipse"> + <Grid HorizontalAlignment="Left" x:Name="PART_GridEllipse" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"> <Grid Margin="4" x:Name="ellipse" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"> <Ellipse Fill="{TemplateBinding ThumbBrush}"></Ellipse> @@ -133,16 +133,111 @@ </Style> <Style x:Key="TangoToggleButtonGreenAccent" TargetType="{x:Type local:TouchToggleSlider}" BasedOn="{StaticResource {x:Type local:TouchToggleSlider}}"> - <Setter Property="BorderBrush" Value="{StaticResource TangoGrayTextBrush}"></Setter> - <Setter Property="ThumbBrush" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> <Setter Property="CheckedBackground" Value="{StaticResource TangoGreenBrush}"/> <Setter Property="UncheckedBackground" Value="{StaticResource TangoDividerBrush}"/> + <Setter Property="CornerRadius" Value="20"></Setter> + <Setter Property="BorderThickness" Value="2"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource TangoRippleLightBrush}"></Setter> + <Setter Property="ThumbBrush" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> + <Style.Triggers> + <Trigger Property="IsChecked" Value="True"> + <Trigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource RippleLightColor}" Duration="00:00:0.2"></ColorAnimation> + <ColorAnimation Storyboard.TargetProperty="ThumbBrush.Color" To="{StaticResource TangoPrimaryBackgroundColor}" Duration="00:00:0.2"></ColorAnimation> + </Storyboard> + </BeginStoryboard> + </Trigger.EnterActions> + <Trigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource RippleLightColor}" Duration="00:00:0.2"></ColorAnimation> + <ColorAnimation Storyboard.TargetProperty="ThumbBrush.Color" To="{StaticResource TangoPrimaryBackgroundColor}" Duration="00:00:0.2"></ColorAnimation> + </Storyboard> + </BeginStoryboard> + </Trigger.ExitActions> + </Trigger> + </Style.Triggers> + </Style> + + <Style x:Key="TouchToggleButtonSlider" TargetType="{x:Type local:TouchToggleSlider}" BasedOn="{StaticResource {x:Type local:TouchToggleSlider}}"> + <Setter Property="BorderThickness" Value="1"></Setter> + <Setter Property="UncheckedBackground" Value="Transparent"></Setter> + <Setter Property="CheckedBackground" Value="Transparent"></Setter> + <Setter Property="ThumbBrush" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource TangoDividerBrush}"/> + <Setter Property="Foreground" Value="White"/> + <Setter Property="CornerRadius" Value="20"></Setter> + <Setter Property="ThumbCornerRadius" Value="18"/> + <Setter Property="LeftText" Value="Left"/> + <Setter Property="RightText" Value="Right"/> + <Setter Property="ThumbWidth" Value="40"/> + + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:TouchToggleSlider}"> + <Border> + <components:Ripple CornerRadius="{TemplateBinding CornerRadius}" Centered="True" RippleBrush="{StaticResource TangoRippleDarkBrush}"> + <Border + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> + <Border.Effect> + <DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.5"/> + </Border.Effect> + + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=UncheckedBackground}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=IsChecked}" Value="True"> + <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=CheckedBackground}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <Grid> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" /> + <ColumnDefinition Width="1*" /> + </Grid.ColumnDefinitions> + + <Grid Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=IsChecked,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <TextBlock Text="{TemplateBinding RightText}" Foreground="{StaticResource TangoDisabledForegroundBrush}"></TextBlock> + </Grid> + + <Grid Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock Text="{TemplateBinding LeftText}" Foreground="{StaticResource TangoDisabledForegroundBrush}"></TextBlock> + </Grid> + </Grid> + + <Grid HorizontalAlignment="Left" x:Name="PART_GridEllipse"> + <Grid Margin="4" x:Name="ellipse" Width="{Binding RelativeSource={ RelativeSource AncestorType=local:TouchToggleSlider},Path=ThumbWidth}"> + <Border Background="{StaticResource TangoMidAccentBrush}" CornerRadius="{TemplateBinding ThumbCornerRadius}" Width="{Binding RelativeSource={ RelativeSource AncestorType=local:TouchToggleSlider},Path=ThumbWidth}"></Border> + + <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=IsChecked,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <TextBlock Text="{TemplateBinding LeftText}"></TextBlock> + </Grid> + + <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchToggleSlider},Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock Text="{TemplateBinding RightText}"></TextBlock> + </Grid> + </Grid> + </Grid> + </Grid> + </Border> + </components:Ripple> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> <Style.Triggers> <Trigger Property="IsChecked" Value="True"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> - <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource TangoGrayTextColor}" Duration="00:00:0.2"></ColorAnimation> + <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource TangoDividerColor}" Duration="00:00:0.2"></ColorAnimation> <ColorAnimation Storyboard.TargetProperty="ThumbBrush.Color" To="{StaticResource TangoPrimaryBackgroundColor}" Duration="00:00:0.2"></ColorAnimation> </Storyboard> </BeginStoryboard> @@ -150,7 +245,7 @@ <Trigger.ExitActions> <BeginStoryboard> <Storyboard> - <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource TangoGrayTextColor}" Duration="00:00:0.2"></ColorAnimation> + <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="{StaticResource TangoDividerColor}" Duration="00:00:0.2"></ColorAnimation> <ColorAnimation Storyboard.TargetProperty="ThumbBrush.Color" To="{StaticResource TangoPrimaryBackgroundColor}" Duration="00:00:0.2"></ColorAnimation> </Storyboard> </BeginStoryboard> |
