From 6735203163f95e9210c63a506d30894b4622f301 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 1 Jul 2018 20:21:40 +0300 Subject: Working on twine color catalog. --- .../Controls/TwineCatalogControl.xaml | 94 ++++++++++++++++++++++ .../Controls/TwineCatalogControl.xaml.cs | 46 +++++++++++ .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 2 +- .../PPC/Tango.PPC.Common/Tango.PPC.Common.csproj | 7 ++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml new file mode 100644 index 000000000..142e1a10c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs new file mode 100644 index 000000000..ad1c8b50c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs @@ -0,0 +1,46 @@ +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.Common.Controls +{ + /// + /// Interaction logic for TwineCatalogControl.xaml + /// + public partial class TwineCatalogControl : UserControl + { + private Catalog _catalog; + + public TwineCatalogControl() + { + InitializeComponent(); + Loaded += TwineCatalogControl_Loaded; + DataContextChanged += (x, y) => { _catalog = DataContext as Catalog; }; + } + + private void TwineCatalogControl_Loaded(object sender, RoutedEventArgs e) + { + + } + + private void TouchSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) + { + if (_catalog != null) + { + list.ScrollToItem(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue)); + } + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index e28234573..a6e2cbec2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -34,7 +34,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj index 82bed24e6..98210a76f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -92,6 +92,9 @@ PPC.cs + + TwineCatalogControl.xaml + @@ -103,6 +106,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer -- cgit v1.3.1