aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-09-23 10:18:08 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-09-23 10:18:08 +0300
commitd6974df76b1401f101ca3c7fc3182f73e493ca51 (patch)
treeeb0d6373d7edd84224bf91c25b0da3fcede41c03 /Software/Visual_Studio/MachineStudio/Modules
parentcd5a926df30ea7e7a4f4f4a55d71b43ec7aee3e1 (diff)
parent31f6935ac607a3767fa391d87deed6d2c2a300b7 (diff)
downloadTango-d6974df76b1401f101ca3c7fc3182f73e493ca51.tar.gz
Tango-d6974df76b1401f101ca3c7fc3182f73e493ca51.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/ColorCalibrationViewVM.cs208
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs49
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml95
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml989
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml13
10 files changed, 704 insertions, 712 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
index d5ad86e2a..71f5ec864 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
@@ -40,6 +40,10 @@
<Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
</Reference>
+ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
@@ -78,6 +82,7 @@
<Compile Include="AutoComplete\MachineVersionsProvider.cs" />
<Compile Include="Contracts\IMainView.cs" />
<Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\ColorCalibrationViewVM.cs" />
<Compile Include="ViewModels\MachineCreationDialogVM.cs" />
<Compile Include="ViewModels\MachineVersionDialogVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
@@ -237,9 +242,9 @@
<Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
<Name>Tango.MachineStudio.Common</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj">
- <Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project>
- <Name>Tango.MachineStudio.ColorLab</Name>
+ <ProjectReference Include="..\Tango.MachineStudio.RML\Tango.MachineStudio.RML.csproj">
+ <Project>{d0186ac0-0fcf-4d3b-9619-54812b6e524b}</Project>
+ <Name>Tango.MachineStudio.RML</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -287,7 +292,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/ColorCalibrationViewVM.cs
new file mode 100644
index 000000000..b75fe7e03
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/ColorCalibrationViewVM.cs
@@ -0,0 +1,208 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Builders;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.RML.Models;
+using Tango.MachineStudio.RML.ViewModels;
+using Tango.PMR.ColorLab;
+using Tango.Settings;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.MachineDesigner.ViewModels
+{
+ public class ColorCalibrationViewVM : ViewModel
+ {
+ private INotificationProvider _notification;
+ private ObservablesContext _dbContext;
+
+ #region Properties
+
+ private ColorConversionViewVM _colorConversionViewVM;
+ public ColorConversionViewVM ColorConversionViewVM
+ {
+ get { return _colorConversionViewVM; }
+ set { _colorConversionViewVM = value; RaisePropertyChangedAuto(); }
+ }
+
+ private CalibrationDataViewVM _calibrationDataViewVM;
+ public CalibrationDataViewVM CalibrationDataViewVM
+ {
+ get { return _calibrationDataViewVM; }
+ set
+ {
+ _calibrationDataViewVM = value;
+ RaisePropertyChangedAuto();
+ OnChangeCalibrationDataViewVM();
+ }
+ }
+
+ private ObservableCollection<LiquidTypesRml> _liquidTypesRmls;
+ public ObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get { return _liquidTypesRmls; }
+ set
+ {
+ _liquidTypesRmls = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+ private ObservableCollection<Rml> _rmls;
+ /// <summary>
+ /// Gets or sets the RMLS.
+ /// </summary>
+ public ObservableCollection<Rml> Rmls
+ {
+ get { return _rmls; }
+ set { _rmls = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Rml _selectedRML;
+ /// <summary>
+ /// Gets or sets the selected RML.
+ /// </summary>
+ public Rml SelectedRML
+ {
+ get { return _selectedRML; }
+ set
+ {
+ _selectedRML = value;
+ RaisePropertyChangedAuto();
+ OnChangeSelectedRML();
+ }
+ }
+
+ private Machine _machine;
+ public Machine Machine
+ {
+ get { return _machine; }
+ set { _machine = value; RaisePropertyChangedAuto(); }
+ }
+
+ #endregion
+
+ public ColorCalibrationViewVM(INotificationProvider notification, Machine machine, ObservablesContext context)
+ {
+ _notification = notification;
+ _machine = machine;
+ _dbContext = context;
+ }
+
+ private void OnChangeCalibrationDataViewVM()
+ {
+
+ }
+
+ private void OnChangeSelectedRML()
+ {
+ Invalidate();
+ }
+
+ #region RML
+
+ public async void Invalidate()
+ {
+ if (SelectedRML != null && Machine != null)
+ {
+ IsFree = false;
+
+ await Task.Factory.StartNew(() =>
+ {
+ using (_notification.PushTaskItem("Loading RML data..."))
+ {
+ _selectedRML = new RmlBuilder(_dbContext)
+ .Set(_selectedRML.Guid)
+ .WithActiveParametersGroup()
+ .WithCAT(Machine.Guid)
+ .WithCCT()
+ .WithLiquidFactors().Build();
+
+ LiquidTypesRmls = SelectedRML.LiquidTypesRmls;
+ }
+ });
+
+ InvalidateCalibrationDataAndColorConversion();
+
+ IsFree = true;
+ }
+ }
+
+ public void InvalidateCalibrationDataAndColorConversion()
+ {
+ if (SelectedRML != null)
+ {
+ var liquidsCalibrationData = new ObservableCollection<CalibrationDataVM>();
+ CalibrationDataViewVM = new CalibrationDataViewVM(_notification, liquidsCalibrationData);
+ liquidsCalibrationData.EnableCrossThreadOperations();
+
+ foreach (var liquidTypeRml in SelectedRML.LiquidTypesRmls)
+ {
+ var idsPack = Machine.Configuration.GetSupportedIdsPacks(_selectedRML).FirstOrDefault(x => x.LiquidType == liquidTypeRml.LiquidType);
+
+ if (idsPack != null)
+ {
+ CalibrationDataVM vm = new CalibrationDataVM(idsPack);
+
+ var cat = idsPack.LiquidType.Cats.FirstOrDefault(x => x.Machine == Machine && x.Rml == SelectedRML);
+
+ if (cat != null)
+ {
+ var calData = cat.GetCalibrationData();
+ vm.CalibrationPoints = calData.CalibrationPoints.Select(x => new CalibrationDataPointVM(x)).ToObservableCollection();
+ }
+
+ liquidsCalibrationData.Add(vm);
+ }
+ }
+
+ ColorConversionViewVM = new ColorConversionViewVM(_notification)
+ {
+ RML = SelectedRML,
+ CCT = new CctModel()
+ {
+ Data = SelectedRML.Cct?.Data,
+ },
+ LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData,
+ LiquidTypesRmls = LiquidTypesRmls,
+ };
+ }
+ }
+
+ #endregion
+
+ #region Save
+
+ public void Save()
+ {
+ foreach (var calDataVM in ColorConversionViewVM.LiquidsCalibrationData)
+ {
+ var cat = calDataVM.IdsPack.LiquidType.Cats.FirstOrDefault(x => x.Machine == Machine && x.Rml == SelectedRML);
+
+ if (cat == null)
+ {
+ cat = new Cat();
+ cat.Name = "untitled";
+ _dbContext.Cats.Add(cat);
+ }
+
+ cat.Rml = SelectedRML;
+ cat.Machine = Machine;
+ cat.LiquidType = calDataVM.IdsPack.LiquidType;
+
+ CalibrationData calData = new CalibrationData();
+ calData.LiquidType = (PMR.ColorLab.LiquidType)cat.LiquidType.Code;
+ calData.CalibrationPoints.AddRange(calDataVM.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y }));
+
+ cat.PutCalibrationData(calData);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index 935cfe5ee..eaca7cd6a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -22,6 +22,9 @@ using Tango.BL.Builders;
using Tango.MachineStudio.MachineDesigner.Contracts;
using System.Windows.Threading;
using Tango.Core.Threading;
+using Tango.MachineStudio.RML.ViewModels;
+using Tango.Settings;
+using Tango.MachineStudio.RML.Models;
namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
@@ -112,11 +115,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
set { _selectedSpool = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
}
- private ColorLab.ViewModels.MainViewVM _colorLabVM;
- public ColorLab.ViewModels.MainViewVM ColorLabVM
+ private ColorCalibrationViewVM _colorCalibrationViewVM;
+ public ColorCalibrationViewVM ColorCalibrationViewVM
{
- get { return _colorLabVM; }
- set { _colorLabVM = value; RaisePropertyChangedAuto(); }
+ get { return _colorCalibrationViewVM; }
+ set { _colorCalibrationViewVM = value; RaisePropertyChangedAuto(); }
}
#endregion
@@ -210,7 +213,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
public override async void OnApplicationReady()
{
MachinesAdapter.MachineVersions = (await MachinesAdapter.Context.MachineVersions.ToListAsync()).ToObservableCollection();
- ColorLabVM = new ColorLab.ViewModels.MainViewVM(_notification) { IsHosted = true };
+
}
#endregion
@@ -239,7 +242,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
public void DropIdsPack(IdsPack idsPack1, IdsPack idsPack2)
{
ActiveMachine.Configuration.IdsPacks.Swap(idsPack1, idsPack2);
- ColorLabVM.InvalidateLiquidFactorsCalibrationData();
+ ColorCalibrationViewVM.InvalidateCalibrationDataAndColorConversion();
}
/// <summary>
@@ -334,7 +337,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
idsPack.LiquidType = liquidType;
idsPack.LiquidTypeGuid = liquidType.Guid;
- ColorLabVM.InvalidateLiquidFactorsCalibrationData();
+ ColorCalibrationViewVM.InvalidateCalibrationDataAndColorConversion();
}
/// <summary>
@@ -360,7 +363,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
ActiveMachineAdapter.Context.IdsPacks.Remove(SelectedIds);
SelectedIds = null;
- ColorLabVM.InvalidateLiquidFactorsCalibrationData();
+ ColorCalibrationViewVM.InvalidateCalibrationDataAndColorConversion();
}
/// <summary>
@@ -432,7 +435,12 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
}
}
- ColorLabVM.InitHost(ActiveMachineAdapter.Context, ActiveMachine, ActiveMachineAdapter.Rmls, ActiveMachineAdapter.Rmls.FirstOrDefault());
+ ColorCalibrationViewVM = new ColorCalibrationViewVM(_notification, ActiveMachine, _activeMachineAdapter.Context)
+ {
+ Rmls = ActiveMachineAdapter.Rmls,
+ LiquidTypesRmls = ActiveMachineAdapter.Rmls.FirstOrDefault().LiquidTypesRmls,
+ SelectedRML = ActiveMachineAdapter.Rmls.FirstOrDefault(),
+ };
View.NavigateTo(MachineDesignerNavigationView.MachineDetailsView);
}
@@ -574,14 +582,17 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
ActiveMachine.ConfigurationGuid = ActiveMachine.Configuration.Guid;
ActiveMachine.LastUpdated = DateTime.UtcNow;
ActiveMachine.ProductionDate = DateTime.UtcNow;
- await ActiveMachineAdapter.Context.SaveChangesAsync();
- await ColorLabVM.SaveChanges();
+ ColorCalibrationViewVM.Save();
+
+ await ActiveMachineAdapter.Context.SaveChangesAsync();
if (SelectedMachine != null)
{
await SelectedMachine.Reload(MachinesAdapter.Context);
}
+
+ ColorCalibrationViewVM.Invalidate();
}
}
catch (Exception ex)
@@ -669,9 +680,19 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
Task.Factory.StartNew(() =>
{
- IsFree = false;
- MachinesAdapter.Machines = MachinesAdapter.Context.Machines.Where(x => x.SerialNumber.StartsWith(Filter)).Include(x => x.Organization).Include(x => x.MachineVersion).ToSynchronizedObservableCollection();
- IsFree = true;
+ try
+ {
+ IsFree = false;
+ MachinesAdapter.Machines = MachinesAdapter.Context.Machines.Where(x => x.SerialNumber.StartsWith(Filter)).Include(x => x.Organization).Include(x => x.MachineVersion).ToSynchronizedObservableCollection();
+ }
+ catch
+ {
+
+ }
+ finally
+ {
+ IsFree = true;
+ }
});
});
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml
index e73c9661f..0d8acbc53 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ColorCalibrationView.xaml
@@ -11,10 +11,101 @@
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
- xmlns:colorLab="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab"
+ xmlns:rml="clr-namespace:Tango.MachineStudio.RML.Views;assembly=Tango.MachineStudio.RML"
+ xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
+ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ <converters:ColorComponentToOpacityConverter x:Key="ColorComponentToOpacityConverter" />
+ <converters:ColorToComponentsConverter x:Key="ColorToComponentsConverter" />
+ <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" />
+ <converters:ObjectToObjectTypeConverter x:Key="ObjectToObjectTypeConverter" />
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ </UserControl.Resources>
<Grid>
- <colorLab:MainView DataContext="{Binding ColorLabVM}" />
+ <Grid DataContext="{Binding ColorCalibrationViewVM}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="500"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+
+ <Grid>
+ <StackPanel>
+ <commonControls:MachineView Width="500" Margin="0 40 0 0" DataContext="{Binding Machine}" />
+ <StackPanel Margin="40 40">
+ <TextBlock FontSize="16">MEDIA</TextBlock>
+ <ComboBox ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}" FontSize="16" IsEnabled="{Binding Machine,Converter={StaticResource NullObjectToBooleanConverter}}" Background="Transparent" Style="{StaticResource TransparentComboBoxStyle}" >
+
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock Text="{Binding Name}" FontWeight="Bold" FontStyle="Italic" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock>
+ <TextBlock FontSize="11" Text="{Binding Manufacturer}" Foreground="{StaticResource GrayBrush}"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+
+
+ <TextBlock FontSize="16" Margin="0 40 0 0">LIQUID FACTORS</TextBlock>
+ <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0" IsEnabled="False">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel IsItemsHost="True"></WrapPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
+ <StackPanel Margin="0 0 10 0">
+ <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="{StaticResource Hexagon.ForegroundBrush}" Text="{Binding LiquidType.Name}"></TextBlock>
+ <Grid Width="58" Height="48" Margin="0 5 0 0">
+ <shapes:Hexagon StrokeThickness="1" Stroke="{StaticResource GrayBrush}">
+ <shapes:Hexagon.Fill>
+ <LinearGradientBrush Opacity="0.7" >
+ <GradientStop Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
+ <GradientStop Color="White" Offset="1"/>
+ </LinearGradientBrush>
+ </shapes:Hexagon.Fill>
+ </shapes:Hexagon>
+
+ <TextBox Style="{x:Null}" Background="Transparent" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic" Foreground="{StaticResource Hexagon.ForegroundBrush}"/>
+ </Grid>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Column="1">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="370"/>
+ </Grid.RowDefinitions>
+
+ <rml:ColorConversionView DataContext="{Binding ColorConversionViewVM}" />
+ <Grid Grid.Row="1">
+ <Rectangle VerticalAlignment="Top" Stroke="{StaticResource borderBrush}"></Rectangle>
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <TextBlock FontSize="20" Margin="0 20 0 0" TextAlignment="Center">CALIBRATION DATA</TextBlock>
+ </Grid>
+
+ <ScrollViewer x:Name="calibrationDataScrollViewer" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" Margin="15 0 20 0">
+ <rml:CalibrationDataView DataContext="{Binding CalibrationDataViewVM}" />
+
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </Grid>
+ </Grid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml
index 466e6f458..35b578b6a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml
@@ -25,7 +25,7 @@
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0 0 0 10">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="BarcodeScan" Width="32" Height="32" />
- <TextBox Width="400" FontSize="20" Margin="10 0 0 0" materialDesign:HintAssist.Hint="Serial Number" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+ <TextBox Width="400" FontSize="20" Margin="10 0 0 0" materialDesign:HintAssist.Hint="Serial Number" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,Delay=500}"></TextBox>
</StackPanel>
</StackPanel>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
index ebbe08fae..b68239b4b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
@@ -174,9 +174,6 @@ namespace Tango.MachineStudio.RML.ViewModels
public ColorConversionViewVM(INotificationProvider notification)
{
_notification = notification;
-
- // CCT = new Cct();
-
SourceColor = new RgbVM();
SourceColor.ColorChanged += SourceColor_ColorChanged;
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs
index 084a317a7..e8b8cbe86 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/RgbVM.cs
@@ -24,7 +24,7 @@ namespace Tango.MachineStudio.RML.ViewModels
_color_change_timer.Tick += _color_change_timer_Tick;
_color_change_timer.Stop();
- Color = Colors.DimGray;
+ _color = Colors.DimGray;
}
private void _color_change_timer_Tick(object sender, EventArgs e)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
index 54e96017c..f1995283c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
@@ -53,14 +53,50 @@
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
- <Setter Property="FlowDirection" Value="RightToLeft"></Setter>
+ <Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
<Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}"></Setter>
</Style>
</DataGrid.CellStyle>
+ <!--<DataGrid.RowStyle>
+ <Style BasedOn="{StaticResource {x:Type DataGridRow}}" TargetType="{x:Type DataGridRow}">
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="Transparent" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.RowStyle>-->
+ <DataGrid.Resources>
+ <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="IsHitTestVisible" Value="false"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="HideUpDownButtons" Value="true"/>
+ </Style>
+ <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ </Style>
+ </DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="{StaticResource DimGrayBrush}" FontSize="11" />
- <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/>
- <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" />
+ <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
+ <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml
index ed27c1760..912ec3b0a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml
@@ -28,745 +28,370 @@
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
</UserControl.Resources>
- <Grid>
- <DockPanel>
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
- <Border.Effect>
- <DropShadowEffect Opacity="0.4" />
- </Border.Effect>
- <Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION</TextBlock>
- </Grid>
- </Border>
- <Grid DockPanel.Dock="Top" x:Name="ColorCalibrationGrid" Margin="80,20,20,20">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="250" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="20" />
- <RowDefinition/>
- <RowDefinition Height="30" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock" >
- <Setter Property="Foreground" Value="{StaticResource JobFieldForeground}"/>
- </Style>
- </Grid.Resources>
+ <Grid DockPanel.Dock="Top" x:Name="ColorCalibrationGrid" Margin="80,20,20,20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="250" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="20" />
+ <RowDefinition/>
+ <RowDefinition Height="30" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.Resources>
+ <Style TargetType="TextBlock" >
+ <Setter Property="Foreground" Value="{StaticResource JobFieldForeground}"/>
+ </Style>
+ </Grid.Resources>
+
+ <Grid Grid.Row="1">
- <Grid Grid.Row="1">
+ <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-60 35 0 0">
+ <RadioButton IsChecked="{Binding SourceColor.IsLab,Converter={StaticResource BooleanInverseConverter}}">RGB</RadioButton>
+ <RadioButton Margin="0 10 0 0" IsChecked="{Binding SourceColor.IsLab}">LAB</RadioButton>
+ </StackPanel>
- <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-60 35 0 0">
- <RadioButton IsChecked="{Binding SourceColor.IsLab,Converter={StaticResource BooleanInverseConverter}}">RGB</RadioButton>
- <RadioButton Margin="0 10 0 0" IsChecked="{Binding SourceColor.IsLab}">LAB</RadioButton>
+ <StackPanel VerticalAlignment="Center">
+ <StackPanel Height="20">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock>
</StackPanel>
+ </StackPanel>
+ <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0">
+ <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker>
+ </Border>
- <StackPanel VerticalAlignment="Center">
- <StackPanel Height="20">
- <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
- <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
- <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock>
- </StackPanel>
- </StackPanel>
- <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0">
- <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker>
- </Border>
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Red}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Green}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Blue}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider>
+ </DockPanel>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
- <Grid>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SourceColor.IsLab}" Value="True">
<Setter Property="Content">
<Setter.Value>
<StackPanel>
<DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Red}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider>
+ <TextBlock DockPanel.Dock="Left" Text="L" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="100" Width="30" Value="{Binding SourceColor.L}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="0" Maximum="100" Value="{Binding SourceColor.L,Mode=TwoWay}"></Slider>
</DockPanel>
<DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Green}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider>
+ <TextBlock DockPanel.Dock="Left" Text="A" VerticalAlignment="Center" />
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.A}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.A,Mode=TwoWay}"></Slider>
</DockPanel>
<DockPanel Margin="0 10 0 0">
<TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Blue}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider>
+ <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.B}"></mahapps:NumericUpDown>
+ <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.B,Mode=TwoWay}"></Slider>
</DockPanel>
</StackPanel>
</Setter.Value>
</Setter>
-
- <Style.Triggers>
- <DataTrigger Binding="{Binding SourceColor.IsLab}" Value="True">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="L" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="100" Width="30" Value="{Binding SourceColor.L}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="0" Maximum="100" Value="{Binding SourceColor.L,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="A" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.A}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.A,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.B}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.B,Mode=TwoWay}"></Slider>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </Grid>
- </StackPanel>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
</Grid>
+ </StackPanel>
+ </Grid>
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center">SOURCE / INVERSE</TextBlock>
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock>
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center">SOURCE / INVERSE</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock>
+ <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock>
- <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
- <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
- <hive:HexList.ItemContainerStyle>
- <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
- <Setter Property="Background" Value="{Binding Brush}"></Setter>
- <Setter Property="Grid.Column" Value="0"></Setter>
- <Setter Property="Grid.Row" Value="0"></Setter>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="BorderThickness" Value="1"></Setter>
+ <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
+ <hive:HexList.ItemContainerStyle>
+ <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ <Setter Property="Grid.Column" Value="0"></Setter>
+ <Setter Property="Grid.Row" Value="0"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
- <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
- <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
- <Setter Property="Background" Value="{Binding Brush}"></Setter>
- </DataTrigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="BorderThickness" Value="2"></Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </hive:HexList.ItemContainerStyle>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
+ <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
+ <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="BorderThickness" Value="2"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </hive:HexList.ItemContainerStyle>
- <hive:HexList.ItemTemplate>
- <DataTemplate>
- <TextBlock Foreground="{StaticResource WhiteTextBrush}">
+ <hive:HexList.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Foreground="{StaticResource WhiteTextBrush}">
<Run Text="{Binding Row}"></Run><Run>,</Run>
<Run Text="{Binding Column}"/>
- </TextBlock>
- </DataTemplate>
- </hive:HexList.ItemTemplate>
- </hive:HexList>
+ </TextBlock>
+ </DataTemplate>
+ </hive:HexList.ItemTemplate>
+ </hive:HexList>
- <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding HiveSuggestions.Count}" Value="0">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
+ <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HiveSuggestions.Count}" Value="0">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
- <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
+ <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="120" Stretch="Fill" Height="30" Opacity="0.8" Margin="20 0 20 0"></Image>
- <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False">
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0">
- <StackPanel Orientation="Horizontal" Height="60">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
+ <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False">
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -20 0 0">
+ <StackPanel Orientation="Horizontal" Height="60">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- </StackPanel>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
+ <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
- <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" >
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
- <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
- <ContentControl.Foreground>
- <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <!--<mahapps:NumericUpDown.Resources>
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" >
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <!--<mahapps:NumericUpDown.Resources>
<StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
</mahapps:NumericUpDown.Resources>-->
- </mahapps:NumericUpDown>
- </ContentControl>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image>
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image>
- <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15">
+ <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15">
<Run>GAMUT REGION:</Run>
<Run Text="{Binding SelectedSuggestion.ProcessParametersTableIndex,Mode=OneWay}"></Run>
- </TextBlock>
- </Grid>
+ </TextBlock>
+ </Grid>
- <StackPanel Grid.Column="4" Grid.Row="3">
- <StackPanel Height="25" Margin="25 0 0 0">
- <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
- <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
- <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock>
- </StackPanel>
- </StackPanel>
+ <StackPanel Grid.Column="4" Grid.Row="3">
+ <StackPanel Height="25" Margin="25 0 0 0">
+ <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
+ <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock>
+ </StackPanel>
+ </StackPanel>
- <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
- <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
- <ContentControl.Foreground>
- <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <!--<mahapps:NumericUpDown.Resources>
+ <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <!--<mahapps:NumericUpDown.Resources>
<StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
</mahapps:NumericUpDown.Resources>-->
- </mahapps:NumericUpDown>
- </ContentControl>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
-
-
- <Image Source="../Images/arrow-long-Left.png" Grid.Column="2" Grid.Row="3" Width="140" Stretch="Fill" Height="30" Opacity="0.8"></Image>
-
- <Border BorderBrush="{StaticResource borderBrush}" Grid.Row="3">
- <Grid>
- <DockPanel Width="80" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock>
- <Grid>
- <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Ellipse.Fill>
- <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush>
- </Ellipse.Fill>
- </Ellipse>
- <materialDesign:PackIcon Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Alert" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Width="24" Height="24" />
- </Grid>
- </DockPanel>
-
- <StackPanel HorizontalAlignment="Right">
- <StackPanel Orientation="Horizontal" Height="60">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </Grid>
-
- <!--<Grid Margin="80,20,20,20" DockPanel.Dock="Top" x:Name="ColorCalibrationGrid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="250" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="20" />
- <RowDefinition />
- <RowDefinition Height="30" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock" >
- <Setter Property="Foreground" Value="{StaticResource JobFieldForeground}"/>
- </Style>
- </Grid.Resources>
-
- <Grid Grid.Row="1">
-
- <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-70 15 0 0">
- <RadioButton IsChecked="{Binding SourceColor.IsLab,Converter={StaticResource BooleanInverseConverter}}">RGB</RadioButton>
- <RadioButton Margin="0 10 0 0" IsChecked="{Binding SourceColor.IsLab}">LAB</RadioButton>
- </StackPanel>
-
- <StackPanel VerticalAlignment="Center">
- <StackPanel Height="20">
- <StackPanel Orientation="Horizontal" Margin="0 0 0 5" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}">
- <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
- <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Color is out of gamut</TextBlock>
- </StackPanel>
- </StackPanel>
- <Border BorderThickness="1" BorderBrush="#545454" Margin="0" Padding="2 2 2 0">
- <brushPicker:BrushPicker x:Name="picker" Color="{Binding SourceColor.Color,Mode=TwoWay}" Background="Transparent" BorderThickness="0" Height="150" BrushTypeVisibility="Collapsed"></brushPicker:BrushPicker>
- </Border>
-
- <Grid>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="R" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Red}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Red,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="G" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Green}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Green,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="255" Width="30" Value="{Binding SourceColor.Blue}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Maximum="255" Value="{Binding SourceColor.Blue,Mode=TwoWay}"></Slider>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
-
- <Style.Triggers>
- <DataTrigger Binding="{Binding SourceColor.IsLab}" Value="True">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="L" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="0" Maximum="100" Width="30" Value="{Binding SourceColor.L}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="0" Maximum="100" Value="{Binding SourceColor.L,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="A" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.A}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.A,Mode=TwoWay}"></Slider>
- </DockPanel>
- <DockPanel Margin="0 10 0 0">
- <TextBlock DockPanel.Dock="Left" Text="B" VerticalAlignment="Center" />
- <mahapps:NumericUpDown DockPanel.Dock="Right" HideUpDownButtons="True" StringFormat="0.00" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Center" Minimum="-128" Maximum="128" Width="30" Value="{Binding SourceColor.B}"></mahapps:NumericUpDown>
- <Slider Margin="10 0" IsSnapToTickEnabled="True" TickFrequency="1" Minimum="-128" Maximum="128" Value="{Binding SourceColor.B,Mode=TwoWay}"></Slider>
- </DockPanel>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
+ </mahapps:NumericUpDown>
</ContentControl>
- </Grid>
- </StackPanel>
- </Grid>
-
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="0">SOURCE / INVERSE</TextBlock>
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="2" Margin="0 0 0 0">SUGGESTIONS</TextBlock>
- <TextBlock FontStyle="Italic" HorizontalAlignment="Center" Grid.Column="4" Margin="-80 0 0 0">LIQUID VOLUMES</TextBlock>
-
- <Image Source="../Images/arrow-long-right.png" Grid.Column="1" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="10 0 20 0"></Image>
-
- <hive:HexList Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding HiveSuggestions}" SelectedItem="{Binding SelectedSuggestion,Mode=TwoWay}">
- <hive:HexList.ItemContainerStyle>
- <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
- <Setter Property="Background" Value="{Binding Brush}"></Setter>
- <Setter Property="Grid.Column" Value="0"></Setter>
- <Setter Property="Grid.Row" Value="0"></Setter>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="BorderThickness" Value="1"></Setter>
-
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
- <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
- <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
- <Setter Property="Background" Value="{Binding Brush}"></Setter>
- </DataTrigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="BorderThickness" Value="2"></Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </hive:HexList.ItemContainerStyle>
-
- <hive:HexList.ItemTemplate>
- <DataTemplate>
- <TextBlock Foreground="{StaticResource WhiteTextBrush}">
- <Run Text="{Binding Row}"></Run><Run>,</Run>
- <Run Text="{Binding Column}"/>
- </TextBlock>
- </DataTemplate>
- </hive:HexList.ItemTemplate>
- </hive:HexList>
-
- <TextBlock FontSize="40" Foreground="{StaticResource RedBrush100}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1" Text="NO INPUT">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding HiveSuggestions.Count}" Value="0">
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
-
- <Image Source="../Images/arrow-long-right.png" Grid.Column="3" Grid.Row="1" Width="100" Stretch="Fill" Height="30" Opacity="0.8" Margin="10 0 20 0"></Image>
-
- <Grid Grid.Column="4" Grid.Row="1" IsHitTestVisible="False">
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 0 0 0">
- <StackPanel Orientation="Horizontal" Height="50">
- <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Red" Opacity="{Binding SelectedSuggestion.Coordinates.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Green" Opacity="{Binding SelectedSuggestion.Coordinates.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="40" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020">
- <Rectangle.Fill>
- <SolidColorBrush Color="Blue" Opacity="{Binding SelectedSuggestion.Coordinates.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
</StackPanel>
- <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
- <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="40" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="40" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Image Source="../Images/arrow-long-Left.png" Grid.Column="2" Grid.Row="3" Width="140" Stretch="Fill" Height="30" Opacity="0.8"></Image>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="#202020"/>
- <TextBlock Text="{Binding SelectedSuggestion.Coordinates.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- </StackPanel>
-
- <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="320" >
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
- <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
- <ContentControl.Foreground>
- <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
-
- </mahapps:NumericUpDown>
- </ContentControl>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <Image Source="../Images/arrow-long-down.png" Grid.Column="1" Grid.Row="1" Margin="0 0 10 -170" Height="70" Width="40" Opacity="0.8" Stretch="Fill" HorizontalAlignment="Right" ></Image>
-
- <TextBlock FontSize="14" FontWeight="SemiBold" FontStyle="Italic" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 15">
- <Run>GAMUT REGION:</Run>
- <Run Text="{Binding SelectedSuggestion.ProcessParametersTableIndex,Mode=OneWay}"></Run>
- </TextBlock>
- </Grid>
+ <Border BorderBrush="{StaticResource borderBrush}" Grid.Row="3">
+ <Grid>
+ <DockPanel Width="80" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock>
+ <Grid>
+ <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Ellipse.Fill>
+ <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush>
+ </Ellipse.Fill>
+ </Ellipse>
+ <materialDesign:PackIcon Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Alert" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Width="24" Height="24" />
+ </Grid>
+ </DockPanel>
+ <StackPanel HorizontalAlignment="Right">
+ <StackPanel Orientation="Horizontal" Height="60">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
- <StackPanel Grid.Column="4" Grid.Row="3">
- <StackPanel Height="25" Margin="25 0 0 0">
- <StackPanel Orientation="Horizontal" Margin="0 0 0 0" Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}">
- <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource RedBrush100}" />
- <TextBlock Margin="5 0 0 0" Foreground="{StaticResource RedBrush100}">Liquid volumes exceeds the maximum range</TextBlock>
- </StackPanel>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock Text="{Binding TargetColor.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
+ </Grid>
+ </DockPanel>
</StackPanel>
+ <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
- <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center" MinWidth="420" IsEnabled="{Binding IsFree}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding Name}" FontSize="10" Margin="0 0 0 5"></TextBlock>
- <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
- <ContentControl.Foreground>
- <SolidColorBrush Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="16" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.00" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
-
- </mahapps:NumericUpDown>
- </ContentControl>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
-
-
- <Image Source="../Images/arrow-long-Left.png" Grid.Column="2" Grid.Row="3" Width="120" Stretch="Fill" Height="30" Opacity="0.8"></Image>
-
- <Border BorderBrush="{StaticResource borderBrush}" Grid.Row="3">
- <Grid>
- <DockPanel Width="80" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">COMPOSITE</TextBlock>
<Grid>
- <Ellipse Height="70" Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Ellipse.Fill>
- <SolidColorBrush Color="{Binding TargetColor.Color}"></SolidColorBrush>
- </Ellipse.Fill>
- </Ellipse>
- <materialDesign:PackIcon Visibility="{Binding IsVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Alert" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Width="24" Height="24" />
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
</Grid>
</DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
- <StackPanel HorizontalAlignment="Right">
- <StackPanel Orientation="Horizontal" Height="60">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">R</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Red" Opacity="{Binding TargetColor.Red,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Red}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">G</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Green" Opacity="{Binding TargetColor.Green,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Green}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}">
- <Rectangle.Fill>
- <SolidColorBrush Color="Blue" Opacity="{Binding TargetColor.Blue,Converter={StaticResource ColorComponentToOpacityConverter}}" />
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Text="{Binding TargetColor.Blue}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Height="40" Margin="0 5 0 0">
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">L</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.L,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left" Margin="0 0 5 0">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">A</TextBlock>
-
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- <DockPanel Width="50" HorizontalAlignment="Left">
- <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.A,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ <DockPanel Width="50" HorizontalAlignment="Left">
+ <TextBlock DockPanel.Dock="Top" FontSize="9" TextAlignment="Center">B</TextBlock>
- <Grid>
- <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
- <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
- </Grid>
- </DockPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </Grid>-->
- </DockPanel>
+ <Grid>
+ <Rectangle Margin="0 5 0 0" Stroke="{StaticResource DarkGrayBrush}"/>
+ <TextBlock Text="{Binding TargetColor.B,StringFormat='0.00'}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{StaticResource BlackForegroundBrush}"></TextBlock>
+ </Grid>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ </Border>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index f81ce804e..50f6a6297 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -147,7 +147,17 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="260"></ColumnDefinition>
</Grid.ColumnDefinitions>
- <local:ColorConversionView x:Name="colorConversionView" Margin="0 0 0 0" Grid.Column="0" DataContext="{Binding ColorConversionViewVM}"/>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION</TextBlock>
+ </Grid>
+ </Border>
+ <local:ColorConversionView x:Name="colorConversionView" Margin="0 0 0 0" Grid.Column="0" DataContext="{Binding ColorConversionViewVM}"/>
+ </DockPanel>
<DockPanel Grid.Column="1">
<Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="16 0" Padding="5" CornerRadius="5">
<Border.Effect>
@@ -189,7 +199,6 @@
</Grid>
</DockPanel>
</Grid>
- <!--<local:ColorConversionView x:Name="colorConversionView" />-->
</TabItem>
</TabControl>
</Grid>