From 0fda2ba3ff49bdc1ffc6833f658e2164af187008 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 16 Jan 2018 12:17:10 +0200 Subject: Embedded RealTimeGraphEx library to solution. Added graphs to technician view. Implemented simple sensors data test using Machine Emulator. --- .../WriteableBitmapContextExtensions.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphEx/WriteableBitmap/WriteableBitmapContextExtensions.cs (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphEx/WriteableBitmap/WriteableBitmapContextExtensions.cs') diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/WriteableBitmap/WriteableBitmapContextExtensions.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/WriteableBitmap/WriteableBitmapContextExtensions.cs new file mode 100644 index 000000000..0846a76ed --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/WriteableBitmap/WriteableBitmapContextExtensions.cs @@ -0,0 +1,55 @@ +#region Header +// +// Project: WriteableBitmapEx - WriteableBitmap extensions +// Description: Collection of extension methods for the WriteableBitmap class. +// +// Changed by: $Author: unknown $ +// Changed on: $Date: 2015-03-05 18:18:24 +0100 (Do, 05 Mrz 2015) $ +// Changed in: $Revision: 113191 $ +// Project: $URL: https://writeablebitmapex.svn.codeplex.com/svn/trunk/Source/WriteableBitmapEx/WriteableBitmapContextExtensions.cs $ +// Id: $Id: WriteableBitmapContextExtensions.cs 113191 2015-03-05 17:18:24Z unknown $ +// +// +// Copyright © 2009-2015 Rene Schulte and WriteableBitmapEx Contributors +// +// This code is open source. Please read the License.txt for details. No worries, we won't sue you! ;) +// +#endregion + +using System; + +#if NETFX_CORE +namespace Windows.UI.Xaml.Media.Imaging +#else +namespace System.Windows.Media.Imaging +#endif +{ + /// + /// Provides the WriteableBitmap context pixel data + /// + internal static partial class WriteableBitmapContextExtensions + { + /// + /// Gets a BitmapContext within which to perform nested IO operations on the bitmap + /// + /// For WPF the BitmapContext will lock the bitmap. Call Dispose on the context to unlock + /// + /// + internal static BitmapContext GetBitmapContext(this WriteableBitmap bmp) + { + return new BitmapContext(bmp); + } + + /// + /// Gets a BitmapContext within which to perform nested IO operations on the bitmap + /// + /// For WPF the BitmapContext will lock the bitmap. Call Dispose on the context to unlock + /// The bitmap. + /// The ReadWriteMode. If set to ReadOnly, the bitmap will not be invalidated on dispose of the context, else it will + /// + internal static BitmapContext GetBitmapContext(this WriteableBitmap bmp, ReadWriteMode mode) + { + return new BitmapContext(bmp, mode); + } + } +} -- cgit v1.3.1