From 199aa2eb46bf1625d0bbc8b98efe35d158cff9be Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 8 Feb 2022 12:48:14 +0200 Subject: Implement MyColors in PPC Related Work Items: #4558 --- .../Controls/TwineCatalogRenderer.cs | 6 ++--- .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 1 + .../PPC/Tango.PPC.Common/Resources/Styles.xaml | 30 +++++++++++++++++++--- 3 files changed, 30 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs index 9b865c18b..3af921f7d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs @@ -52,7 +52,7 @@ namespace Tango.PPC.Common.Controls private double groupMargin = 50; private bool selectedFromClick; private LightTouchScrollViewer _scrollViewer; - private BitmapSource _myColorBitmap; + // private BitmapSource _myColorBitmap; private double imageWidth = 24; private double imageHeight = 22; private Point _lastMouseClickPoint; @@ -100,7 +100,7 @@ namespace Tango.PPC.Common.Controls this.PreviewMouseUp += TwineCatalogRenderer_MouseLeftButtonUp; this.Loaded += TwineCatalogRenderer_Loaded; - _myColorBitmap = new BitmapImage(new Uri($"pack://application:,,,/Tango.PPC.JobsV2;component/Images/ColorSelection/Heart.png", UriKind.Absolute)); + // _myColorBitmap = new BitmapImage(new Uri($"pack://application:,,,/Tango.PPC.JobsV2;component/Images/ColorSelection/Heart.png", UriKind.Absolute)); } private void TwineCatalogRenderer_Loaded(object sender, RoutedEventArgs e) @@ -292,7 +292,7 @@ namespace Tango.PPC.Common.Controls DrawingVisual drawingVisual = new DrawingVisual(); DrawingContext drawingContext = drawingVisual.RenderOpen(); - drawingContext.DrawImage(_myColorBitmap, imageRect); + // drawingContext.DrawImage(_myColorBitmap, imageRect); drawingContext.DrawEllipse(new SolidColorBrush(item.Color), null, new Point(x + ellipseWidth / 2, y + ellipseHeight / 2), ellipseWidth / 2, ellipseHeight / 2); 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 bb0a694cf..780941f66 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -19,6 +19,7 @@ + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml index bb1890e7f..432f2b58b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml @@ -58,10 +58,32 @@ - + + + + + + + + + +