Index: Core/Components/src/Core.Components.GraphSharp.Forms/Converters/IconToImageSourceConverter.cs =================================================================== diff -u --- Core/Components/src/Core.Components.GraphSharp.Forms/Converters/IconToImageSourceConverter.cs (revision 0) +++ Core/Components/src/Core.Components.GraphSharp.Forms/Converters/IconToImageSourceConverter.cs (revision 7d883600b177b00b62ece3722edc207348c109ea) @@ -0,0 +1,57 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Diagnostics; +using System.Drawing; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Interop; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace Core.Components.GraphSharp.Forms.Converters +{ + public class IconToImageSourceConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var icon = value as Icon; + if (icon == null) + { + Trace.TraceWarning("Attempted to convert {0} instead of Icon object in IconToImageSourceConverter", value); + return null; + } + + ImageSource imageSource = Imaging.CreateBitmapSourceFromHIcon( + icon.Handle, + Int32Rect.Empty, + BitmapSizeOptions.FromEmptyOptions()); + return imageSource; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } + } +} Index: Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r3265d1d674a16b70b7133f599bb1bc677d245784 -r7d883600b177b00b62ece3722edc207348c109ea --- Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3265d1d674a16b70b7133f599bb1bc677d245784) +++ Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7d883600b177b00b62ece3722edc207348c109ea) @@ -19,7 +19,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -61,12 +61,22 @@ } /// - /// Looks up a localized string similar to * Het getal is afgerond. Kijk in het eigenschappenpaneel door op de node te klikken voor het volledige getal.. + /// Looks up a localized string similar to Alle getallen kleiner dan 1/100.000 zijn afgerond weergegeven in wetenschappelijke notatie. Dit is gedaan om de leesbaarheid te bevorderen. Kijk in het eigenschappenpaneel door op de node te klikken voor het volledige getal.. /// - public static string Value_Is_Rounded_ { + public static string Value_In_Scientific_Notation_ { get { - return ResourceManager.GetString("Value_Is_Rounded_", resourceCulture); + return ResourceManager.GetString("Value_In_Scientific_Notation_", resourceCulture); } } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + public static System.Drawing.Icon warning { + get { + object obj = ResourceManager.GetObject("warning", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } } } Index: Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.resx =================================================================== diff -u -r3265d1d674a16b70b7133f599bb1bc677d245784 -r7d883600b177b00b62ece3722edc207348c109ea --- Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.resx (.../Resources.resx) (revision 3265d1d674a16b70b7133f599bb1bc677d245784) +++ Core/Components/src/Core.Components.GraphSharp.Forms/Properties/Resources.resx (.../Resources.resx) (revision 7d883600b177b00b62ece3722edc207348c109ea) @@ -1,123 +1,127 @@  - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - * Het getal is afgerond. Kijk in het eigenschappenpaneel door op de node te klikken voor het volledige getal. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Alle getallen kleiner dan 1/100.000 zijn afgerond weergegeven in wetenschappelijke notatie. Dit is gedaan om de leesbaarheid te bevorderen. Kijk in het eigenschappenpaneel door op de node te klikken voor het volledige getal. + + + ..\Resources\warning.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file Index: Core/Components/src/Core.Components.GraphSharp.Forms/Resources/warning.ico =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.GraphSharp.Forms/Templates/ZoomControlTemplate.xaml =================================================================== diff -u -r3265d1d674a16b70b7133f599bb1bc677d245784 -r7d883600b177b00b62ece3722edc207348c109ea --- Core/Components/src/Core.Components.GraphSharp.Forms/Templates/ZoomControlTemplate.xaml (.../ZoomControlTemplate.xaml) (revision 3265d1d674a16b70b7133f599bb1bc677d245784) +++ Core/Components/src/Core.Components.GraphSharp.Forms/Templates/ZoomControlTemplate.xaml (.../ZoomControlTemplate.xaml) (revision 7d883600b177b00b62ece3722edc207348c109ea) @@ -24,8 +24,11 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:p="clr-namespace:Core.Components.GraphSharp.Forms.Properties" - xmlns:wpfExtensionsControls="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions"> + xmlns:wpfExtensionsControls="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions" + xmlns:converters="clr-namespace:Core.Components.GraphSharp.Forms.Converters"> + +