aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-07-11 13:22:48 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-07-11 13:22:48 +0300
commit35030dd8e1d2a5b8bfc2feed6c138f4eaddc8bfc (patch)
tree841511fdba02b43cfe715c01da6ecb39dd2c3925 /Software/Visual_Studio/PPC/Modules
parent71147a336a79ea164c73d3174daeed8d73ae7900 (diff)
parentc839fa3d339f90f15e0548fc056828c533123bfc (diff)
downloadTango-35030dd8e1d2a5b8bfc2feed6c138f4eaddc8bfc.tar.gz
Tango-35030dd8e1d2a5b8bfc2feed6c138f4eaddc8bfc.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml27
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs96
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs22
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs12
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs153
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs115
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs38
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml57
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml40
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml1
16 files changed, 89 insertions, 530 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml
deleted file mode 100644
index db526419f..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml
+++ /dev/null
@@ -1,27 +0,0 @@
-<UserControl x:Class="Tango.PPC.Jobs.Controls.CoatsCatalogViewer"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
- xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:local="clr-namespace:Tango.PPC.Jobs.Controls"
- mc:Ignorable="d"
- d:DesignHeight="500" d:DesignWidth="300">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="80"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
-
- <Grid>
- <touch:TouchNavigationLinks FontSize="{StaticResource TangoTitleFontSize}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Filter,Mode=TwoWay}">
- <sys:String>CATALOG</sys:String>
- <sys:String>RECENT</sys:String>
- </touch:TouchNavigationLinks>
- </Grid>
-
- <controls:CoatsCatalogControl x:Name="catalogControl" Grid.Row="1" DataContext="{Binding RelativeSource={RelativeSource AncestorType=local:CoatsCatalogViewer},Path=Catalog,Mode=TwoWay}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=local:CoatsCatalogViewer},Path=SelectedItem,Mode=TwoWay}" />
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs
deleted file mode 100644
index 573d90d45..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using Tango.BL.Catalogs;
-
-namespace Tango.PPC.Jobs.Controls
-{
- /// <summary>
- /// Interaction logic for CoatsCatalogViewer.xaml
- /// </summary>
- public partial class CoatsCatalogViewer : UserControl
- {
- private Catalog _originalCatalog;
-
- /// <summary>
- /// Gets or sets the recent catalog items as a catalog.
- /// </summary>
- public Catalog Recent
- {
- get { return (Catalog)GetValue(RecentProperty); }
- set { SetValue(RecentProperty, value); }
- }
- public static readonly DependencyProperty RecentProperty =
- DependencyProperty.Register("Recent", typeof(Catalog), typeof(CoatsCatalogViewer), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the catalog.
- /// </summary>
- public Catalog Catalog
- {
- get { return (Catalog)GetValue(CatalogProperty); }
- set { SetValue(CatalogProperty, value); }
- }
- public static readonly DependencyProperty CatalogProperty =
- DependencyProperty.Register("Catalog", typeof(Catalog), typeof(CoatsCatalogViewer), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the selected catalog item.
- /// </summary>
- public CatalogItem SelectedItem
- {
- get { return (CatalogItem)GetValue(SelectedItemProperty); }
- set { SetValue(SelectedItemProperty, value); }
- }
- public static readonly DependencyProperty SelectedItemProperty =
- DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(CoatsCatalogViewer), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the current catalog filter.
- /// </summary>
- public String Filter
- {
- get { return (String)GetValue(FilterProperty); }
- set { SetValue(FilterProperty, value); }
- }
- public static readonly DependencyProperty FilterProperty =
- DependencyProperty.Register("Filter", typeof(String), typeof(CoatsCatalogViewer), new PropertyMetadata(null, (d, e) => (d as CoatsCatalogViewer).OnFilterChanged()));
-
- /// <summary>
- /// Called when the filter has been changed
- /// </summary>
- private void OnFilterChanged()
- {
- if (Filter == "CATALOG" && _originalCatalog != null)
- {
- Catalog = _originalCatalog;
- _originalCatalog = null;
- }
- else if (Filter == "RECENT")
- {
- _originalCatalog = Catalog;
- Catalog = Recent;
- }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CoatsCatalogViewer"/> class.
- /// </summary>
- public CoatsCatalogViewer()
- {
- InitializeComponent();
- Filter = "CATALOG";
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs
index a84e29bd2..929e9cd76 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
-using Tango.BL.Catalogs;
+using Tango.BL.Entities;
namespace Tango.PPC.Jobs.Controls
{
@@ -23,40 +23,40 @@ namespace Tango.PPC.Jobs.Controls
/// <seealso cref="System.Windows.Markup.IComponentConnector" />
public partial class TwineCatalogViewer : UserControl
{
- private Catalog _originalCatalog;
+ private ColorCatalog _originalCatalog;
/// <summary>
/// Gets or sets the recent catalog items as a catalog.
/// </summary>
- public Catalog Recent
+ public ColorCatalog Recent
{
- get { return (Catalog)GetValue(RecentProperty); }
+ get { return (ColorCatalog)GetValue(RecentProperty); }
set { SetValue(RecentProperty, value); }
}
public static readonly DependencyProperty RecentProperty =
- DependencyProperty.Register("Recent", typeof(Catalog), typeof(TwineCatalogViewer), new PropertyMetadata(null));
+ DependencyProperty.Register("Recent", typeof(ColorCatalog), typeof(TwineCatalogViewer), new PropertyMetadata(null));
/// <summary>
/// Gets or sets the catalog.
/// </summary>
- public Catalog Catalog
+ public ColorCatalog Catalog
{
- get { return (Catalog)GetValue(CatalogProperty); }
+ get { return (ColorCatalog)GetValue(CatalogProperty); }
set { SetValue(CatalogProperty, value); }
}
public static readonly DependencyProperty CatalogProperty =
- DependencyProperty.Register("Catalog", typeof(Catalog), typeof(TwineCatalogViewer), new PropertyMetadata(null));
+ DependencyProperty.Register("Catalog", typeof(ColorCatalog), typeof(TwineCatalogViewer), new PropertyMetadata(null));
/// <summary>
/// Gets or sets the selected catalog item.
/// </summary>
- public CatalogItem SelectedItem
+ public ColorCatalogsItem SelectedItem
{
- get { return (CatalogItem)GetValue(SelectedItemProperty); }
+ get { return (ColorCatalogsItem)GetValue(SelectedItemProperty); }
set { SetValue(SelectedItemProperty, value); }
}
public static readonly DependencyProperty SelectedItemProperty =
- DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(TwineCatalogViewer), new PropertyMetadata(null));
+ DependencyProperty.Register("SelectedItem", typeof(ColorCatalogsItem), typeof(TwineCatalogViewer), new PropertyMetadata(null));
/// <summary>
/// Gets or sets the current catalog filter.
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
index c2790ee6d..f10bf0064 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs
@@ -24,7 +24,7 @@ namespace Tango.PPC.Jobs.Converters
return ResourceHelper.GetImageFromResources("Images/NewJob/rgb.png");
case ColorSpaces.LAB:
return ResourceHelper.GetImageFromResources("Images/NewJob/lab.png");
- case ColorSpaces.Twine:
+ case ColorSpaces.Catalog:
return ResourceHelper.GetImageFromResources("Images/NewJob/twine.png");
case ColorSpaces.Volume:
return ResourceHelper.GetImageFromResources("Images/NewJob/volume.png");
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
index f7e3bb282..a8ba66eda 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs
@@ -18,7 +18,7 @@ namespace Tango.PPC.Jobs.Converters
if (colorSpace != null)
{
- if (colorSpace.Space == BL.Enumerations.ColorSpaces.Twine || colorSpace.Space == BL.Enumerations.ColorSpaces.Coats)
+ if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
{
return Visibility.Collapsed;
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs
index cb1b892fd..edd18a2c0 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs
@@ -9,8 +9,7 @@ namespace Tango.PPC.Jobs.NavigationObjects
{
public class TwineCatalogNavigationObject
{
- public Rml RML { get; set; }
-
- public BrushStop BrushStop { get; set; }
+ public ColorCatalog Catalog { get; set; }
+ public ColorCatalogsItem SelectedItem { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
index 74fbc1bdb..5531c1c4c 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj
@@ -72,10 +72,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Controls\CoatsCatalogViewer.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
<Page Include="Controls\RunningJobViewer.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -148,10 +144,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Views\CoatsCatalogView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\TwineCatalogView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -167,9 +159,6 @@
</Compile>
<Compile Include="AppButtons\StartPrintingButton.cs" />
<Compile Include="AppButtons\StopPrintingButton.cs" />
- <Compile Include="Controls\CoatsCatalogViewer.xaml.cs">
- <DependentUpon>CoatsCatalogViewer.xaml</DependentUpon>
- </Compile>
<Compile Include="Controls\RunningJobViewer.xaml.cs">
<DependentUpon>RunningJobViewer.xaml</DependentUpon>
</Compile>
@@ -251,7 +240,6 @@
<Compile Include="ViewModels\JobsViewVM.cs" />
<Compile Include="ViewModels\JobViewVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
- <Compile Include="ViewModels\CoatsCatalogViewVM.cs" />
<Compile Include="ViewModels\TwineCatalogViewVM.cs" />
<Compile Include="Views\JobProgressView.xaml.cs">
<DependentUpon>JobProgressView.xaml</DependentUpon>
@@ -268,9 +256,6 @@
<Compile Include="Views\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\CoatsCatalogView.xaml.cs">
- <DependentUpon>CoatsCatalogView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\TwineCatalogView.xaml.cs">
<DependentUpon>TwineCatalogView.xaml</DependentUpon>
</Compile>
@@ -479,7 +464,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/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs
index c419bb8e2..1b91d2ee8 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs
@@ -20,7 +20,6 @@ namespace Tango.PPC.Jobs
TangoIOC.Default.Register<JobSummeryViewVM>();
TangoIOC.Default.Register<JobViewVM>();
TangoIOC.Default.Register<TwineCatalogViewVM>();
- TangoIOC.Default.Register<CoatsCatalogViewVM>();
TangoIOC.Default.Register<JobProgressViewVM>();
}
@@ -80,17 +79,6 @@ namespace Tango.PPC.Jobs
}
/// <summary>
- /// Gets the coats catalog view VM.
- /// </summary>
- public static CoatsCatalogViewVM CoatsCatalogViewVM
- {
- get
- {
- return TangoIOC.Default.GetInstance<CoatsCatalogViewVM>();
- }
- }
-
- /// <summary>
/// Gets the job progress view VM.
/// </summary>
public static JobProgressViewVM JobProgressViewVM
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs
deleted file mode 100644
index ebeb5b704..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.BL;
-using Tango.BL.Catalogs;
-using Tango.BL.Entities;
-using Tango.Core.Commands;
-using Tango.PPC.Common;
-using Tango.PPC.Common.Navigation;
-using Tango.PPC.Jobs.NavigationObjects;
-using Tango.Settings;
-
-namespace Tango.PPC.Jobs.ViewModels
-{
- /// <summary>
- /// Represents the coats catalog view model.
- /// </summary>
- /// <seealso cref="PPCViewModel" />
- /// <seealso cref="INavigationResultProvider{CatalogItem, TwineCatalogNavigationObject}" />
- public class CoatsCatalogViewVM : PPCViewModel, INavigationResultProvider<CatalogItem, TwineCatalogNavigationObject>
- {
- private bool _confirmed;
- private ObservablesContext _db;
-
- private Catalog _catalog;
- /// <summary>
- /// Gets or sets the catalog.
- /// </summary>
- public Catalog Catalog
- {
- get { return _catalog; }
- set { _catalog = value; RaisePropertyChangedAuto(); }
- }
-
- private Catalog _recent;
- /// <summary>
- /// Gets or sets the recent catalog items as a complete catalog.
- /// </summary>
- public Catalog Recent
- {
- get { return _recent; }
- set { _recent = value; RaisePropertyChangedAuto(); }
- }
-
- private String _filter;
- /// <summary>
- /// Gets or sets the filter.
- /// </summary>
- /// <value>
- /// The filter.
- /// </value>
- public String Filter
- {
- get { return _filter; }
- set { _filter = value; RaisePropertyChangedAuto(); }
- }
-
- private CatalogItem _selectedItem;
- /// <summary>
- /// Gets or sets the selected item.
- /// </summary>
- public CatalogItem SelectedItem
- {
- get { return _selectedItem; }
- set
- {
- _selectedItem = value; RaisePropertyChangedAuto();
- }
- }
-
- /// <summary>
- /// Gets or sets the OK command.
- /// </summary>
- public RelayCommand OKCommand { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TwineCatalogViewVM"/> class.
- /// </summary>
- public CoatsCatalogViewVM()
- {
- OKCommand = new RelayCommand(Confirm);
- }
-
- /// <summary>
- /// Called when the application has been started.
- /// </summary>
- public override void OnApplicationStarted()
- {
- _db = ObservablesContext.CreateDefault();
- }
-
- /// <summary>
- /// Called when the navigation system has navigated to this VM view.
- /// </summary>
- public override void OnNavigatedTo()
- {
- base.OnNavigatedTo();
- _confirmed = false;
- Filter = "CATALOG";
- }
-
- /// <summary>
- /// Confirms this instance.
- /// </summary>
- private void Confirm()
- {
- SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentCoatsCatalogColors.Add(SelectedItem.Entity.Name);
- SettingsManager.Default.Save();
-
- _confirmed = true;
- NavigationManager.NavigateBack();
- }
-
- /// <summary>
- /// Called when the navigation system requests a result when it is navigating away from this instance.
- /// </summary>
- /// <returns></returns>
- public CatalogItem GetNavigationResult()
- {
- if (_confirmed)
- {
- return SelectedItem;
- }
- else
- {
- return null;
- }
- }
-
- /// <summary>
- /// Called when the navigation object has been received
- /// </summary>
- /// <param name="brushStop">The brush stop.</param>
- public async virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj)
- {
- IsFree = false;
- Catalog = await CatalogLoader.LoadCatalog(BL.Enumerations.ColorSpaces.Coats, obj.RML, _db);
- Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentCoatsCatalogColors);
- IsFree = true;
-
- if (obj.BrushStop.ColorCatalog != null)
- {
- SelectedItem = Catalog.Groups.SelectMany(x => x.Items).SingleOrDefault(x => x.Entity.Guid == obj.BrushStop.ColorCatalog.Guid);
- }
- else
- {
- SelectedItem = null;
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index fb1f240c5..08a5e1168 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -17,7 +17,6 @@ using System.ComponentModel;
using System.Windows.Data;
using Tango.PPC.Jobs.Dialogs;
using Tango.PPC.Jobs.Views;
-using Tango.BL.Catalogs;
using System.Runtime.InteropServices;
using System.Threading;
using Tango.SharedUI.Helpers;
@@ -186,34 +185,39 @@ namespace Tango.PPC.Jobs.ViewModels
set { _isJobDetailsExpanded = value; RaisePropertyChangedAuto(); }
}
- private List<ColorCatalog> _twineCatalogItems;
+ private List<ColorCatalogsItem> _catalogItems;
/// <summary>
/// Gets or sets the twine catalog items.
/// </summary>
- public List<ColorCatalog> TwineCatalogItems
+ public List<ColorCatalogsItem> CatalogItems
{
- get { return _twineCatalogItems; }
- set { _twineCatalogItems = value; RaisePropertyChangedAuto(); }
+ get { return _catalogItems; }
+ set { _catalogItems = value; RaisePropertyChangedAuto(); }
}
+ private ColorCatalogsItem _selectedCatalogItem;
/// <summary>
- /// Gets or sets the twine catalog automatic complete provider.
+ /// Gets or sets the selected catalog item.
/// </summary>
- public IAutoCompleteProvider TwineCatalogAutoCompleteProvider { get; set; }
+ public ColorCatalogsItem SelectedCatalogItem
+ {
+ get { return _selectedCatalogItem; }
+ set { _selectedCatalogItem = value; RaisePropertyChangedAuto(); }
+ }
/// <summary>
- /// Gets or sets the coats catalog automatic complete provider.
+ /// Gets or sets the twine catalog automatic complete provider.
/// </summary>
- public IAutoCompleteProvider CoatsCatalogAutoCompleteProvider { get; set; }
+ public IAutoCompleteProvider CatalogAutoCompleteProvider { get; set; }
- private List<ColorCatalog> _coatsCatalogItems;
+ private ColorCatalog _selectedCatalog;
/// <summary>
- /// Gets or sets the coats catalog items.
+ /// Gets or sets the selected catalog.
/// </summary>
- public List<ColorCatalog> CoatsCatalogItems
+ public ColorCatalog SelectedCatalog
{
- get { return _coatsCatalogItems; }
- set { _coatsCatalogItems = value; RaisePropertyChangedAuto(); }
+ get { return _selectedCatalog; }
+ set { _selectedCatalog = value; RaisePropertyChangedAuto(); }
}
#endregion
@@ -268,12 +272,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// <summary>
/// Gets or sets the twine catalog field tap command.
/// </summary>
- public RelayCommand<BrushStop> OpenTwineCatalogCommand { get; set; }
-
- /// <summary>
- /// Gets or sets the open coats catalog command.
- /// </summary>
- public RelayCommand<BrushStop> OpenCoatsCatalogCommand { get; set; }
+ public RelayCommand<BrushStop> OpenCatalogCommand { get; set; }
/// <summary>
/// Gets or sets the increase decrease samples to dye command.
@@ -360,8 +359,7 @@ namespace Tango.PPC.Jobs.ViewModels
FineTuneItems = new ObservableCollection<FineTuneItem>();
ApprovalFineTuneItems = new ObservableCollection<FineTuneItem>();
- TwineCatalogItems = new List<ColorCatalog>();
- CoatsCatalogItems = new List<ColorCatalog>();
+ CatalogItems = new List<ColorCatalogsItem>();
CustomersAutoCompleteProvider = new AutoCompleteProvider<Customer>((customer, filter) =>
{
@@ -369,14 +367,9 @@ namespace Tango.PPC.Jobs.ViewModels
});
- TwineCatalogAutoCompleteProvider = new AutoCompleteProvider<ColorCatalog>((color, filter) =>
+ CatalogAutoCompleteProvider = new AutoCompleteProvider<ColorCatalogsItem>((item, filter) =>
{
- return !String.IsNullOrWhiteSpace(filter) && color.RmlGuid == Job.Rml.Guid && color.Name.ToLower().StartsWith(filter.ToLower());
- });
-
- CoatsCatalogAutoCompleteProvider = new AutoCompleteProvider<ColorCatalog>((color, filter) =>
- {
- return !String.IsNullOrWhiteSpace(filter) && color.RmlGuid == Job.Rml.Guid && color.Name.ToLower().StartsWith(filter.ToLower());
+ return !String.IsNullOrWhiteSpace(filter) && item.Name.ToLower().StartsWith(filter.ToLower());
});
//Initialize Commands
@@ -421,8 +414,7 @@ namespace Tango.PPC.Jobs.ViewModels
StartFineTuningCommand = new RelayCommand(StartFineTuning, () => FineTuneItems.Any(x => x.IsSelected) && CanStartJob());
RepeatFineTuningCommand = new RelayCommand(RepeatFineTuning);
ApproveFineTuningCommand = new RelayCommand(ApproveFineTuning);
- OpenTwineCatalogCommand = new RelayCommand<BrushStop>(OpenTwineCatalog);
- OpenCoatsCatalogCommand = new RelayCommand<BrushStop>(OpenCoatsCatalog);
+ OpenCatalogCommand = new RelayCommand<BrushStop>(OpenCatalog);
ExportEmbroideryCommand = new RelayCommand(ExportEmbroidery);
}
@@ -479,8 +471,12 @@ namespace Tango.PPC.Jobs.ViewModels
SpoolTypes = await _db.SpoolTypes.ToListAsync();
LogManager.Log("Loading Customers...");
Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync();
- TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync();
- CoatsCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Coats).OrderBy(x => x.Name).ToListAsync();
+
+ if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog)
+ {
+ SelectedCatalog = await new ColorCatalogBuilder(_db).SetFirst().WithGroups().WithItems().BuildAsync();
+ CatalogItems = SelectedCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).ToList();
+ }
foreach (var segment in Job.Segments)
{
@@ -655,24 +651,23 @@ namespace Tango.PPC.Jobs.ViewModels
#region RML Changed
- protected virtual async void OnRmlChanged(object sender, Rml rml)
+ protected virtual void OnRmlChanged(object sender, Rml rml)
{
- TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync();
- CoatsCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Coats).OrderBy(x => x.Name).ToListAsync();
+ //There is no need for that.
- //Replace all brush stops twine color catalogs.
- foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Twine).ToList())
- {
- var replacement = TwineCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name);
- stop.ColorCatalog = replacement;
- }
+ ////Replace all brush stops twine color catalogs.
+ //foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Twine).ToList())
+ //{
+ // var replacement = CatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name);
+ // stop.ColorCatalog = replacement;
+ //}
- //Replace all brush stops coats color catalogs.
- foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Coats).ToList())
- {
- var replacement = CoatsCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name);
- stop.ColorCatalog = replacement;
- }
+ ////Replace all brush stops coats color catalogs.
+ //foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Coats).ToList())
+ //{
+ // var replacement = CoatsCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name);
+ // stop.ColorCatalog = replacement;
+ //}
ResetFineTuning();
}
@@ -935,31 +930,17 @@ namespace Tango.PPC.Jobs.ViewModels
/// Opens the twine catalog for the specified brush stop.
/// </summary>
/// <param name="stop">The stop.</param>
- private async void OpenTwineCatalog(BrushStop stop)
- {
- var catalogItem = await NavigationManager.NavigateForResult<JobsModule, TwineCatalogView, CatalogItem, TwineCatalogNavigationObject>(new TwineCatalogNavigationObject()
- {
- BrushStop = stop,
- RML = Job.Rml,
- }, true);
-
- if (catalogItem != null)
- {
- stop.ColorCatalog = TwineCatalogItems.SingleOrDefault(x => x.Name == catalogItem.Entity.Name);
- }
- }
-
- private async void OpenCoatsCatalog(BrushStop stop)
+ private async void OpenCatalog(BrushStop stop)
{
- var catalogItem = await NavigationManager.NavigateForResult<JobsModule, CoatsCatalogView, CatalogItem, TwineCatalogNavigationObject>(new TwineCatalogNavigationObject()
+ var catalogItem = await NavigationManager.NavigateForResult<JobsModule, TwineCatalogView, ColorCatalogsItem, TwineCatalogNavigationObject>(new TwineCatalogNavigationObject()
{
- BrushStop = stop,
- RML = Job.Rml,
+ SelectedItem = stop.ColorCatalogsItem,
+ Catalog = SelectedCatalog
}, true);
if (catalogItem != null)
{
- stop.ColorCatalog = CoatsCatalogItems.SingleOrDefault(x => x.Name == catalogItem.Entity.Name);
+ stop.ColorCatalogsItem = catalogItem;
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
index 248003b30..b7a6ad94a 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
@@ -421,12 +421,12 @@ namespace Tango.PPC.Jobs.ViewModels
if (settings.LastJobColorSpace != null)
{
- vm.SelectedColorSpace = settings.LastJobColorSpace.Value.IsUserSpace() ? settings.LastJobColorSpace.Value : ColorSpaces.Twine;
+ vm.SelectedColorSpace = settings.LastJobColorSpace.Value.IsUserSpace() ? settings.LastJobColorSpace.Value : ColorSpaces.Catalog;
}
else
{
var space = machine.SupportedColorSpaces.FirstOrDefault();
- vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Twine;
+ vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Catalog;
}
if (colorProfile != null || twnFile != null)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs
index a72013d26..d7d720434 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
-using Tango.BL.Catalogs;
using Tango.BL.Entities;
using Tango.Core.Commands;
using Tango.PPC.Common;
@@ -19,26 +18,26 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
/// <seealso cref="PPCViewModel" />
/// <seealso cref="INavigationResultProvider{CatalogItem, TwineCatalogNavigationObject}" />
- public class TwineCatalogViewVM : PPCViewModel, INavigationResultProvider<CatalogItem, TwineCatalogNavigationObject>
+ public class TwineCatalogViewVM : PPCViewModel, INavigationResultProvider<ColorCatalogsItem, TwineCatalogNavigationObject>
{
private bool _confirmed;
private ObservablesContext _db;
- private Catalog _catalog;
+ private ColorCatalog _catalog;
/// <summary>
/// Gets or sets the catalog.
/// </summary>
- public Catalog Catalog
+ public ColorCatalog Catalog
{
get { return _catalog; }
set { _catalog = value; RaisePropertyChangedAuto(); }
}
- private Catalog _recent;
+ private ColorCatalog _recent;
/// <summary>
/// Gets or sets the recent catalog items as a complete catalog.
/// </summary>
- public Catalog Recent
+ public ColorCatalog Recent
{
get { return _recent; }
set { _recent = value; RaisePropertyChangedAuto(); }
@@ -57,11 +56,11 @@ namespace Tango.PPC.Jobs.ViewModels
set { _filter = value; RaisePropertyChangedAuto(); }
}
- private CatalogItem _selectedItem;
+ private ColorCatalogsItem _selectedItem;
/// <summary>
/// Gets or sets the selected item.
/// </summary>
- public CatalogItem SelectedItem
+ public ColorCatalogsItem SelectedItem
{
get { return _selectedItem; }
set
@@ -106,7 +105,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
private void Confirm()
{
- SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentTwineCatalogColors.Add(SelectedItem.Entity.Name);
+ SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentTwineCatalogColors.Add(SelectedItem.Guid);
SettingsManager.Default.Save();
_confirmed = true;
@@ -117,7 +116,7 @@ namespace Tango.PPC.Jobs.ViewModels
/// Called when the navigation system requests a result when it is navigating away from this instance.
/// </summary>
/// <returns></returns>
- public CatalogItem GetNavigationResult()
+ public ColorCatalogsItem GetNavigationResult()
{
if (_confirmed)
{
@@ -133,21 +132,16 @@ namespace Tango.PPC.Jobs.ViewModels
/// Called when the navigation object has been received
/// </summary>
/// <param name="brushStop">The brush stop.</param>
- public async virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj)
+ public virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj)
{
IsFree = false;
- Catalog = await CatalogLoader.LoadCatalog(BL.Enumerations.ColorSpaces.Twine, obj.RML, _db);
- Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentTwineCatalogColors);
- IsFree = true;
- if (obj.BrushStop.ColorCatalog != null)
- {
- SelectedItem = Catalog.Groups.SelectMany(x => x.Items).SingleOrDefault(x => x.Entity.Guid == obj.BrushStop.ColorCatalog.Guid);
- }
- else
- {
- SelectedItem = null;
- }
+ Catalog = obj.Catalog;
+ //Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate<JobsModuleSettings>().RecentTwineCatalogColors);
+
+ SelectedItem = obj.SelectedItem;
+
+ IsFree = true;
}
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml
deleted file mode 100644
index 60f747ab9..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml
+++ /dev/null
@@ -1,57 +0,0 @@
-<UserControl x:Class="Tango.PPC.Jobs.Views.CoatsCatalogView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:vm="clr-namespace:Tango.PPC.Jobs.ViewModels"
- xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
- xmlns:controls="clr-namespace:Tango.PPC.Jobs.Controls"
- xmlns:global="clr-namespace:Tango.PPC.Jobs"
- xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
- mc:Ignorable="d"
- d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:CoatsCatalogViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.CoatsCatalogViewVM}">
- <Grid>
- <Grid Background="{StaticResource TangoMidBackgroundBrush}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
-
- <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
- <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Coats Catalog</TextBlock>
- </Border>
-
- <Grid Grid.Row="1">
- <touch:TouchLoadingPanel IsLoading="{Binding IsBusy}">
- <DockPanel Margin="10">
- <Border DockPanel.Dock="Bottom" Height="100">
- <touch:TouchButton Command="{Binding OKCommand}" FontSize="{StaticResource TangoButtonFontSize}" HorizontalAlignment="Right" VerticalAlignment="Center" Content="SELECT" Height="60" Width="200" Style="{StaticResource TangoHollowButton}" Margin="0 0 20 0" />
- </Border>
-
- <DockPanel Margin="0 10 0 0">
- <Grid DockPanel.Dock="Top" Height="76">
- <Grid.Background>
- <LinearGradientBrush>
- <GradientStop Color="#ed2880" Offset="0" />
- <GradientStop Color="#e74f68" Offset="1" />
- </LinearGradientBrush>
- </Grid.Background>
- <DockPanel>
- <Image DockPanel.Dock="Left" Source="../Images/Coats/coats-sylko-logo.png" Stretch="None" />
- <Image DockPanel.Dock="Right" Source="../Images/Coats/thread.png" Stretch="None" />
- <StackPanel Margin="40 0 0 0" HorizontalAlignment="Left" Orientation="Horizontal">
- <Image Source="../Images/Coats/coats.png" Stretch="None" />
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="White" FontWeight="SemiBold" FontSize="20">Shade Card</TextBlock>
- </StackPanel>
- </DockPanel>
- </Grid>
- <Border Style="{StaticResource TangoTouchBorder}" Padding="20 20 20 100">
- <controls:CoatsCatalogViewer Catalog="{Binding Catalog,Mode=TwoWay}" Recent="{Binding Recent}" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" Filter="{Binding Filter,Mode=TwoWay}" />
- </Border>
- </DockPanel>
- </DockPanel>
- </touch:TouchLoadingPanel>
- </Grid>
- </Grid>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs
deleted file mode 100644
index c644b32b4..000000000
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace Tango.PPC.Jobs.Views
-{
- /// <summary>
- /// Interaction logic for TwineCatalogColorCorrectionView.xaml
- /// </summary>
- public partial class CoatsCatalogView : UserControl
- {
- public CoatsCatalogView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
index 957fead70..ec21ebade 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
@@ -86,30 +86,10 @@
</UniformGrid>
</DataTemplate>
- <DataTemplate x:Key="TWINE_Template" DataType="{x:Type entities:BrushStop}">
+ <DataTemplate x:Key="CATALOG_Template" DataType="{x:Type entities:BrushStop}">
<DockPanel>
- <touch:TouchIconButton Margin="0 0 -50 -10" CornerRadius="50" Width="50" Height="50" Padding="13" RippleBrush="{StaticResource TangoRippleDarkBrush}" DockPanel.Dock="Right" Icon="Palette" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenTwineCatalogCommand}" CommandParameter="{Binding}"></touch:TouchIconButton>
- <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding ElementName=view,Path=DataContext.TwineCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding ElementName=view,Path=DataContext.TwineCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
- <touch:TouchAutoComplete.ItemTemplate>
- <DataTemplate>
- <DockPanel Margin="2">
- <Rectangle Width="24" Height="24">
- <Rectangle.Fill>
- <SolidColorBrush Color="{Binding Color,Mode=OneWay}"></SolidColorBrush>
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock Margin="5 0 0 0" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
- </DockPanel>
- </DataTemplate>
- </touch:TouchAutoComplete.ItemTemplate>
- </touch:TouchAutoComplete>
- </DockPanel>
- </DataTemplate>
-
- <DataTemplate x:Key="COATS_Template" DataType="{x:Type entities:BrushStop}">
- <DockPanel>
- <touch:TouchIconButton Margin="0 0 -50 -10" CornerRadius="50" Width="50" Height="50" Padding="13" RippleBrush="{StaticResource TangoRippleDarkBrush}" DockPanel.Dock="Right" Icon="Palette" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenCoatsCatalogCommand}" CommandParameter="{Binding}"></touch:TouchIconButton>
- <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding ElementName=view,Path=DataContext.CoatsCatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding ElementName=view,Path=DataContext.CoatsCatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalog,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
+ <touch:TouchIconButton Margin="0 0 -50 -10" CornerRadius="50" Width="50" Height="50" Padding="13" RippleBrush="{StaticResource TangoRippleDarkBrush}" DockPanel.Dock="Right" Icon="Palette" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenCatalogCommand}" CommandParameter="{Binding}"></touch:TouchIconButton>
+ <touch:TouchAutoComplete Margin="2 0" ItemsSource="{Binding ElementName=view,Path=DataContext.CatalogItems}" Watermark="Color Code" PopupHeight="250" DisplayMemberPath="Name" AutoCompleteProvider="{Binding ElementName=view,Path=DataContext.CatalogAutoCompleteProvider}" SelectedItem="{Binding ColorCatalogsItem,Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" keyboard:KeyboardView.Container="{Binding ElementName=Container}">
<touch:TouchAutoComplete.ItemTemplate>
<DataTemplate>
<DockPanel Margin="2">
@@ -161,11 +141,8 @@
<DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
- <Setter Property="ContentTemplate" Value="{StaticResource TWINE_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Coats">
- <Setter Property="ContentTemplate" Value="{StaticResource COATS_Template}" />
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Catalog">
+ <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Volume">
<Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" />
@@ -306,11 +283,8 @@
<DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Twine">
- <Setter Property="ContentTemplate" Value="{StaticResource TWINE_Template}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Coats">
- <Setter Property="ContentTemplate" Value="{StaticResource COATS_Template}" />
+ <DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Catalog">
+ <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=view,Path=DataContext.Job.ColorSpace.Name,IsAsync=True}" Value="Volume">
<Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" />
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml
index 21361e74f..505ccc312 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml
@@ -16,7 +16,6 @@
<views:JobSummeryView />
<views:JobView />
<views:TwineCatalogView />
- <views:CoatsCatalogView />
<views:JobProgressView />
</controls:NavigationControl>
</Grid>