aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-04-22 09:33:28 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-04-22 09:33:28 +0300
commit13887d7b53fec7e2d357fd377a6a1fbd0e875e65 (patch)
treef400c960cc086a6615de95d155b5da19044e37b6 /Software/Visual_Studio
parent26ede873b194b0df70979b6f1b62e0c91ca19341 (diff)
downloadTango-13887d7b53fec7e2d357fd377a6a1fbd0e875e65.tar.gz
Tango-13887d7b53fec7e2d357fd377a6a1fbd0e875e65.zip
Working on PPC optimizations...
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml20
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml1128
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml4
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs12
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Segment.cs1
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs14
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Controls/FastTextBlock.cs28
-rw-r--r--Software/Visual_Studio/Tango.Touch/Components/SharedResourceDictionary.cs55
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.cs4
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs5
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml22
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs14
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml124
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs42
-rw-r--r--Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml4
-rw-r--r--Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml4
-rw-r--r--Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj1
24 files changed, 875 insertions, 674 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
index e7a416623..be151678d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobSummeryViewer.xaml
@@ -7,7 +7,7 @@
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Controls"
mc:Ignorable="d"
- d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=entities:Job, IsDesignTimeCreatable=False}">
+ d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=entities:Job, IsDesignTimeCreatable=False}" x:Name="control">
<Grid>
<Grid.ColumnDefinitions>
@@ -20,7 +20,7 @@
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayMarkers,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayMarkers,Converter={StaticResource BooleanToVisibilityConverter}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -28,12 +28,12 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <Grid>
+ <Grid x:Name="grid">
<Grid.Width>
<MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}">
- <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length"></Binding>
- <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding>
- <Binding Path="LengthWithFactor"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Length" IsAsync="True"></Binding>
+ <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth" IsAsync="True"></Binding>
+ <Binding Path="LengthWithFactor" IsAsync="True"></Binding>
</MultiBinding>
</Grid.Width>
@@ -42,13 +42,13 @@
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth,Converter={StaticResource SmallerThanToBooleanConverter},ConverterParameter=20}" Value="True">
+ <DataTrigger Binding="{Binding ElementName=grid,Path=ActualWidth,Converter={StaticResource SmallerThanToBooleanConverter},ConverterParameter=20}" Value="True">
<Setter Property="Visibility" Value="Collapsed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
- <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0}"></Run><Run Text="m"></Run>
+ <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0,IsAsync=True}"></Run><Run Text="m"></Run>
</TextBlock>
</Grid>
</DataTemplate>
@@ -67,7 +67,7 @@
</RectangleGeometry>
</Border.Clip>
<Grid>
- <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments}">
+ <ItemsControl ClipToBounds="False" ItemsSource="{Binding EffectiveSegments,IsAsync=True}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -102,7 +102,7 @@
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}" />
- <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=IsActive}" Value="False" />
+ <Condition Binding="{Binding ElementName=control,Path=IsActive}" Value="False" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index 9aaf9fcbd..c7946ee6a 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -396,7 +396,8 @@ namespace Tango.PPC.Jobs.ViewModels
{
LogManager.Log($"Loading selected job '{_job_to_load.Name}'...");
- NotificationProvider.SetGlobalBusyMessage("Loading job details...");
+ //NotificationProvider.SetGlobalBusyMessage("Loading job details...");
+ IsFree = false;
_can_navigate_back = false;
@@ -433,10 +434,6 @@ namespace Tango.PPC.Jobs.ViewModels
SegmentsCollectionView = CollectionViewSource.GetDefaultView(Job.Segments);
SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending));
- InvokeUIOnIdle(() =>
- {
- NotificationProvider.ReleaseGlobalBusyMessage();
- });
_job_to_load = null;
}
@@ -471,10 +468,16 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log(ex, $"Error loading job '{_job_to_load.Name}'");
await NotificationProvider.ShowError("An error occurred while trying to load the selected job.");
}
+ finally
+ {
+ InvokeUIOnIdle(() =>
+ {
+ IsFree = true;
+ //NotificationProvider.ReleaseGlobalBusyMessage();
+ });
+ }
}
-
-
/// <summary>
/// Saves the job.
/// </summary>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
index 893cdc973..cb12805f5 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
@@ -17,11 +17,15 @@
xmlns:localControls="clr-namespace:Tango.PPC.Jobs.Controls"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
mc:Ignorable="d"
- d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}">
+ d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}" x:Name="view">
<UserControl.Resources>
<localConverters:ColorSpaceToVisibilityConverter x:Key="ColorSpaceToVisibilityConverter" />
+ <BitmapImage x:Key="Image_Out_Of_Gamut" UriSource="../Images/JobView/error.png" />
+ <BitmapImage x:Key="Image_Replace_Color" UriSource="../Images/JobView/replace-color.png" />
+ <BitmapImage x:Key="Image_Color_Picker" UriSource="../Images/JobView/color-picker.png" />
+
<Style TargetType="FrameworkElement" x:Key="Level1Container">
<Setter Property="Margin" Value="20 15 60 15"></Setter>
@@ -61,7 +65,7 @@
<DataTemplate x:Key="TWINE_Template" DataType="{x:Type entities:BrushStop}">
<DockPanel>
<touch:TouchIconButton Margin="0 0 -40 0" CornerRadius="50" Width="32" Height="32" Padding="5" RippleBrush="{StaticResource TangoRippleDarkBrush}" DockPanel.Dock="Right" Icon="Palette" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenTwineCatalogCommand}" CommandParameter="{Binding}"></touch:TouchIconButton>
- <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TwineCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TwineCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
+ <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding ElementName=view,Path=DataContext.TwineCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding ElementName=view,Path=DataContext.TwineCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
<touch:TouchAutoComplete.ItemTemplate>
<DataTemplate>
<DockPanel Margin="2">
@@ -84,7 +88,7 @@
<StackPanel Orientation="Horizontal">
<Border Width="48" Height="48" CornerRadius="5" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
<Border.Background>
- <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ <SolidColorBrush Color="{Binding Color,IsAsync=True}"></SolidColorBrush>
</Border.Background>
</Border>
@@ -94,22 +98,26 @@
</StackPanel>
<DockPanel LastChildFill="False" Margin="0 20 0 0">
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Color code:</TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Color code:</controls:FastTextBlock>
<ContentControl Focusable="False" Margin="20 0 0 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="300" Content="{Binding}">
<ContentControl.Style>
<Style TargetType="ContentControl">
- <Setter Property="ContentTemplate" Value="{x:Null}"></Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate/>
+ </Setter.Value>
+ </Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="RGB">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="RGB">
<Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="CMYK">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="CMYK">
<Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="LAB">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="Twine">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
<Setter Property="ContentTemplate" Value="{StaticResource TWINE_Template}" />
</DataTrigger>
</Style.Triggers>
@@ -118,11 +126,11 @@
</ContentControl>
</DockPanel>
- <Canvas Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
- <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock>
+ <Canvas Visibility="{Binding IsOutOfGamut,IsAsync=True,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <controls:FastTextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></controls:FastTextBlock>
</Canvas>
- <DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle}">
+ <DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle,IsAsync=True}">
<TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left">Position (m):</TextBlock>
<Grid Margin="20 0 0 0" Width="300" DockPanel.Dock="Right">
<Grid.ColumnDefinitions>
@@ -130,21 +138,24 @@
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
- <touch:TouchNumericTextBox Value="{Binding OffsetMeters}" HasDecimalPoint="True" StringFormat="0.0" Maximum="{Binding Segment.Length}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
+ <touch:TouchNumericTextBox Value="{Binding OffsetMeters,IsAsync=True}" HasDecimalPoint="True" StringFormat="0.0" Maximum="{Binding Segment.Length,IsAsync=True}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
<!--<touch:TouchSlider Grid.Column="1" Height="30" Margin="10 0 0 -23" Maximum="{Binding Segment.Length}" Value="{Binding OffsetMeters}" />-->
</Grid>
</DockPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 0 -130 0" HorizontalAlignment="Right" VerticalAlignment="Top">
- <touch:TouchImageButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding}" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}" Width="50" Height="50" Padding="10" Image="../Images/JobView/replace-color.png" CornerRadius="30"></touch:TouchImageButton>
- <touch:TouchIconButton Margin="0 0 50 0" Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveBrushStopCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
+ <touch:TouchImageButton Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand,IsAsync=True}" CommandParameter="{Binding}" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30"></touch:TouchImageButton>
+ <touch:TouchIconButton Margin="0 0 50 0" Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding ElementName=view,Path=DataContext.RemoveBrushStopCommand,IsAsync=True}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
</StackPanel>
</Grid>
</DataTemplate>
<DataTemplate x:Key="Segment_Template" DataType="{x:Type entities:Segment}">
<Border Margin="0 0 0 15" RenderOptions.EdgeMode="Unspecified" CornerRadius="8" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
+ <Border.CacheMode>
+ <BitmapCache RenderAtScale="1" SnapsToDevicePixels="True" />
+ </Border.CacheMode>
<!--<Border.Effect>
<DropShadowEffect Opacity="0.5" Color="{StaticResource TangoDropShadowColor}" BlurRadius="10" ShadowDepth="15" />
</Border.Effect>-->
@@ -153,7 +164,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
- <Grid Background="Transparent" dragAndDrop:DragAndDropService.DropCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SegmentDroppedCommand}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding ElementName=DraggingSurface}">
+ <Grid Background="Transparent" dragAndDrop:DragAndDropService.DropCommand="{Binding ElementName=view,Path=DataContext.SegmentDroppedCommand}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.Droppable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding ElementName=DraggingSurface}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Opacity" Value="1"></Setter>
@@ -169,7 +180,7 @@
<Style TargetType="DockPanel">
<Setter Property="Height" Value="163"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked}" Value="True">
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked,IsAsync=True}" Value="True">
<Setter Property="Height" Value="74"></Setter>
</DataTrigger>
</Style.Triggers>
@@ -179,15 +190,15 @@
<Border.Style>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="8 0 0 8"></Setter>
- <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,IsAsync=True}"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked}" Value="True">
- <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*2'}"></Setter>
+ <DataTrigger Binding="{Binding ElementName=toggle_small_list,Path=IsChecked,IsAsync=True}" Value="True">
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*2',IsAsync=True}"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="True"></Condition>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True"></Condition>
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True"></Condition>
+ <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked,IsAsync=True}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<Setter Property="CornerRadius" Value="8 0 0 0"></Setter>
</MultiDataTrigger>
@@ -199,46 +210,52 @@
<Grid>
<DockPanel Margin="30 0" VerticalAlignment="Center">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
- <Canvas Visibility="{Binding HasOutOfGamutBrushStop,Converter={StaticResource BooleanToVisibilityConverter}}">
- <Image Canvas.Left="-25" Canvas.Top="1" Source="../Images/JobView/error.png" Width="19" Height="19" />
+ <Canvas Visibility="{Binding HasOutOfGamutBrushStop,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}">
+ <Image Canvas.Left="-25" Canvas.Top="1" Source="{StaticResource Image_Out_Of_Gamut}" Width="19" Height="19" />
</Canvas>
<TextBlock FontSize="{StaticResource TangoTitleFontSize}">
<Run>Segment #</Run>
- <Run Text="{Binding SegmentIndex,Mode=OneWay}"></Run>
+ <Run Text="{Binding SegmentIndex,Mode=OneWay,IsAsync=True}"></Run>
</TextBlock>
</StackPanel>
- <StackPanel Margin="0 30 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="300" Visibility="{Binding ElementName=toggle_large_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel Margin="0 30 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="300" Visibility="{Binding ElementName=toggle_large_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}">
<DockPanel LastChildFill="False">
<DockPanel.Style>
<Style TargetType="DockPanel">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="True">
+ <DataTrigger Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True">
<Setter Property="Visibility" Value="Collapsed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</DockPanel.Style>
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Color code:"></TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Color code:"></controls:FastTextBlock>
- <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0]}">
+ <Grid DockPanel.Dock="Right" DataContext="{Binding BrushStops[0],IsAsync=True}">
<StackPanel>
<ContentControl Focusable="False" FocusVisualStyle="{x:Null}" d:DataContext="{d:DesignInstance Type=entities:BrushStop, IsDesignTimeCreatable=False}" Content="{Binding}" Width="180">
<ContentControl.Style>
<Style TargetType="ContentControl">
- <Setter Property="ContentTemplate" Value="{x:Null}"></Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="RGB">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="RGB">
<Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="CMYK">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="CMYK">
<Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="LAB">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Job.ColorSpace.Name}" Value="Twine">
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
<Setter Property="ContentTemplate" Value="{StaticResource TWINE_Template}" />
</DataTrigger>
</Style.Triggers>
@@ -255,27 +272,27 @@
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut}" Value="True" />
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="False" />
+ <Condition Binding="{Binding BrushStops[0].IsOutOfGamut,IsAsync=True}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Canvas.Style>
- <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock>
+ <controls:FastTextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></controls:FastTextBlock>
</Canvas>
<DockPanel LastChildFill="False" Margin="0 20 0 0">
- <TextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></TextBlock>
- <touch:TouchNumericTextBox Width="180" DockPanel.Dock="Right" Value="{Binding Length}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" />
+ <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):"></controls:FastTextBlock>
+ <touch:TouchNumericTextBox Width="180" DockPanel.Dock="Right" Value="{Binding Length,IsAsync=True}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" />
</DockPanel>
</StackPanel>
</DockPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 10 10 0">
- <TextBlock Visibility="{Binding ElementName=toggle_small_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding Length,StringFormat={}{0:N1} m}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
+ <controls:FastTextBlock Visibility="{Binding ElementName=toggle_small_list,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding Length,StringFormat={}{0:N1} m}">
+ <controls:FastTextBlock.Style>
+ <Style TargetType="controls:FastTextBlock">
<Setter Property="Margin" Value="0 16 20 0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=toggleEdit,Path=IsChecked}" Value="True">
@@ -283,19 +300,19 @@
</DataTrigger>
</Style.Triggers>
</Style>
- </TextBlock.Style>
- </TextBlock>
+ </controls:FastTextBlock.Style>
+ </controls:FastTextBlock>
- <touch:TouchImageButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding BrushStops[0]}" Width="50" Height="50" Padding="10" Image="../Images/JobView/replace-color.png" CornerRadius="30">
+ <touch:TouchImageButton Command="{Binding ElementName=view,Path=DataContext.ReplaceBrushStopCommand}" CommandParameter="{Binding BrushStops[0]}" Width="50" Height="50" Padding="10" Image="{StaticResource Image_Replace_Color}" CornerRadius="30">
<touch:TouchImageButton.Style>
<Style TargetType="{x:Type touch:TouchImageButton}" BasedOn="{StaticResource {x:Type touch:TouchImageButton}}">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True" />
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="False" />
- <Condition Binding="{Binding BrushStops[0].IsOutOfGamut}" Value="True" />
+ <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked,IsAsync=True}" Value="True" />
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="False" />
+ <Condition Binding="{Binding BrushStops[0].IsOutOfGamut,IsAsync=True}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
@@ -304,9 +321,9 @@
</touch:TouchImageButton.Style>
</touch:TouchImageButton>
- <StackPanel Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
+ <StackPanel Visibility="{Binding ElementName=toggleEdit,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter},IsAsync=True}" Orientation="Horizontal">
- <touch:TouchIconButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
+ <touch:TouchIconButton Command="{Binding ElementName=view,Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Icon="TrashAltRegular" Padding="12" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
<dragAndDrop:DragThumb Background="Transparent" IsHitTestVisible="True">
<touch:TouchIconButton IsHitTestVisible="False" EnableDropShadow="False" Icon="BarsSolid" Padding="15" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="50" Height="50" RippleBrush="{StaticResource TangoRippleDarkBrush}" CornerRadius="30" />
@@ -324,8 +341,8 @@
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
- <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter}}" Value="True"></Condition>
- <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked}" Value="True"></Condition>
+ <Condition Binding="{Binding Converter={StaticResource IsSegmentGradientConverter},IsAsync=True}" Value="True"></Condition>
+ <Condition Binding="{Binding ElementName=toggle_large_list,Path=IsChecked,IsAsync=True}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
@@ -339,14 +356,14 @@
</ItemsControl>
- <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.AddBrushStopCommand}" CommandParameter="{Binding}" Background="Transparent" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontWeight="Normal" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalAlignment="Left" EnableDropShadow="False" Margin="50 30 0 60">
+ <touch:TouchButton Command="{Binding ElementName=view,Path=DataContext.AddBrushStopCommand}" CommandParameter="{Binding}" Background="Transparent" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontWeight="Normal" Foreground="{StaticResource TangoPrimaryAccentBrush}" HorizontalAlignment="Left" EnableDropShadow="False" Margin="50 30 0 60">
<StackPanel Orientation="Horizontal">
<Grid Width="49" Height="49">
<Rectangle Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="5" RadiusY="5"></Rectangle>
<fa:ImageAwesome Icon="Plus" Width="16" Height="16" Foreground="{StaticResource TangoPrimaryAccentBrush}" />
</Grid>
- <TextBlock VerticalAlignment="Center" Margin="20 0 0 0">ADD COLOR</TextBlock>
+ <controls:FastTextBlock VerticalAlignment="Center" Margin="20 0 0 0">ADD COLOR</controls:FastTextBlock>
</StackPanel>
</touch:TouchButton>
</StackPanel>
@@ -356,247 +373,253 @@
</DataTemplate>
</UserControl.Resources>
- <Grid Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
+ <touch:TouchLoadingPanel Grid.Row="1" IsLoading="{Binding IsBusy}">
<Grid>
- <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Grid.RowSpan="2">
- <touch:LightTouchScrollViewer x:Name="scrollViewer" Scrolling="scrollViewer_Scrolling">
- <StackPanel Margin="10 60 10 0">
- <StackPanel>
- <touch:TouchExpander Padding="20 15" IsExpanded="{Binding IsJobDetailsExpanded}">
- <touch:TouchExpander.Header>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
- <Image Source="../Images/JobView/job-details.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock>
- <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center">
+ <Grid.CacheMode>
+ <BitmapCache RenderAtScale="1" SnapsToDevicePixels="False" />
+ </Grid.CacheMode>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid>
+ <Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Grid.RowSpan="2">
+ <touch:LightTouchScrollViewer x:Name="scrollViewer" Scrolling="scrollViewer_Scrolling">
+ <StackPanel Margin="10 60 10 0">
+ <StackPanel>
+ <touch:TouchExpander Padding="20 15" IsExpanded="{Binding IsJobDetailsExpanded}">
+ <touch:TouchExpander.Header>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
+ <Image Source="../Images/JobView/job-details.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock>
+
+ <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center">
<Run Text="{Binding Job.Rml.Name}"></Run><Run>,</Run>
<Run Text="{Binding Job.ColorSpace.Name}"></Run>
- </TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
+ </TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium">
- <controls:TableGrid RowHeight="50">
+ <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium">
+ <controls:TableGrid RowHeight="50">
- <TextBlock>Job name:</TextBlock>
- <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
+ <TextBlock>Job name:</TextBlock>
+ <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" KeyboardMode="AlphaNumeric" FocusSelectionMode="SelectAll" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
- <TextBlock>Customer:</TextBlock>
- <touch:TouchAutoComplete ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
+ <TextBlock>Customer:</TextBlock>
+ <touch:TouchAutoComplete ForceItemSelection="False" Text="{Binding CustomersFilter}" ItemsSource="{Binding Customers}" SelectedItem="{Binding Job.Customer}" DisplayMemberPath="Name" AutoCompleteProvider="{Binding CustomersAutoCompleteProvider}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
- <TextBlock>Thread type:</TextBlock>
- <touch:TouchComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" />
+ <TextBlock>Thread type:</TextBlock>
+ <touch:TouchComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread" />
- <TextBlock>Comment:</TextBlock>
- <TextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="60" Padding="5" keyboard:KeyboardView.Container="{Binding ElementName=Container}" keyboard:KeyboardView.Mode="AlphaNumeric">
+ <TextBlock>Comment:</TextBlock>
+ <TextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="60" Padding="5" keyboard:KeyboardView.Container="{Binding ElementName=Container}" keyboard:KeyboardView.Mode="AlphaNumeric">
- </TextBox>
- </controls:TableGrid>
+ </TextBox>
+ </controls:TableGrid>
- <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
+ <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
- <TextBlock HorizontalAlignment="Left">
+ <TextBlock HorizontalAlignment="Left">
<Run Text="Job status:"></Run>
<Run Text="{Binding Job.JobStatus}"></Run>
- </TextBlock>
+ </TextBlock>
- <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
+ <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
- <TextBlock Grid.Column="2" HorizontalAlignment="Center">
+ <TextBlock Grid.Column="2" HorizontalAlignment="Center">
<Run Text="Last updated:"></Run>
<Run Text="{Binding Job.LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
- </TextBlock>
+ </TextBlock>
- <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
+ <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />
- <TextBlock Grid.Column="4" HorizontalAlignment="Right">
+ <TextBlock Grid.Column="4" HorizontalAlignment="Right">
<Run Text="Last dye:"></Run>
<Run Text="{Binding Job.LastRun,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
- </TextBlock>
- </Grid>
- </StackPanel>
- </touch:TouchExpander>
-
- <Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
- <Grid>
- <StackPanel>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/color-length.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color &amp; Length</TextBlock>
- </StackPanel>
+ </TextBlock>
+ </Grid>
+ </StackPanel>
+ </touch:TouchExpander>
+ <Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
+ <Grid>
<StackPanel>
- <StackPanel.Style>
- <Style TargetType="StackPanel" BasedOn="{StaticResource Level2Container}">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
- <UniformGrid Columns="2" Rows="1">
- <DockPanel Margin="0 0 10 0">
- <TextBlock Text="Number of units:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfUnits}" Minimum="1" Maximum="10000" JoggingFactor="0.01" />
- </DockPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/color-length.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color &amp; Length</TextBlock>
+ </StackPanel>
- <DockPanel Margin="10 0 0 0">
- <TextBlock Text="Number of heads:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfHeads}" Minimum="1" Maximum="1000" JoggingFactor="0.1" />
- </DockPanel>
- </UniformGrid>
- </StackPanel>
+ <StackPanel>
+ <StackPanel.Style>
+ <Style TargetType="StackPanel" BasedOn="{StaticResource Level2Container}">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Embroidery}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Style>
+ <UniformGrid Columns="2" Rows="1">
+ <DockPanel Margin="0 0 10 0">
+ <TextBlock Text="Number of units:" VerticalAlignment="Center"></TextBlock>
+ <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfUnits}" Minimum="1" Maximum="10000" JoggingFactor="0.01" />
+ </DockPanel>
+
+ <DockPanel Margin="10 0 0 0">
+ <TextBlock Text="Number of heads:" VerticalAlignment="Center"></TextBlock>
+ <touch:TouchNumericTextBox Margin="20 0 0 0" Value="{Binding Job.NumberOfHeads}" Minimum="1" Maximum="1000" JoggingFactor="0.1" />
+ </DockPanel>
+ </UniformGrid>
+ </StackPanel>
- <!--<DockPanel Style="{StaticResource Level2Container}">
+ <!--<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Color Catalog/Space:" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox Margin="20 0 0 0" ItemsSource="{Binding ColorSpaces}" SelectedItem="{Binding Job.ColorSpace}" DisplayMemberPath="Name" Title="Select Color Catalog/Space" />
</DockPanel>-->
- <Border x:Name="borderDockFloat" Height="80">
- <DockPanel x:Name="dockEdit" LastChildFill="False" Style="{StaticResource Level2ContainerExtraMargin}" Height="40" Width="640">
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
- <touch:TouchToggleIconButton x:Name="toggle_small_list" IsChecked="{Binding ElementName=toggle_large_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ListSolid" CheckedIcon="ListSolid" Padding="8" CornerRadius="20" />
- <Rectangle HorizontalAlignment="Left" Stroke="{StaticResource TangoDividerBrush}" Margin="10 8" />
- <touch:TouchToggleIconButton x:Name="toggle_large_list" IsChecked="{Binding ElementName=toggle_small_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ThListSolid" CheckedIcon="ThListSolid" Padding="8" CornerRadius="20" />
- </StackPanel>
+ <Border x:Name="borderDockFloat" Height="80">
+ <DockPanel x:Name="dockEdit" LastChildFill="False" Style="{StaticResource Level2ContainerExtraMargin}" Height="40" Width="640">
+ <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
+ <touch:TouchToggleIconButton x:Name="toggle_small_list" IsChecked="{Binding ElementName=toggle_large_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ListSolid" CheckedIcon="ListSolid" Padding="8" CornerRadius="20" />
+ <Rectangle HorizontalAlignment="Left" Stroke="{StaticResource TangoDividerBrush}" Margin="10 8" />
+ <touch:TouchToggleIconButton x:Name="toggle_large_list" IsChecked="{Binding ElementName=toggle_small_list,Path=IsChecked,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" DockPanel.Dock="Right" Icon="ThListSolid" CheckedIcon="ThListSolid" Padding="8" CornerRadius="20" />
+ </StackPanel>
- <touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />
- </DockPanel>
- </Border>
+ <touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />
+ </DockPanel>
+ </Border>
- <ItemsControl x:Name="listSegments" Style="{StaticResource Level2Container}" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}"></ItemsControl>
+ <ItemsControl x:Name="listSegments" Style="{StaticResource Level2Container}" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}"></ItemsControl>
- <StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
- <touch:TouchButton Command="{Binding AddSolidSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
- <TextBlock Margin="10 0 0 0">SOLID SEGMENT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- <touch:TouchButton Command="{Binding AddGradientSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" Margin="30 0 0 0" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Padding="0 10" Width="200" CornerRadius="20" Background="Transparent" BorderThickness="2">
- <touch:TouchButton.BorderBrush>
- <LinearGradientBrush>
- <GradientStop Offset="0" Color="{StaticResource TangoPrimaryAccentColor}" />
- <GradientStop Offset="1" Color="#57F157" />
- </LinearGradientBrush>
- </touch:TouchButton.BorderBrush>
+ <StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
+ <touch:TouchButton Command="{Binding AddSolidSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
+ <TextBlock Margin="10 0 0 0">SOLID SEGMENT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ <touch:TouchButton Command="{Binding AddGradientSegmentCommand}" FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" Margin="30 0 0 0" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Padding="0 10" Width="200" CornerRadius="20" Background="Transparent" BorderThickness="2">
+ <touch:TouchButton.BorderBrush>
+ <LinearGradientBrush>
+ <GradientStop Offset="0" Color="{StaticResource TangoPrimaryAccentColor}" />
+ <GradientStop Offset="1" Color="#57F157" />
+ </LinearGradientBrush>
+ </touch:TouchButton.BorderBrush>
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
- <TextBlock Margin="10 0 0 0">GRADIENT SEGMENT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
+ <TextBlock Margin="10 0 0 0">GRADIENT SEGMENT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </StackPanel>
- <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
- <DockPanel LastChildFill="False">
- <touch:TouchCheckBox DockPanel.Dock="Left" HorizontalAlignment="Left" IsChecked="{Binding Job.EnableInterSegment}">Include white gap between segments</touch:TouchCheckBox>
- <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
- <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <DockPanel LastChildFill="False">
+ <touch:TouchCheckBox DockPanel.Dock="Left" HorizontalAlignment="Left" IsChecked="{Binding Job.EnableInterSegment}">Include white gap between segments</touch:TouchCheckBox>
+ <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
+ <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
<Run Text="Length (m):"></Run>
- </TextBlock>
+ </TextBlock>
- <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Minimum="1" Maximum="1000" Value="{Binding Job.InterSegmentLength}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
+ <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Minimum="1" Maximum="1000" Value="{Binding Job.InterSegmentLength}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
- <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
- </StackPanel>
- </DockPanel>
- </StackPanel>
+ <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
+ </StackPanel>
+ </DockPanel>
+ </StackPanel>
- <Rectangle Stroke="{StaticResource TangoDividerBrush}" Margin="0 30 0 0" />
+ <Rectangle Stroke="{StaticResource TangoDividerBrush}" Margin="0 30 0 0" />
- <StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/output.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Output</TextBlock>
- </StackPanel>
+ <StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/output.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Output</TextBlock>
+ </StackPanel>
- <!--<DockPanel Style="{StaticResource Level2Container}">
+ <!--<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Output spool (m):" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding Job.SpoolType}" Margin="40 0 0 0" DisplayMemberPath="Name" Title="Select Output Spool" />
</DockPanel>-->
- <DockPanel Style="{StaticResource Level2Container}">
- <TextBlock Text="Segments per spool:" VerticalAlignment="Center"></TextBlock>
- <touch:TouchToggleSlider Margin="30 0 0 0" BorderThickness="2" Height="38" Width="83" HorizontalAlignment="Left" UncheckedContent="One" CheckedContent="All" IsChecked="{Binding Job.IsAllSegmentsPerSpool}" />
- </DockPanel>
- </StackPanel>
- </Grid>
- </Border>
+ <DockPanel Style="{StaticResource Level2Container}">
+ <TextBlock Text="Segments per spool:" VerticalAlignment="Center"></TextBlock>
+ <touch:TouchToggleSlider Margin="30 0 0 0" BorderThickness="2" Height="38" Width="83" HorizontalAlignment="Left" UncheckedContent="One" CheckedContent="All" IsChecked="{Binding Job.IsAllSegmentsPerSpool}" />
+ </DockPanel>
+ </StackPanel>
+ </Grid>
+ </Border>
- <Border Style="{StaticResource TangoTouchBorder}" Margin="0 20 0 0" Padding="0 0 0 50">
- <StackPanel>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <Image Source="../Images/JobView/job-summary.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
- </StackPanel>
+ <Border Style="{StaticResource TangoTouchBorder}" Margin="0 20 0 0" Padding="0 0 0 50">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/JobView/job-summary.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
+ </StackPanel>
- <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
- <Grid>
- <localControls:JobSummeryViewer DataContext="{Binding Job}" />
- </Grid>
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <Grid>
+ <localControls:JobSummeryViewer DataContext="{Binding Job,IsAsync=True}" />
+ </Grid>
- <DockPanel Margin="0 30 0 0" LastChildFill="False">
+ <DockPanel Margin="0 30 0 0" LastChildFill="False">
- <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center">
- <TextBlock>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center">
+ <TextBlock>
<Run Text="Job length (m):"></Run>
<Run Text="{Binding Job.Length,Mode=OneWay}"></Run>
- </TextBlock>
- <TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.LengthPercentageFactor,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=0}" Value="True">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
+ </TextBlock>
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.LengthPercentageFactor,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=0}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
<Run>(</Run><Run Text="{Binding Job.Length,Mode=OneWay}"></Run><Run>+</Run><Run Text="{Binding Job.LengthPercentageFactor,Mode=OneWay}"></Run><Run>%</Run><Run>)</Run>
- </TextBlock>
- </StackPanel>
+ </TextBlock>
+ </StackPanel>
- <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
- <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
+ <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
+ <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Bottom">
<Run Text="Factor: +"></Run>
- </TextBlock>
+ </TextBlock>
- <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding Job.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
+ <touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding Job.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
- <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>
+ <TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>
- <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
- </StackPanel>
- </DockPanel>
+ <Image Margin="10 0 0 0" Source="../Images/JobView/settings.png" VerticalAlignment="Bottom" />
+ </StackPanel>
+ </DockPanel>
+ </StackPanel>
</StackPanel>
- </StackPanel>
- </Border>
+ </Border>
- <StackPanel HorizontalAlignment="Center" Margin="20 40 0 40" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Additional Tools</TextBlock>
- </StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="20 40 0 40" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Additional Tools</TextBlock>
+ </StackPanel>
- <!--<Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
+ <!--<Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/JobView/additional-tools.png" Width="39" />
@@ -618,286 +641,199 @@
</StackPanel>
</Border>-->
- <touch:TouchExpander x:Name="expander_sample_dye" Margin="0 0 0 0" Padding="20 15">
- <touch:TouchExpander.Header>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
- <Image Source="../Images/JobView/sample-dye.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Sample Dye</TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
+ <touch:TouchExpander x:Name="expander_sample_dye" Margin="0 0 0 0" Padding="20 15">
+ <touch:TouchExpander.Header>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
+ <Image Source="../Images/JobView/sample-dye.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Sample Dye</TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <StackPanel>
- <StackPanel Margin="60 20 0 0">
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <TextBlock>
+ <StackPanel>
+ <StackPanel Margin="60 20 0 0">
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock>
<Run>Dye 1 or more units in order to get approval.</Run>
<LineBreak/>
<Run>Once approved, you can dye the entire job.</Run>
- </TextBlock>
+ </TextBlock>
- <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock>
+ <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock>
- <DockPanel Margin="50 0 0 0">
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ <DockPanel Margin="50 0 0 0">
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ </DockPanel>
</DockPanel>
- </DockPanel>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock>
<Run>Dye several meters per segment in order to get approval.</Run>
<LineBreak/>
<Run>Once approved, you can dye the entire job.</Run>
- </TextBlock>
+ </TextBlock>
- <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock>
+ <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock>
- <DockPanel Margin="50 0 0 0">
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
- <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ <DockPanel Margin="50 0 0 0">
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" />
+ <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" />
+ </DockPanel>
</DockPanel>
- </DockPanel>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
- <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
- START
- </touch:TouchButton>
- </StackPanel>
- </Setter.Value>
- </Setter>
+ <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
+ START
+ </touch:TouchButton>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock>How to continue?</TextBlock>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <TextBlock>How to continue?</TextBlock>
- <UniformGrid Columns="2" Width="420" HorizontalAlignment="Left" Margin="0 40 0 20">
- <StackPanel HorizontalAlignment="Left">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveSampleCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Check"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">DONE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <UniformGrid Columns="2" Width="420" HorizontalAlignment="Left" Margin="0 40 0 20">
+ <StackPanel HorizontalAlignment="Left">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveSampleCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Check"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">DONE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">The sample is approved</TextBlock>
- </StackPanel>
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">The sample is approved</TextBlock>
+ </StackPanel>
- <StackPanel HorizontalAlignment="Right">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatSampleDyeCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <StackPanel HorizontalAlignment="Right">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatSampleDyeCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">Dye more samples</TextBlock>
- </StackPanel>
- </UniformGrid>
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">Dye more samples</TextBlock>
+ </StackPanel>
+ </UniformGrid>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.Approved}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 40 80 40">
- <DockPanel LastChildFill="False">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.Approved}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 40 80 40">
+ <DockPanel LastChildFill="False">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
<Run>Sample Approved:</Run>
<Run Text="{Binding Job.SampleDyeApproveDate,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=''}"></Run>
- </TextBlock>
- <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding AnotherSampleCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">ANOTHER SAMPLE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
+ </TextBlock>
+ <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding AnotherSampleCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">ANOTHER SAMPLE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </StackPanel>
+
+ <StackPanel Margin="0 0 0 15">
+ <StackPanel.Style>
+ <Style TargetType="StackPanel">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
- </ContentControl.Style>
- </ContentControl>
- </StackPanel>
-
- <StackPanel Margin="0 0 0 15">
- <StackPanel.Style>
- <Style TargetType="StackPanel">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobSampleDyeStatus}" Value="{x:Static enumerations:SampleDyeStatuses.PendingApproval}">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </StackPanel.Style>
- <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" Margin="-20 30"></Rectangle>
+ </StackPanel.Style>
+ <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" Margin="-20 30"></Rectangle>
- <StackPanel Orientation="Horizontal" Margin="60 0 0 0">
- <touch:TouchIcon Icon="AlertCircleOutline" Width="32" Height="32" StrokeThickness="0.1" Foreground="{StaticResource TangoGrayBrush}" />
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">
+ <StackPanel Orientation="Horizontal" Margin="60 0 0 0">
+ <touch:TouchIcon Icon="AlertCircleOutline" Width="32" Height="32" StrokeThickness="0.1" Foreground="{StaticResource TangoGrayBrush}" />
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">
You can use the color fine tuning tool to adjust the colors.
- </TextBlock>
+ </TextBlock>
+ </StackPanel>
</StackPanel>
</StackPanel>
- </StackPanel>
- </touch:TouchExpander>
+ </touch:TouchExpander>
- <touch:TouchExpander x:Name="expander_fine_tuning" Margin="0 20 0 120" Padding="20 15" IsExpanded="{Binding IsFineTuneExpanded,Mode=TwoWay}" Visibility="{Binding Job.ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter}}">
- <touch:TouchExpander.Header>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
- <Image Source="../Images/JobView/color-fine-tuning.png" Width="39" />
- <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Fine Tuning</TextBlock>
- </StackPanel>
- </touch:TouchExpander.Header>
-
- <StackPanel Margin="60 20 0 0">
-
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <TextBlock>Select the colors you want to fine tune.</TextBlock>
-
- <StackPanel HorizontalAlignment="Center" Margin="0 40 0 0">
- <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Defined Colors</TextBlock>
+ <touch:TouchExpander x:Name="expander_fine_tuning" Margin="0 20 0 120" Padding="20 15" IsExpanded="{Binding IsFineTuneExpanded,Mode=TwoWay}" Visibility="{Binding Job.ColorSpace,Converter={StaticResource ColorSpaceToVisibilityConverter}}">
+ <touch:TouchExpander.Header>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
+ <Image Source="../Images/JobView/color-fine-tuning.png" Width="39" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color Fine Tuning</TextBlock>
+ </StackPanel>
+ </touch:TouchExpander.Header>
- <ItemsControl Margin="0 40 0 0" ItemsSource="{Binding FineTuneItems}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <DockPanel>
- <touch:TouchCheckBox DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" Margin="0 0 20 0" />
- <touch:TouchImageButton DockPanel.Dock="Right" Image="../Images/JobView/color-picker.png" Width="80" Height="80" Padding="15" CornerRadius="100" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.InvokeFineTuningPaletteCommand}" CommandParameter="{Binding}"></touch:TouchImageButton>
- <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}" IsEnabled="False">
- <touch:TouchFlatListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
- </ItemsPanelTemplate>
- </touch:TouchFlatListBox.ItemsPanel>
- <touch:TouchFlatListBox.ItemTemplate>
- <DataTemplate>
- <Ellipse Width="70" Height="70" Fill="{Binding Brush}" Margin="30 0">
- <Ellipse.Style>
- <Style TargetType="Ellipse">
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1" />
- </Setter.Value>
- </Setter>
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="10" Direction="10" BlurRadius="15" Opacity="0" />
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
- <DataTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.2" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.2" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.EnterActions>
- <DataTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.ExitActions>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Ellipse.Style>
- </Ellipse>
- </DataTemplate>
- </touch:TouchFlatListBox.ItemTemplate>
- </touch:TouchFlatListBox>
- </DockPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
+ <StackPanel Margin="60 20 0 0">
- <DockPanel LastChildFill="False" Margin="0 80 0 0">
- <touch:TouchButton Command="{Binding ResetFineTuningCommand}" DockPanel.Dock="Left" Padding="40 10" Margin="-30 0 0 0" Style="{StaticResource TangoFlatButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}">Reset</touch:TouchButton>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <TextBlock>Select the colors you want to fine tune.</TextBlock>
- <touch:TouchButton Margin="0 0 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartFineTuningCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
- START
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.PendingApproval}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 20 0 0">
- <StackPanel Orientation="Horizontal">
- <Grid>
- <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">1</TextBlock>
- </Grid>
- <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">Select the best variation for each color:</TextBlock>
- </StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="0 40 0 0">
+ <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Defined Colors</TextBlock>
- <ItemsControl Margin="65 40 120 0" ItemsSource="{Binding ApprovalFineTuneItems}" AlternationCount="1000">
+ <ItemsControl Margin="0 40 0 0" ItemsSource="{Binding FineTuneItems}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel>
- <TextBlock Margin="0 0 20 0" VerticalAlignment="Center">
- <Run>Color</Run>
- <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run>
- </TextBlock>
- <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}">
+ <touch:TouchCheckBox DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" Margin="0 0 20 0" />
+ <touch:TouchImageButton DockPanel.Dock="Right" Image="{StaticResource Image_Color_Picker}" Width="80" Height="80" Padding="15" CornerRadius="100" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.InvokeFineTuningPaletteCommand}" CommandParameter="{Binding}"></touch:TouchImageButton>
+ <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}" IsEnabled="False">
<touch:TouchFlatListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
@@ -951,107 +887,197 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+ </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 40 0 0">
- <Grid>
- <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">2</TextBlock>
- </Grid>
- <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">How to continue</TextBlock>
- </StackPanel>
-
- <UniformGrid Columns="2" Width="530" HorizontalAlignment="Left" Margin="0 40 0 20">
- <StackPanel HorizontalAlignment="Left">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Check"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">DONE</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <DockPanel LastChildFill="False" Margin="0 80 0 0">
+ <touch:TouchButton Command="{Binding ResetFineTuningCommand}" DockPanel.Dock="Left" Padding="40 10" Margin="-30 0 0 0" Style="{StaticResource TangoFlatButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}">Reset</touch:TouchButton>
- <TextBlock Margin="0 15 0 0" TextAlignment="Center">All colors are approved</TextBlock>
+ <touch:TouchButton Margin="0 0 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartFineTuningCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}">
+ START
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.PendingApproval}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 20 0 0">
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">1</TextBlock>
+ </Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">Select the best variation for each color:</TextBlock>
</StackPanel>
- <StackPanel HorizontalAlignment="Right">
- <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
- </StackPanel>
- </touch:TouchButton>
+ <ItemsControl Margin="65 40 120 0" ItemsSource="{Binding ApprovalFineTuneItems}" AlternationCount="1000">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <TextBlock Margin="0 0 20 0" VerticalAlignment="Center">
+ <Run>Color</Run>
+ <Run>#</Run><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(ItemsControl.AlternationIndex),Mode=OneWay,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}"></Run>
+ </TextBlock>
+ <touch:TouchFlatListBox ItemsSource="{Binding Suggestions}" SelectedItem="{Binding SelectedSuggestion}">
+ <touch:TouchFlatListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Columns="{Binding Suggestions.Count}" Margin="0 20"></UniformGrid>
+ </ItemsPanelTemplate>
+ </touch:TouchFlatListBox.ItemsPanel>
+ <touch:TouchFlatListBox.ItemTemplate>
+ <DataTemplate>
+ <Ellipse Width="70" Height="70" Fill="{Binding Brush}" Margin="30 0">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1" />
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Effect">
+ <Setter.Value>
+ <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" ShadowDepth="10" Direction="10" BlurRadius="15" Opacity="0" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.2" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.2" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ </DataTemplate>
+ </touch:TouchFlatListBox.ItemTemplate>
+ </touch:TouchFlatListBox>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
- <TextBlock Margin="0 15 0 0" TextAlignment="Left" TextWrapping="Wrap" Width="170">Some color need more fine tuning</TextBlock>
+ <StackPanel Orientation="Horizontal" Margin="0 40 0 0">
+ <Grid>
+ <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" StrokeThickness="2" Width="42" Height="42"></Ellipse>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold">2</TextBlock>
+ </Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">How to continue</TextBlock>
</StackPanel>
- </UniformGrid>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.Approved}">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Margin="0 40 80 40">
- <DockPanel LastChildFill="False">
- <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
+ <UniformGrid Columns="2" Width="530" HorizontalAlignment="Left" Margin="0 40 0 20">
+ <StackPanel HorizontalAlignment="Left">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Check"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">DONE</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+
+ <TextBlock Margin="0 15 0 0" TextAlignment="Center">All colors are approved</TextBlock>
+ </StackPanel>
+
+ <StackPanel HorizontalAlignment="Right">
+ <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Repeat"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+
+ <TextBlock Margin="0 15 0 0" TextAlignment="Left" TextWrapping="Wrap" Width="170">Some color need more fine tuning</TextBlock>
+ </StackPanel>
+ </UniformGrid>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+
+ <DataTrigger Binding="{Binding Job.JobFineTuningStatus}" Value="{x:Static enumerations:FineTuningStatuses.Approved}">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Margin="0 40 80 40">
+ <DockPanel LastChildFill="False">
+ <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
<Run>Colors Approved:</Run>
<Run Text="{Binding Job.FineTuningApproveDate,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=''}"></Run>
- </TextBlock>
- <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding RepeatFineTuningCommand}">
- <StackPanel Orientation="Horizontal">
- <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
- <TextBlock Margin="10 0 0 0">REPEAT FINE TUNING</TextBlock>
- </StackPanel>
- </touch:TouchButton>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </StackPanel>
- </touch:TouchExpander>
+ </TextBlock>
+ <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding RepeatFineTuningCommand}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchIcon Icon="Plus"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0">REPEAT FINE TUNING</TextBlock>
+ </StackPanel>
+ </touch:TouchButton>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
+ </StackPanel>
+ </touch:TouchExpander>
+ </StackPanel>
</StackPanel>
- </StackPanel>
- </touch:LightTouchScrollViewer>
- </Grid>
-
- <Border VerticalAlignment="Top" x:Name="borderEditDock" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" Padding="0 0 0 10">
- <Border.Effect>
- <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" BlurRadius="20" />
- </Border.Effect>
- </Border>
- </Grid>
+ </touch:LightTouchScrollViewer>
+ </Grid>
- <Grid Grid.Row="1">
- <Grid IsHitTestVisible="False">
- <Grid.Background>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#AEFFFFFF" />
- <GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
- </LinearGradientBrush>
- </Grid.Background>
- <Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
+ <Border VerticalAlignment="Top" x:Name="borderEditDock" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" Padding="0 0 0 10">
+ <!--<Border.Effect>
+ <DropShadowEffect Color="{StaticResource TangoDropShadowColor}" BlurRadius="20" />
+ </Border.Effect>-->
+ </Border>
</Grid>
- <!--<Border Padding="20 20">
+
+ <Grid Grid.Row="1">
+ <Grid IsHitTestVisible="False">
+ <Grid.Background>
+ <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
+ <GradientStop Offset="0" Color="#AEFFFFFF" />
+ <GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
+ </LinearGradientBrush>
+ </Grid.Background>
+ <Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
+ </Grid>
+ <!--<Border Padding="20 20">
<Grid>
<DockPanel>
<touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" DelayCommand="{Binding DyeCommand}" DelayCommandDuration="00:00:0.3">
DYE
</touch:TouchButton>
- --><!--Add this in case you want to display job summery on bottom panel-->
- <!--<localControls:JobSummeryViewer DataContext="{Binding Job}" Height="35" Margin="0 -20 30 0" />--><!--
+ -->
+ <!--Add this in case you want to display job summery on bottom panel-->
+ <!--<localControls:JobSummeryViewer DataContext="{Binding Job}" Height="35" Margin="0 -20 30 0" />-->
+ <!--
</DockPanel>
</Grid>
</Border>-->
- </Grid>
+ </Grid>
- <dragAndDrop:DraggingSurface x:Name="DraggingSurface" />
- </Grid>
+ <dragAndDrop:DraggingSurface x:Name="DraggingSurface" />
+ </Grid>
+ </touch:TouchLoadingPanel>
<Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
<Border.Effect>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml
index 897810c99..f99b299cc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml
@@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.PPC.Common.Controls"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:catalog="clr-namespace:Tango.BL.Catalogs;assembly=Tango.BL"
mc:Ignorable="d"
@@ -20,8 +21,8 @@
<touch:TouchListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0 0 10 0">
- <TextBlock HorizontalAlignment="Center" Text="{Binding Name}" FontSize="{StaticResource TangoTitleFontSize}"></TextBlock>
- <touch:TouchStaticListBox ItemsSource="{Binding Items}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=SelectedItem,Mode=TwoWay}" Margin="0 20 0 40">
+ <TextBlock HorizontalAlignment="Center" Text="{Binding Name,IsAsync=True}" FontSize="{StaticResource TangoTitleFontSize}"></TextBlock>
+ <touch:TouchStaticListBox ItemsSource="{Binding Items,IsAsync=True}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=SelectedItem,Mode=TwoWay}" Margin="0 20 0 40">
<touch:TouchStaticListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
@@ -45,8 +46,8 @@
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.5" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.5" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.5" Duration="00:00:00" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.5" Duration="00:00:00" />
<!--<DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />-->
</Storyboard>
</BeginStoryboard>
@@ -54,8 +55,8 @@
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:00" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:00" />
<!--<DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />-->
</Storyboard>
</BeginStoryboard>
@@ -68,7 +69,7 @@
<DataTemplate>
<StackPanel Margin="10" Width="70">
<Ellipse Width="60" Height="60" Fill="{Binding Brush}" />
- <TextBlock Margin="0 5 0 0" HorizontalAlignment="Center" Text="{Binding Name}"></TextBlock>
+ <controls:FastTextBlock Margin="0 5 0 0" HorizontalAlignment="Center" Text="{Binding Name,IsAsync=True}"></controls:FastTextBlock>
</StackPanel>
</DataTemplate>
</touch:TouchStaticListBox.ItemTemplate>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
index 364ca8ee7..b90a1afff 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -11,7 +11,9 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
+using System.Windows.Interop;
using System.Windows.Media;
+using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
@@ -32,6 +34,8 @@ namespace Tango.PPC.UI
{
Instance = this;
+ //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),new FrameworkPropertyMetadata { DefaultValue = 30 });
+
InitializeComponent();
bool has_touch = false;
@@ -77,6 +81,16 @@ namespace Tango.PPC.UI
Closing += MainWindow_Closing;
}
+ protected override void OnSourceInitialized(EventArgs e)
+ {
+ //var hwndSource = PresentationSource.FromVisual(this) as HwndSource;
+
+ //if (hwndSource != null)
+ // hwndSource.CompositionTarget.RenderMode = RenderMode.SoftwareOnly;
+
+ base.OnSourceInitialized(e);
+ }
+
private void LockAspectRatio()
{
this.Width = (this.Height * (800d / 1280d)) - 10;
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 d7dca484e..5062df1d6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
@@ -140,7 +140,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.AlertOctagon,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Error",
Brush = Application.Current.Resources["TangoMessageBoxErrorBrush"] as Brush,
});
@@ -156,7 +156,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.InfoCircleSolid,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Information",
Brush = Application.Current.Resources["TangoMessageBoxInfoBrush"] as Brush,
});
@@ -172,7 +172,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.Alert,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Warning",
Brush = Application.Current.Resources["TangoMessageBoxWarningBrush"] as Brush,
});
@@ -188,7 +188,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.QuestionCircleSolid,
+ Icon = TouchIconKind.QuestionCircleRegular,
Title = "Confirm",
HasCancel = true,
Brush = Application.Current.Resources["TangoMessageBoxQuestionBrush"] as Brush,
@@ -218,6 +218,8 @@ namespace Tango.PPC.UI.Notifications
/// <returns></returns>
private Task<bool> ShowMessageBox(MessageBoxVM vm)
{
+ ReleaseGlobalBusyMessage();
+
LogManager.Log($"Displaying MessagBox '{vm.Message}'.");
TaskCompletionSource<bool> source = new TaskCompletionSource<bool>();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
index 179d1dde3..dee4e9c7b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
@@ -27,13 +27,6 @@
<TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
</StackPanel>
- <StackPanel>
- <controls:AsyncAdornerControl Height="130" Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
- <StackPanel VerticalAlignment="Center">
- <touch:TouchGifAnimation Source="/Images/preloader_rectangles.gif" EnableAnimation="{Binding IsLoading}" />
- </StackPanel>
- </controls:AsyncAdornerControl>
- </StackPanel>
</StackPanel>
</StackPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
index c63ef1e13..604c79aeb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -28,7 +28,9 @@
ItemExpandedPropertyPath="IsExpanded"
HasDialog="{Binding NotificationProvider.HasDialog}"
CurrentDialog="{Binding NotificationProvider.CurrentDialog}"
- NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}">
+ NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}"
+ IsBusy="{Binding NotificationProvider.IsInGlobalBusyState}"
+ BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}">
<touch:TouchPanel.NotificationTemplate>
<DataTemplate>
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
index 8816d9825..6738ad99c 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
@@ -211,11 +211,15 @@ namespace Tango.BL.Entities
get { return _isOutOfGamut; }
set
{
- _isOutOfGamut = value; RaisePropertyChangedAuto();
-
- if (Segment != null)
+ if (_isOutOfGamut != value)
{
- Segment.RaiseHasOutOfGamutBrushStop();
+ _isOutOfGamut = value;
+ RaisePropertyChangedAuto();
+
+ if (Segment != null)
+ {
+ Segment.RaiseHasOutOfGamutBrushStop();
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
index 7e15b9ea5..a15cb32ab 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
@@ -139,6 +139,7 @@ namespace Tango.BL.Entities
}
[NotMapped]
+ [JsonIgnore]
public bool HasOutOfGamutBrushStop
{
get { return BrushStops.Any(x => x.IsOutOfGamut); }
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
index 1c84b8768..e814985e6 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
@@ -579,7 +579,7 @@ namespace Tango.DragAndDrop
//element.AddHandler(FrameworkElement.PreviewMouseDownEvent, (MouseButtonEventHandler)Draggable_PreviewMouseDown, true);
//element.AddHandler(FrameworkElement.MouseMoveEvent, (MouseEventHandler)Draggable_MouseMove, true);
//element.AddHandler(FrameworkElement.PreviewMouseUpEvent, (MouseButtonEventHandler)Draggable_PreviewMouseUp, true);
- element.Unloaded += Element_Unloaded;
+ element.Unloaded += Draggable_Unloaded;
}
}
@@ -592,7 +592,7 @@ namespace Tango.DragAndDrop
if (!_dropElements.Contains(element))
{
_dropElements.Add(element);
- element.Unloaded += Element_Unloaded1;
+ element.Unloaded += Droppable_Unloaded;
}
}
@@ -601,12 +601,10 @@ namespace Tango.DragAndDrop
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
- private static void Element_Unloaded(object sender, RoutedEventArgs e)
+ private static void Draggable_Unloaded(object sender, RoutedEventArgs e)
{
FrameworkElement element = sender as FrameworkElement;
UnRegisterDraggable(element);
- element.PreviewMouseUp -= Draggable_PreviewMouseUp;
- element.Unloaded -= Element_Unloaded;
}
/// <summary>
@@ -614,11 +612,10 @@ namespace Tango.DragAndDrop
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
- private static void Element_Unloaded1(object sender, RoutedEventArgs e)
+ private static void Droppable_Unloaded(object sender, RoutedEventArgs e)
{
FrameworkElement element = sender as FrameworkElement;
UnRegisterDroppable(element);
- element.Unloaded -= Element_Unloaded1;
}
/// <summary>
@@ -628,6 +625,8 @@ namespace Tango.DragAndDrop
private static void UnRegisterDraggable(FrameworkElement element)
{
_dragElements.Remove(element);
+ element.PreviewMouseUp -= Draggable_PreviewMouseUp;
+ element.Unloaded -= Draggable_Unloaded;
}
/// <summary>
@@ -637,6 +636,7 @@ namespace Tango.DragAndDrop
private static void UnRegisterDroppable(FrameworkElement element)
{
_dropElements.Remove(element);
+ element.Unloaded -= Droppable_Unloaded;
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/FastTextBlock.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/FastTextBlock.cs
index 5b2808ab1..141fa6e27 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Controls/FastTextBlock.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Controls/FastTextBlock.cs
@@ -9,6 +9,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
+using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
@@ -16,14 +17,24 @@ using System.Windows.Shapes;
namespace Tango.SharedUI.Controls
{
-
+ [ContentProperty(nameof(Text))]
public class FastTextBlock : Control
{
private FormattedText _formattedText;
static FastTextBlock()
{
-
+
+ }
+
+ public FastTextBlock()
+ {
+ Loaded += FastTextBlock_Loaded;
+ }
+
+ private void FastTextBlock_Loaded(object sender, RoutedEventArgs e)
+ {
+ Init();
}
public static readonly DependencyProperty TextProperty =
@@ -31,19 +42,24 @@ namespace Tango.SharedUI.Controls
"Text",
typeof(string),
typeof(FastTextBlock),
- new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure,
+ new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
(o, e) => ((FastTextBlock)o).TextPropertyChanged((string)e.NewValue)));
private void TextPropertyChanged(string text)
{
- if (text != null)
+ Init();
+ }
+
+ private void Init()
+ {
+ if (Text != null)
{
var typeface = new Typeface(
FontFamily,
- FontStyles.Normal, FontWeights.Normal, FontStretches.Normal);
+ FontStyle, FontWeight, FontStretch);
_formattedText = new FormattedText(
- text, CultureInfo.CurrentCulture,
+ Text, CultureInfo.CurrentCulture,
FlowDirection.LeftToRight, typeface, FontSize, Foreground);
}
}
diff --git a/Software/Visual_Studio/Tango.Touch/Components/SharedResourceDictionary.cs b/Software/Visual_Studio/Tango.Touch/Components/SharedResourceDictionary.cs
new file mode 100644
index 000000000..efa1e77e4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Components/SharedResourceDictionary.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Tango.Touch.Components
+{
+ /// <summary>
+ /// The shared resource dictionary is a specialized resource dictionary
+ /// that loads it content only once. If a second instance with the same source
+ /// is created, it only merges the resources from the cache.
+ /// </summary>
+ public class SharedResourceDictionary : ResourceDictionary
+ {
+ /// <summary>
+ /// Internal cache of loaded dictionaries
+ /// </summary>
+ public static Dictionary<Uri, ResourceDictionary> _sharedDictionaries =
+ new Dictionary<Uri, ResourceDictionary>();
+
+ /// <summary>
+ /// Local member of the source uri
+ /// </summary>
+ private Uri _sourceUri;
+
+ /// <summary>
+ /// Gets or sets the uniform resource identifier (URI) to load resources from.
+ /// </summary>
+ public new Uri Source
+ {
+ get { return _sourceUri; }
+ set
+ {
+ _sourceUri = value;
+
+ if (!_sharedDictionaries.ContainsKey(value))
+ {
+ // If the dictionary is not yet loaded, load it by setting
+ // the source of the base class
+ base.Source = value;
+
+ // add it to the cache
+ _sharedDictionaries.Add(value, this);
+ }
+ else
+ {
+ // If the dictionary is already loaded, get it from the cache
+ MergedDictionaries.Add(_sharedDictionaries[value]);
+ }
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.cs
index a684cbf5a..4e1ced33b 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.cs
@@ -203,6 +203,10 @@ namespace Tango.Touch.Controls
_textBox.CaretIndex = _textBox.Text.Length;
}
}
+ else if (_textBox != null)
+ {
+ _textBox.Text = null;
+ }
if (_popup != null)
{
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml
index 4a4cdbba2..9a2a51017 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml
@@ -17,7 +17,7 @@
<Grid>
<ContentPresenter Content="{TemplateBinding Content}" />
- <Grid Background="#66FFFFFF">
+ <Grid Background="#9EFFFFFF">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="IsHitTestVisible" Value="False"></Setter>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index fa57169f3..5e6a309da 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -13,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.SharedUI.Controls;
namespace Tango.Touch.Controls
{
@@ -20,7 +21,7 @@ namespace Tango.Touch.Controls
{
private TextBox _text_box;
private bool _prevent_text_change;
- private TextBlock _text_block;
+ private FastTextBlock _text_block;
private double _lastValue;
Regex regex_integer = new Regex(@"^-?[0-9]\d*(\d+)?$");
Regex regex_double = new Regex(@"^-?[0-9]\d*(\.\d+)?$");
@@ -101,7 +102,7 @@ namespace Tango.Touch.Controls
base.OnApplyTemplate();
_text_box = GetTemplateChild("PART_TextBox") as TextBox;
- _text_block = GetTemplateChild("PART_TextDisplay") as TextBlock;
+ _text_block = GetTemplateChild("PART_TextDisplay") as FastTextBlock;
_text_box.PreviewTextInput += _text_box_PreviewTextInput;
_text_box.PreviewKeyDown += _text_box_PreviewKeyDown;
_text_box.LostFocus += _text_box_LostFocus;
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
index ba2efa52d..bfe65cbd1 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
@@ -4,10 +4,12 @@
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:localConverters="clr-namespace:Tango.Touch.Converters"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../Resources/Colors.xaml" />
+ <!--<ResourceDictionary Source="../Resources/Colors.xaml" />-->
+ <components:SharedResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<converters:StringNullOrEmptyToBooleanConverter x:Key="StringNullOrEmptyToBooleanConverter" />
@@ -37,11 +39,9 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" keyboard:KeyboardView.Container="{TemplateBinding KeyboardContainer}">
<DockPanel>
- <Border DockPanel.Dock="Bottom" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNumericTextBox},Path=(Validation.HasError),Converter={StaticResource BooleanToVisibilityConverter}}">
- <Canvas>
- <TextBlock FontSize="12" Foreground="{StaticResource TangoValidationErrorBrush}" Margin="0 5 0 0" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNumericTextBox},Path=(Validation.Errors).CurrentItem.ErrorContent}"></TextBlock>
- </Canvas>
- </Border>
+ <Canvas DockPanel.Dock="Bottom" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNumericTextBox},Path=(Validation.HasError),Converter={StaticResource BooleanToVisibilityConverter}}">
+ <controls:FastTextBlock FontSize="12" Foreground="{StaticResource TangoValidationErrorBrush}" Margin="0 5 0 0" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNumericTextBox},Path=(Validation.Errors).CurrentItem.ErrorContent}"></controls:FastTextBlock>
+ </Canvas>
<DockPanel>
<Grid DockPanel.Dock="Bottom" Height="2">
<Rectangle Height="1" Fill="{StaticResource TangoTextWatermarkBrush}" />
@@ -86,8 +86,8 @@
</Grid>
<Grid>
- <components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="15">
- <Grid>
+ <!--<components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="15">
+ <Grid>-->
<TextBox VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_TextBox" BorderThickness="0" Background="Transparent">
<TextBox.Style>
<Style TargetType="TextBox">
@@ -100,9 +100,9 @@
</Style>
</TextBox.Style>
</TextBox>
- <TextBlock x:Name="PART_TextDisplay" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" FocusVisualStyle="{x:Null}" Visibility="{Binding ElementName=PART_TextBox,Path=IsFocused,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></TextBlock>
- </Grid>
- </components:Ripple>
+ <controls:FastTextBlock x:Name="PART_TextDisplay" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" FocusVisualStyle="{x:Null}" Visibility="{Binding ElementName=PART_TextBox,Path=IsFocused,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></controls:FastTextBlock>
+ <!--</Grid>
+ </components:Ripple>-->
</Grid>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
index 6c29e4652..bb715abba 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.cs
@@ -256,7 +256,21 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty NotificationBarVisibilityProperty =
DependencyProperty.Register("NotificationBarVisibility", typeof(Visibility), typeof(TouchPanel), new PropertyMetadata(Visibility.Visible));
+ public bool IsBusy
+ {
+ get { return (bool)GetValue(IsBusyProperty); }
+ set { SetValue(IsBusyProperty, value); }
+ }
+ public static readonly DependencyProperty IsBusyProperty =
+ DependencyProperty.Register("IsBusy", typeof(bool), typeof(TouchPanel), new PropertyMetadata(false));
+ public String BusyMessage
+ {
+ get { return (String)GetValue(BusyMessageProperty); }
+ set { SetValue(BusyMessageProperty, value); }
+ }
+ public static readonly DependencyProperty BusyMessageProperty =
+ DependencyProperty.Register("BusyMessage", typeof(String), typeof(TouchPanel), new PropertyMetadata(null));
#region Attached Properties
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
index e80bd7daa..e7f822bb5 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchPanel.xaml
@@ -73,9 +73,9 @@
<Grid ClipToBounds="True">
<DockPanel>
<Grid DockPanel.Dock="Top">
- <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoComboBoxPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Padding="30">
- <TextBlock DockPanel.Dock="Top" Text="{Binding Title}" FontSize="{StaticResource TangoComboBoxTitleFontSize}" FontWeight="SemiBold"></TextBlock>
- </Border>
+ <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30">
+ <TextBlock DockPanel.Dock="Top" Text="{Binding Title}" FontSize="{StaticResource TangoComboBoxTitleFontSize}" FontWeight="SemiBold"></TextBlock>
+ </Border>
<local:TouchIconButton x:Name="PART_comboboxCloseButton" Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" Opacity="0.5" />
</Grid>
<local:TouchListBox x:Name="PART_ComboBoxList" Width="{Binding MinPopupWidth}" Height="{Binding MinPopupHeight}" ItemSelectedCommand="{Binding RelativeSource={RelativeSource AncestorType=local:TouchPanel},Path=ComboBoxPickedCommand}" ItemsSource="{Binding ItemsSource}" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" SelectionMode="None" ItemTemplate="{Binding ItemTemplate}" ValuePath="{Binding ValuePath}" VerticalAlignment="Top" >
@@ -135,18 +135,18 @@
<Grid>
<Grid.Style>
<Style TargetType="Grid">
- <Setter Property="Opacity" Value="0"></Setter>
+ <!--<Setter Property="Opacity" Value="0"></Setter>-->
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=HasDialog}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
- <DataTrigger.EnterActions>
+ <!--<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
- </DataTrigger.EnterActions>
+ </DataTrigger.EnterActions>-->
</DataTrigger>
</Style.Triggers>
</Style>
@@ -173,24 +173,24 @@
<Grid Background="#9E000000">
<Grid.Style>
<Style TargetType="Grid">
- <Setter Property="Opacity" Value="0"></Setter>
+ <!--<Setter Property="Opacity" Value="0"></Setter>-->
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=HasMessageBox}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
- <DataTrigger.EnterActions>
+ <!--<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
- </DataTrigger.EnterActions>
+ </DataTrigger.EnterActions>-->
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
- <Grid Height="360" Margin="20" RenderTransformOrigin="0.5,0.5">
+ <Grid Height="400" Margin="20" RenderTransformOrigin="0.5,0.5">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="RenderTransform">
@@ -220,35 +220,99 @@
</Style.Triggers>
</Style>
</Grid.Style>
- <Border DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentMessageBox}" Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="10" Margin="10">
+
+ <Border DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=CurrentMessageBox}" Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10">
<Border.Effect>
<DropShadowEffect BlurRadius="10" />
</Border.Effect>
-
<Grid ClipToBounds="True">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="75*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="100" />
- <RowDefinition Height="1*" />
- <RowDefinition Height="70"/>
- </Grid.RowDefinitions>
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <local:TouchIcon Width="24" Height="24" Icon="{Binding Icon}" Margin="0 0 20 0" Foreground="{Binding Brush}" />
+ <TextBlock Text="{Binding Title}" FontSize="{StaticResource TangoMessageBoxTitleFontSize}" FontWeight="Normal"></TextBlock>
+ </StackPanel>
+ </Border>
+ <local:TouchIconButton Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" Opacity="0.5" />
+ </Grid>
- <local:TouchIcon Grid.Row="0" Icon="{Binding Icon}" Margin="20" Foreground="{Binding Brush}" />
- <TextBlock Grid.Column="1" Text="{Binding Title,TargetNullValue=Confirm}" Foreground="{Binding Brush,TargetNullValue={StaticResource TangoPrimaryAccentBrush}}" VerticalAlignment="Center" Margin="10" Style="{StaticResource TangoMessageBoxTitle}"></TextBlock>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center" Height="50" Margin="0 0 0 40">
+ <local:TouchButton x:Name="btnCancel" FontWeight="Normal" CornerRadius="25" Width="220" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" Margin="0 0 30 0" Style="{StaticResource TangoHollowButton}" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}">CANCEL</local:TouchButton>
+ <local:TouchButton x:Name="btnOK" FontWeight="Normal" Width="220" CornerRadius="25" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" Margin="30 0 0 0" Style="{StaticResource TangoHollowButton}" Command="{Binding OKCommand}">OK</local:TouchButton>
+ </StackPanel>
- <Rectangle Stroke="{Binding Brush}" VerticalAlignment="Bottom" Grid.ColumnSpan="2" StrokeThickness="3" />
+ <TextBlock FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
- <TextBlock Grid.Row="1" FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding Message}" VerticalAlignment="Top" Grid.Column="1" TextWrapping="Wrap" Margin="10 20 10 10"></TextBlock>
+ </DockPanel>
+ </Grid>
+ </Border>
+ </Grid>
+ </Grid>
- <!--<Rectangle Stroke="{StaticResource TangoDividerBrush}" VerticalAlignment="Bottom" Grid.Row="1" Grid.ColumnSpan="2" StrokeThickness="1"/>-->
+ <!--Busy-->
+ <Grid Background="#9E000000">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="Visibility" Value="Hidden"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
- <StackPanel Grid.Column="1" Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal">
- <local:TouchButton x:Name="btnCancel" Width="120" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}">CANCEL</local:TouchButton>
- <local:TouchButton x:Name="btnOK" Width="180" Margin="2 0" Style="{StaticResource TangoMessageBoxButton}" Command="{Binding OKCommand}">OK</local:TouchButton>
- </StackPanel>
+ <Grid Height="360" Margin="20" RenderTransformOrigin="0.5,0.5">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="0" ScaleY="0" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="1" Duration="00:00:0.1" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0" Duration="00:00:0.1" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" CornerRadius="5" Margin="10">
+ <Border.Effect>
+ <DropShadowEffect BlurRadius="10" />
+ </Border.Effect>
+ <Grid ClipToBounds="True">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <Border CornerRadius="5 5 0 0" Background="{StaticResource TangoPopupTitleBackgroundBrush}" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 0 0 1" Padding="30">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <local:TouchIcon Width="24" Height="24" Icon="ProgressClock" Margin="0 0 20 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" />
+ <TextBlock Text="Working" FontSize="{StaticResource TangoMessageBoxTitleFontSize}" FontWeight="Normal"></TextBlock>
+ </StackPanel>
+ </Border>
+ </Grid>
+
+ <local:TouchBusyIndicator DockPanel.Dock="Bottom" Margin="0 0 0 40" IsIndeterminate="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsBusy}" Width="100" Height="100"></local:TouchBusyIndicator>
+
+ <TextBlock FontSize="{StaticResource TangoMessageBoxMessageFontSize}" Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=BusyMessage}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
+ </DockPanel>
</Grid>
</Border>
</Grid>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml
index c00bd40b9..e6acda366 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml
@@ -8,7 +8,7 @@
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../Resources/Colors.xaml" />
+ <components:SharedResourceDictionary Source="../Resources/Colors.xaml" />
<ResourceDictionary>
<converters:StringNullOrEmptyToBooleanConverter x:Key="StringNullOrEmptyToBooleanConverter" />
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs
index 8e3db84fa..02240ecc8 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs
@@ -72,28 +72,28 @@ namespace Tango.Touch.Controls
private void ApplyOptimization()
{
- var _border_viewport = _scrollViewer.GetViewportBorder();
+ //var _border_viewport = _scrollViewer.GetViewportBorder();
- if (_border_viewport.IsAncestorOf(this))
- {
- //Point relativeLocation = this.TranslatePoint(new Point(0, 0), _border_viewport);
- //Rect bounds = this.TransformToAncestor(_border_viewport).TransformBounds(new Rect(0.0, 0.0, this.ActualWidth, this.ActualHeight));
- //Rect rect = new Rect(0.0, 0.0, _border_viewport.ActualWidth, _border_viewport.ActualHeight);
- if (_location.Y > _scrollViewer.GetScrollPosition() && _location.Y < _scrollViewer.GetScrollPosition() + _border_viewport.ActualHeight)
- {
- if (_innerBorder.Visibility == Visibility.Hidden)
- {
- _innerBorder.Visibility = Visibility.Visible;
- }
- }
- else
- {
- if (_innerBorder.Visibility == Visibility.Visible)
- {
- _innerBorder.Visibility = Visibility.Hidden;
- }
- }
- }
+ //if (_border_viewport.IsAncestorOf(this))
+ //{
+ // //Point relativeLocation = this.TranslatePoint(new Point(0, 0), _border_viewport);
+ // //Rect bounds = this.TransformToAncestor(_border_viewport).TransformBounds(new Rect(0.0, 0.0, this.ActualWidth, this.ActualHeight));
+ // //Rect rect = new Rect(0.0, 0.0, _border_viewport.ActualWidth, _border_viewport.ActualHeight);
+ // if (_location.Y > _scrollViewer.GetScrollPosition() && _location.Y < _scrollViewer.GetScrollPosition() + _border_viewport.ActualHeight)
+ // {
+ // if (_innerBorder.Visibility == Visibility.Hidden)
+ // {
+ // _innerBorder.Visibility = Visibility.Visible;
+ // }
+ // }
+ // else
+ // {
+ // if (_innerBorder.Visibility == Visibility.Visible)
+ // {
+ // _innerBorder.Visibility = Visibility.Hidden;
+ // }
+ // }
+ //}
}
}
}
diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
index 1a77b76be..c8a6d0e8d 100644
--- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
@@ -52,7 +52,7 @@
<Color x:Key="TangoNotificationBorderColor">#757373</Color>
<Color x:Key="TangoNotificationBarBackgroundColor">#C3F2F5FA</Color>
- <Color x:Key="TangoComboBoxPopupTitleBackgroundColor">#DDE7FD</Color>
+ <Color x:Key="TangoPopupTitleBackgroundColor">#DDE7FD</Color>
<Color x:Key="TangoPowerMenuOpenedBackgroundColor">#4E5470</Color>
@@ -117,7 +117,7 @@
<SolidColorBrush x:Key="TangoKeyboardKeyDarkTextBrush">#121212</SolidColorBrush>
<SolidColorBrush x:Key="TangoKeyboardKeyLightTextBrush">#F1F1F1</SolidColorBrush>
- <SolidColorBrush x:Key="TangoComboBoxPopupTitleBackgroundBrush" Color="{StaticResource TangoComboBoxPopupTitleBackgroundColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="TangoPopupTitleBackgroundBrush" Color="{StaticResource TangoPopupTitleBackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="TangoPowerMenuOpenedBackgroundBrush" Color="{StaticResource TangoPowerMenuOpenedBackgroundColor}"></SolidColorBrush>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
index 387977e0a..a4732966e 100644
--- a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
@@ -13,8 +13,8 @@
<sys:Double x:Key="TangoTitleFontSize">20</sys:Double>
<sys:Double x:Key="TangoButtonFontSize">20</sys:Double>
- <sys:Double x:Key="TangoMessageBoxTitleFontSize">30</sys:Double>
- <sys:Double x:Key="TangoMessageBoxMessageFontSize">20</sys:Double>
+ <sys:Double x:Key="TangoMessageBoxTitleFontSize">24</sys:Double>
+ <sys:Double x:Key="TangoMessageBoxMessageFontSize">22</sys:Double>
<sys:Double x:Key="TangoMessageBoxButtonFontSize">22</sys:Double>
<sys:Double x:Key="TangoExpanderHeaderFontSize">23</sys:Double>
diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
index 3177f206d..7600d4c14 100644
--- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
+++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
@@ -59,6 +59,7 @@
<Compile Include="..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Components\SharedResourceDictionary.cs" />
<Compile Include="Controls\AutoCompleteProvider.cs" />
<Compile Include="Controls\DoubleValueChangedEventArgs.cs" />
<Compile Include="Controls\FocusSelectionMode.cs" />