aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 10:17:37 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 10:17:37 +0300
commit85a6112d2e1eac554cc4cbdfa31cca91d87e6ded (patch)
tree602c713a6f115270c5a0bee0ec5e75ec6145052e /Software
parent34d86579a1f4e3842566b3dd187f9fa5f3838d07 (diff)
downloadTango-85a6112d2e1eac554cc4cbdfa31cca91d87e6ded.tar.gz
Tango-85a6112d2e1eac554cc4cbdfa31cca91d87e6ded.zip
Implemented catalog importer..
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml130
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs20
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Components/GraphAxisControl.cs2
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Surfaces/WpfGraphSurface.cs5
-rw-r--r--Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj4
-rw-r--r--Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs14
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs21
-rw-r--r--Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogs.cs12
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj3
-rw-r--r--Software/Visual_Studio/Tango.sln55
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/App.config16
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/Catalog.xlsxbin0 -> 70687 bytes
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs100
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/Properties/AssemblyInfo.cs7
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/Tango.CatalogImporter.csproj81
-rw-r--r--Software/Visual_Studio/Utilities/Tango.CatalogImporter/packages.config4
17 files changed, 380 insertions, 96 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 92e2b292a..8820fcd4d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -26,9 +26,9 @@
<localConverters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
<DataTemplate x:Key="TabTemplate">
- <Grid>
- <Grid.Style>
- <Style TargetType="Grid">
+ <Border IsVisibleChanged="Border_IsVisibleChanged">
+ <Border.Style>
+ <Style TargetType="Border">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected}" Value="False">
@@ -36,12 +36,13 @@
</DataTrigger>
</Style.Triggers>
</Style>
- </Grid.Style>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <editors:ElementsEditor
+ </Border.Style>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <editors:ElementsEditor
x:Name="editor"
Elements="{Binding Elements}"
Loaded="Editor_Loaded"
@@ -61,63 +62,64 @@
BorderBrush="#1EA9FF"
BorderThickness="1">
- <editors:ElementsEditor.Style>
- <Style TargetType="editors:ElementsEditor">
- <Setter Property="IsEditable" Value="True"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
- <Setter Property="IsEditable" Value="False"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </editors:ElementsEditor.Style>
+ <editors:ElementsEditor.Style>
+ <Style TargetType="editors:ElementsEditor">
+ <Setter Property="IsEditable" Value="True"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
+ <Setter Property="IsEditable" Value="False"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </editors:ElementsEditor.Style>
- <editors:ElementsEditor.ContextMenu>
- <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
- <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Cut" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Copy" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Paste" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Undo" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Recycle" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Th" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
- </editors:ElementsEditor.ContextMenu>
- </editors:ElementsEditor>
+ <editors:ElementsEditor.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
+ <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Cut" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Copy" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Paste" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Undo" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Recycle" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Th" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </editors:ElementsEditor.ContextMenu>
+ </editors:ElementsEditor>
- <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
- </Grid>
+ <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
+ </Grid>
+ </Border>
</DataTemplate>
</UserControl.Resources>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
index 694debd26..e4ebe2424 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
@@ -23,11 +23,14 @@ namespace Tango.MachineStudio.Technician.Views
public partial class MachineTechView : UserControl
{
private MachineTechViewVM _vm;
+ private Dictionary<Border, UIElement> _tabs_content;
public MachineTechView()
{
InitializeComponent();
+ _tabs_content = new Dictionary<Border, UIElement>();
+
this.Loaded += (x, y) =>
{
_vm = DataContext as MachineTechViewVM;
@@ -67,5 +70,22 @@ namespace Tango.MachineStudio.Technician.Views
(editor.UndoRedoStatesProvider as ElementsEditorUndoRedoStatesProvider).StateExecuted += MachineTechView_StateExecuted;
}
+
+ private void Border_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ Border border = sender as Border;
+ if (border.Visibility != Visibility.Visible)
+ {
+ _tabs_content[border] = border.Child;
+ border.Child = null;
+ }
+ else
+ {
+ if (_tabs_content.ContainsKey(border))
+ {
+ border.Child = _tabs_content[border];
+ }
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Components/GraphAxisControl.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Components/GraphAxisControl.cs
index ea96a5a98..ef8dd4a3a 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Components/GraphAxisControl.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Components/GraphAxisControl.cs
@@ -134,7 +134,7 @@ namespace RealTimeGraphX.WPF.Components
{
if (Orientation == Orientation.Vertical)
{
- if (Items != null)
+ if (Items != null && e.Minimum != null && e.Maximum != null)
{
var steps = e.Minimum.CreateRange(e.Minimum, e.Maximum, Ticks).Reverse().ToList();
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Surfaces/WpfGraphSurface.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Surfaces/WpfGraphSurface.cs
index 5057949f0..1ff65f34b 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Surfaces/WpfGraphSurface.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/Surfaces/WpfGraphSurface.cs
@@ -399,7 +399,10 @@ namespace RealTimeGraphX.WPF.Surfaces
Input.ConnectOutput(this, true);
}
- OnSurfaceSizeChanged(_grid.ActualWidth, _grid.ActualHeight);
+ if (_grid != null)
+ {
+ OnSurfaceSizeChanged(_grid.ActualWidth, _grid.ActualHeight);
+ }
}
/// <summary>
diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj b/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj
index 733e2ba9f..dd11f7aef 100644
--- a/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj
+++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj
@@ -79,7 +79,7 @@
<ItemGroup>
<Content Include="..\Benchmarks\benchmarks_rgb_lab.csv">
<Link>TCC\benchmarks_rgb_lab.csv</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="App.config" />
<None Include="packages.config" />
@@ -125,7 +125,7 @@
</Content>
<Content Include="..\Images\template.bmp">
<Link>TCC\template.bmp</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup />
diff --git a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
index 32b743a88..8ab0bf3a7 100644
--- a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
+++ b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
@@ -184,30 +184,30 @@ namespace Tango.BL.ColorConversion
var standard_stops = stops.Where(x => x.BrushColorSpace == Enumerations.ColorSpaces.RGB || x.BrushColorSpace == Enumerations.ColorSpaces.LAB || x.BrushColorSpace == Enumerations.ColorSpaces.CMYK || x.BrushColorSpace == Enumerations.ColorSpaces.Volume);
var color_catalog_stops = stops.Where(x => x.BrushColorSpace != Enumerations.ColorSpaces.RGB && x.BrushColorSpace != Enumerations.ColorSpaces.LAB && x.BrushColorSpace != Enumerations.ColorSpaces.CMYK && x.BrushColorSpace != Enumerations.ColorSpaces.Volume);
- var min_standard = 0;
- var min_catalog = 0;
+ var max_standard = 1;
+ var max_catalog = 1;
if (standard_stops.Count() > 0)
{
- min_standard = standard_stops.Select(x => GetSuggestions(x)).Select(x => x.SingleCoordinates).Min(x => x.ProcessParametersTableIndex);
+ max_standard = standard_stops.Select(x => GetSuggestions(x)).Select(x => x.SingleCoordinates).Max(x => x.ProcessParametersTableIndex);
}
if (color_catalog_stops.Where(x => x.ColorCatalog != null).Count() > 0)
{
- min_catalog = color_catalog_stops.Where(x => x.ColorCatalog != null).Min(x => x.ColorCatalog.ProcessParametersTableIndex);
+ max_catalog = color_catalog_stops.Where(x => x.ColorCatalog != null).Max(x => x.ColorCatalog.ProcessParametersTableIndex);
}
if (standard_stops.Count() == 0)
{
- return min_catalog;
+ return max_catalog;
}
else if (color_catalog_stops.Count() == 0)
{
- return min_standard;
+ return max_standard;
}
else
{
- return Math.Min(min_standard, min_catalog);
+ return Math.Max(max_standard, max_catalog);
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
index 7f59d2592..c6c9794d3 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
@@ -509,6 +509,27 @@ namespace Tango.BL.Entities
}
}
+ private void SynchronizeVolumesToCatalogItem()
+ {
+ try
+ {
+ if (BrushColorSpace == ColorSpaces.Twine || BrushColorSpace == ColorSpaces.PANTON)
+ {
+ if (ColorCatalog != null)
+ {
+ SetVolume(Enumerations.LiquidTypes.Cyan, ColorCatalog.Cyan);
+ SetVolume(Enumerations.LiquidTypes.Magenta, ColorCatalog.Magenta);
+ SetVolume(Enumerations.LiquidTypes.Yellow, ColorCatalog.Yellow);
+ SetVolume(Enumerations.LiquidTypes.Black, ColorCatalog.Black);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error synchronizing volumes to color catalog item.");
+ }
+ }
+
#endregion
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogs.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogs.cs
deleted file mode 100644
index e0d39cef1..000000000
--- a/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogs.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.ComponentModel;
-
-namespace Tango.Integration.Observables
-{
- public enum ColorCatalogs
- {
- }
-}
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index b8b4ff32a..1ed2bc584 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -345,7 +345,6 @@
<Compile Include="Entities\WindingMethodBase.cs" />
<Compile Include="IObservableEntityDTO.cs" />
<Compile Include="ObservableEntityDTO.cs" />
- <Compile Include="Enumerations\ColorCatalogs.cs" />
<Compile Include="Enumerations\DancerTypes.cs" />
<Compile Include="Enumerations\EditingStates.cs" />
<Compile Include="Enumerations\EventTypeNotificationTimes.cs" />
@@ -551,7 +550,7 @@
</Target>
<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/Tango.sln b/Software/Visual_Studio/Tango.sln
index 2dc6e80b2..265ab727c 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -295,6 +295,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.IDE", "Scri
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.IDE.UI", "Scripting\Tango.Scripting.IDE.UI\Tango.Scripting.IDE.UI.csproj", "{B0EFE7A0-7039-4DC4-8B39-465E521299F6}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.CatalogImporter", "Utilities\Tango.CatalogImporter\Tango.CatalogImporter.csproj", "{1066BC62-F167-4FC3-8F8B-982A9F632B4A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppVeyor|Any CPU = AppVeyor|Any CPU
@@ -5242,6 +5244,46 @@ Global
{B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Release|x64.Build.0 = Release|Any CPU
{B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Release|x86.ActiveCfg = Release|Any CPU
{B0EFE7A0-7039-4DC4-8B39-465E521299F6}.Release|x86.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|ARM.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|ARM.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|ARM64.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|x64.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|x64.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|x86.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.AppVeyor|x86.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|ARM.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|x64.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Debug|x86.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|ARM.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|x64.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.DefaultBuild|x86.Build.0 = Debug|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|ARM.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|ARM.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|ARM64.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x64.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x64.Build.0 = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x86.ActiveCfg = Release|Any CPU
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -5336,14 +5378,15 @@ Global
{DA62FA39-668B-47A6-B0F2-D2C1DAF777B0} = {3D750293-C243-48F6-9112-A6B3FF650C0D}
{C9F60285-91FB-4293-BCF5-164D76755CDD} = {3D750293-C243-48F6-9112-A6B3FF650C0D}
{B0EFE7A0-7039-4DC4-8B39-465E521299F6} = {3D750293-C243-48F6-9112-A6B3FF650C0D}
+ {1066BC62-F167-4FC3-8F8B-982A9F632B4A} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}
- BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
- BuildVersion_UpdateAssemblyVersion = True
- BuildVersion_UpdateFileVersion = False
- BuildVersion_StartDate = 2000/1/1
- BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
BuildVersion_UseGlobalSettings = False
+ BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
+ BuildVersion_StartDate = 2000/1/1
+ BuildVersion_UpdateFileVersion = False
+ BuildVersion_UpdateAssemblyVersion = True
+ BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
+ SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}
EndGlobalSection
EndGlobal
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/App.config b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/App.config
new file mode 100644
index 000000000..f05da3520
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/App.config
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+ </startup>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ </providers>
+ </entityFramework>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Catalog.xlsx b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Catalog.xlsx
new file mode 100644
index 000000000..ebfa30559
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Catalog.xlsx
Binary files differ
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs
new file mode 100644
index 000000000..7449b06ab
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL;
+using Tango.BL.Entities;
+using Tango.BL.Enumerations;
+using Tango.Core.Helpers;
+using Tango.Documents;
+
+namespace Tango.CatalogImporter
+{
+ class Program
+ {
+ private class CatalogItem
+ {
+ public int Code { get; set; }
+ public int Red { get; set; }
+ public int Green { get; set; }
+ public int Blue { get; set; }
+ public String S1 { get; set; }
+ public String Group { get; set; }
+ public float Cyan { get; set; }
+ public float Magenta { get; set; }
+ public float Yellow { get; set; }
+ public float Black { get; set; }
+ public float L { get; set; }
+ public float A { get; set; }
+ public float B { get; set; }
+ public int GamutRegion { get; set; }
+ }
+
+ static void Main(string[] args)
+ {
+ ExcelReader reader = new ExcelReader(AssemblyHelper.GetCurrentAssemblyFolder() + "\\Catalog.xlsx");
+ var items = reader.GetDataByIndex<CatalogItem>("400ColorsCat", 2);
+ reader.Dispose();
+
+ Console.Write("Please enter the target RML name (press enter to target all): ");
+ String rml_name = Console.ReadLine();
+
+ if (!String.IsNullOrWhiteSpace(rml_name))
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ var rml = db.Rmls.Single(x => x.Name == rml_name);
+ var twine_color_space_guid = db.ColorSpaces.Single(x => (ColorSpaces)x.Code == ColorSpaces.Twine).Guid;
+
+ Console.WriteLine("Clearing all RML catalog items...");
+ db.Database.ExecuteSqlCommand($"DELETE FROM COLOR_CATALOGS WHERE RML_GUID = '{rml.Guid}'");
+
+ foreach (var group in items.GroupBy(x => x.Group))
+ {
+ int nameCounter = 1;
+
+ foreach (var item in group)
+ {
+ ColorCatalog catalogItem = new ColorCatalog();
+ catalogItem.ColorCode = item.Code;
+
+ catalogItem.Red = item.Red;
+ catalogItem.Green = item.Green;
+ catalogItem.Blue = item.Blue;
+
+ catalogItem.Cyan = item.Cyan;
+ catalogItem.Magenta = item.Magenta;
+ catalogItem.Yellow = item.Yellow;
+ catalogItem.Black = item.Black;
+
+ catalogItem.L = item.L;
+ catalogItem.A = item.A;
+ catalogItem.B = item.B;
+
+ catalogItem.ProcessParametersTableIndex = item.GamutRegion;
+ catalogItem.ColorSpaceGuid = twine_color_space_guid;
+ catalogItem.RmlGuid = rml.Guid;
+
+ catalogItem.ColorGroup = item.Group;
+ catalogItem.Name = item.Group + nameCounter++;
+
+ db.ColorCatalogs.Add(catalogItem);
+
+ Console.WriteLine($"Added catalog item {catalogItem.Name}...");
+ }
+ }
+
+ db.SaveChanges();
+
+ Console.WriteLine("Done");
+ Console.ReadLine();
+ }
+ }
+ else
+ {
+ throw new NotImplementedException();
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..b9fd85353
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Properties/AssemblyInfo.cs
@@ -0,0 +1,7 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Tango - Catalog Importer")]
+[assembly: AssemblyVersion("2.0.9.1608")]
+[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Tango.CatalogImporter.csproj b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Tango.CatalogImporter.csproj
new file mode 100644
index 000000000..16c06e775
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Tango.CatalogImporter.csproj
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{1066BC62-F167-4FC3-8F8B-982A9F632B4A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Tango.CatalogImporter</RootNamespace>
+ <AssemblyName>Tango.CatalogImporter</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\Build\Utilities\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\Build\Utilities\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ <None Include="Catalog.xlsx">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.Documents\Tango.Documents.csproj">
+ <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project>
+ <Name>Tango.Documents</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/packages.config b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/packages.config
new file mode 100644
index 000000000..b3daf0d6c
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
+</packages> \ No newline at end of file