From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:50:43 +0800 Subject: [PATCH] Revert "1" --- HDL_ON/Entity/Function/AC.cs | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs index e05d976..3f9a905 100644 --- a/HDL_ON/Entity/Function/AC.cs +++ b/HDL_ON/Entity/Function/AC.cs @@ -225,6 +225,48 @@ } /// <summary> + /// 褰撳墠妯″紡鐨刬con璺緞 + /// </summary> + /// <param name="lightingIcon">鑾峰彇鐨勫浘鏍囩被鍨嬶紝榛樿鏄偣浜�</param> + /// <returns></returns> + public string GetSwingIconPath(string swingValue,bool lightingIcon = true) + { + var imagePath = "FunctionIcon/AC/SweepIconNullOn.png"; + if (lightingIcon) + { + switch (swingValue) + { + case "up_down": + imagePath = "FunctionIcon/AC/SweepIconUDOn.png"; + break; + case "left_right": + imagePath = "FunctionIcon/AC/SweepIconLROn.png"; + break; + case "stop": + imagePath = "FunctionIcon/AC/SweepIconNullOn.png"; + break; + } + } + else + { + imagePath = "FunctionIcon/AC/SweepIconNull.png"; + switch (swingValue) + { + case "up_down": + imagePath = "FunctionIcon/AC/SweepIconUD.png"; + break; + case "left_right": + imagePath = "FunctionIcon/AC/SweepIconLR.png"; + break; + case "stop": + imagePath = "FunctionIcon/AC/SweepIconNull.png"; + break; + } + } + return imagePath; + } + + /// <summary> /// 褰撳墠椋庨�熺殑icon璺緞 /// </summary> /// <param name="lightingIcon">鑾峰彇鐨勫浘鏍囩被鍨嬶紝榛樿鏄偣浜�</param> @@ -304,6 +346,31 @@ } /// <summary> + /// 鑾峰彇鎵妯″紡灞炴�ф枃鏈� + /// </summary> + /// <returns></returns> + public string GetSwingAttrText(string value) + { + string text = ""; + switch (value) + { + #region 妯″紡 + case "up_down": + text = Language.StringByID(StringId.Swing_Up_Down); + break; + case "left_right": + text = Language.StringByID(StringId.Swing_Left_Right); + break; + case "stop": + text = Language.StringByID(StringId.tingzhi); + break; + #endregion + } + return text; + } + + + /// <summary> /// 鑾峰彇椋庨�熷睘鎬ф枃鏈� /// </summary> /// <returns></returns> -- Gitblit v1.8.0