From 1e65c49ba929103e79d87322ca1a3573c2b532e2 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期五, 25 十月 2024 17:13:42 +0800 Subject: [PATCH] 更改K3的精度 和 gama单位 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/GlobalResource.cs | 42 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 37 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/GlobalResource.cs b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/GlobalResource.cs index f2565d1..074b653 100644 --- a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/GlobalResource.cs +++ b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/GlobalResource.cs @@ -1,30 +1,62 @@ 锘縰sing System; using System.Collections.Generic; +using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using static System.Net.Mime.MediaTypeNames; namespace DPumpHydr.WinFrmUI.Volute { public class GlobalResource { public static string ResourcesPath = @"Data\MainForm\Icons"; + public static string tipTrailingIcon = "alert-square-rounded.png";//杈撳叆妗嗗墠缂� 鏍囧繀椤诲浘鐗� + public static string tipLeadingIcon = "north-star.png";//杈撳叆妗嗗悗缂� 鏍囪鍛婂浘鐗� /// <summary> - /// 鍥剧墖 + /// 杈撳叆妗嗗墠缂� 鏍囧繀椤诲浘鏍� + /// </summary> + /// <returns></returns> + public static System.Drawing.Image GetTipTrailingIcon() + { + System.Drawing.Image image = null; + if (tipTrailingIcon != null) + { + image = GlobalResource.BuildImage(tipTrailingIcon); + } + return image; + } + + /// <summary> + /// 杈撳叆妗嗗悗缂� 鏍囪鍛婂浘鏍� + /// </summary> + /// <returns></returns> + public static System.Drawing.Image GetLeadingIcon() + { + System.Drawing.Image image = null; + if (tipLeadingIcon != null) + { + image = GlobalResource.BuildImage(tipLeadingIcon); + } + return image; + } + + /// <summary> + /// 鎸囧畾澶у皬鍥剧墖 /// </summary> /// <param name="path">鏂囦欢澶硅矾寰勶紙缂栬瘧璺緞涓嬬殑锛�</param> /// <param name="filename">鏂囦欢鍚�</param> /// <returns></returns> - public static System.Drawing.Image BuildImage( string filename,int size ) + public static System.Drawing.Image BuildImage( string filename,int widthsize ,int heightsize ) { var image = BuildImage( filename); if (image == null) return null; - if (size > 0) + if (widthsize > 0 && heightsize > 0) { - System.Drawing.Image thumbnail = image.GetThumbnailImage(size, size, () => false, IntPtr.Zero); + System.Drawing.Image thumbnail = image.GetThumbnailImage(widthsize, heightsize, () => false, IntPtr.Zero); return thumbnail; } else @@ -34,7 +66,7 @@ } /// <summary> - /// 璺緞銆佹枃浠跺悕鎷兼帴 + /// 鍘熷ぇ灏忓浘鐗� /// </summary> /// <param name="path">璺緞</param> /// <param name="filename">鏂囦欢鍚�</param> -- Gitblit v1.9.3