aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-02-18 14:31:24 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-02-18 14:31:24 +0200
commitb7f4088f257c3c9c816f680c97a652f6f73de940 (patch)
tree6eb4b2f444a353bfc077509eb33bc4697f2e1ac7 /Software/Visual_Studio
parentb6586404105311d0b0536d0537a7084b1a37c7c0 (diff)
downloadTango-b7f4088f257c3c9c816f680c97a652f6f73de940.tar.gz
Tango-b7f4088f257c3c9c816f680c97a652f6f73de940.zip
Several bug fixes on PPC.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml25
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs21
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs2
5 files changed, 38 insertions, 15 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml
index cd764c77d..3ea648ff1 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml
@@ -10,7 +10,7 @@
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
- <Grid>
+ <Grid x:Name="gridMain">
<Grid Margin="70 0 0 0">
<Grid.RowDefinitions>
<RowDefinition Height="90"/>
@@ -46,7 +46,7 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Image x:Name="imgBack" Source="/Images/abstracts/abstract1.png" Grid.RowSpan="2" Stretch="None" Opacity="0.6"></Image>
+ <Image x:Name="imgBack" Source="/Images/abstracts/abstract1.png" Grid.RowSpan="2" VerticalAlignment="Top" Stretch="UniformToFill" Opacity="0.6" Height="{Binding ElementName=gridMain,Path=ActualHeight}"></Image>
<Grid>
<Image Source="{StaticResource FSE_Machine_Full}" Stretch="Uniform" RenderOptions.BitmapScalingMode="Fant" Margin="10" />
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
index defd65d6e..abe2fab7d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml
@@ -42,10 +42,35 @@
<Image Source="../Images/JobView/error.png" Stretch="None" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}" />
<Ellipse Width="60" Height="60" Margin="20 0 0 0" Fill="{Binding InvalidBrushStop.Brush}" />
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="20 0 0 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding InvalidBrushStop.BrushColorSpace}" Value="RGB">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
<Run Text="{Binding InvalidBrushStop.Red}"></Run><Run>,</Run>
<Run Text="{Binding InvalidBrushStop.Green}"></Run><Run>,</Run>
<Run Text="{Binding InvalidBrushStop.Blue}"></Run>
</TextBlock>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource TangoGrayTextBrush}" Margin="20 0 0 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding InvalidBrushStop.BrushColorSpace}" Value="LAB">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ <Run Text="{Binding InvalidBrushStop.L,StringFormat=0.00}"></Run><Run>,</Run>
+ <Run Text="{Binding InvalidBrushStop.A,StringFormat=0.00}"></Run><Run>,</Run>
+ <Run Text="{Binding InvalidBrushStop.B,StringFormat=0.00}"></Run>
+ </TextBlock>
</StackPanel>
<DockPanel Grid.Row="2" Margin="0 0 0 0">
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 f07c20aa9..c394bbfa1 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
@@ -760,15 +760,8 @@ namespace Tango.PPC.Jobs.ViewModels
{
draggedSegment.SegmentIndex = droppedSegment.SegmentIndex + 1;
}
-
- int index = 1;
-
- foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex))
- {
- segment.SegmentIndex = index++;
- }
-
- SegmentsCollectionView.Refresh();
+
+ ArrangeSegmentsIndices();
}
/// <summary>
@@ -831,10 +824,14 @@ namespace Tango.PPC.Jobs.ViewModels
private void ArrangeSegmentsIndices()
{
- for (int i = 0; i < Job.Segments.Count; i++)
+ int index = 1;
+
+ foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex))
{
- Job.Segments[i].SegmentIndex = i + 1;
+ segment.SegmentIndex = index++;
}
+
+ SegmentsCollectionView.Refresh();
}
#endregion
@@ -982,7 +979,7 @@ namespace Tango.PPC.Jobs.ViewModels
[HandleProcessCorruptedStateExceptions]
public void OnBrushStopFieldValueChanged(BrushStop stop)
{
- if (stop != null)
+ if (stop != null && stop.ColorSpace != null)
{
stop.Corrected = false;
stop.OutOfGamutChecked = false;
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 c04c13ea1..557576d22 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
@@ -631,7 +631,6 @@
<touch:TouchToggleImageButton x:Name="toggleEdit" UncheckedImage="../Images/pencil-gray.png"
CheckedImage="../Images/pencil-blue.png"
DockPanel.Dock="Right"
- IsChecked="{Binding IsSelected}"
Padding="8" CornerRadius="30" Width="40" Height="40">
</touch:TouchToggleImageButton>
<!--<touch:TouchToggleIconButton x:Name="toggleEdit" DockPanel.Dock="Right" Icon="Pencil" CheckedIcon="Pencil" Padding="8" CornerRadius="20" />-->
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
index f926a0f4c..e280d5f9d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
@@ -96,12 +96,14 @@ namespace Tango.PPC.UI.ViewModels
LogManager.Log($"Application started. Single user/Auto login detected ({user.Email}). Skipping LoginView...");
await AuthenticationProvider.Login(user.Email, user.Password, false);
+ await Task.Delay(1000);
IsLoading = false;
}
else
{
LogManager.Log("Application started. Navigating to LoginView...");
await NavigationManager.NavigateTo(NavigationView.LoginView);
+ await Task.Delay(1000);
IsLoading = false;
}
}