From fd1f19e8479c764fa28b0da3a2f9b34a3debe772 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 03 八月 2023 21:47:04 +0800 Subject: [PATCH] 2023年08月03日21:47:02 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs index d1060d2..ff748b3 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs @@ -132,21 +132,38 @@ // }.Show(MainPage.BaseView); // return; //} - this.btnPictrue.CanClick = false; - this.btnSwitch.CanClick = false; - string statu = this.btnSwitch.IsSelected == true ? "off" : "on"; - HdlThreadLogic.Current.RunThread(() => + string tipMsg = "纭畾鎵撳紑?"; + if (this.btnSwitch.IsSelected) { - var dic = new Dictionary<string, string>(); - dic.Add(FunctionAttributeKey.OnOff, statu); - Control.Ins.SendWriteCommand(this.device, dic, true); - HdlThreadLogic.Current.RunMain(() => + tipMsg = "纭畾鍏抽棴?"; + } + if (Language.CurrentLanguage != "Chinese") + { + + tipMsg = "Are you sure to close?"; + if (this.btnSwitch.IsSelected) + tipMsg = "Are you sure to open it?"; + } + Action action = () => { + + this.btnPictrue.CanClick = false; + this.btnSwitch.CanClick = false; + + HdlThreadLogic.Current.RunThread(() => { - this.btnPictrue.CanClick = true; - this.btnSwitch.CanClick = true; + var dic = new Dictionary<string, string>(); + dic.Add(FunctionAttributeKey.OnOff, statu); + Control.Ins.SendWriteCommand(this.device, dic, true); + HdlThreadLogic.Current.RunMain(() => + { + this.btnPictrue.CanClick = true; + this.btnSwitch.CanClick = true; + }); }); - }); + }; + new PublicAssmebly().TipOptionMsg(StringId.Tip, tipMsg, action); + } #endregion -- Gitblit v1.8.0