From 18a7f9f40e5fab3bee5d4ac3d8fd0273dea052d6 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期日, 26 四月 2020 12:05:28 +0800 Subject: [PATCH] 先上传一个非最新的版本 --- ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs | 66 +++++++++++++++++++++----------- 1 files changed, 43 insertions(+), 23 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs index 3d58db9..866f354 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs @@ -28,14 +28,23 @@ #region View甯冨眬浠g爜 TopView view = new TopView(); this.AddChidren(view.TopRowView()); - if (Common.Logic.CurrentLogic.LogicId != 0) + + if (Yes) { - view.toptitleNameBtn.Text = Language.StringByID(MyInternationalizationString.editautomation); + view.toptitleNameBtn.Text = Language.StringByID(MyInternationalizationString.look); } else { - view.toptitleNameBtn.Text = Language.StringByID(MyInternationalizationString.newautomation); + if (Common.Logic.CurrentLogic.LogicId != 0) + { + view.toptitleNameBtn.Text = Language.StringByID(MyInternationalizationString.editautomation); + } + else + { + view.toptitleNameBtn.Text = Language.StringByID(MyInternationalizationString.newautomation); + } } + view.clickBtn.MouseDownEventHandler += (sender, e) => { // UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦 @@ -44,7 +53,7 @@ var middle = new VerticalScrolViewLayout { Y = view.topRowLayout.Bottom, - Height = Application.GetRealHeight(1920 - 184 - 180), + Height = Application.GetRealHeight(Method.H - 184 - 180), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, }; this.AddChidren(middle); @@ -121,20 +130,25 @@ var conditions = Common.Logic.CurrentLogic.Conditions[i]; switch (Type) { - case 5: + case 0: { - - selecteddevice.ordinaryBtn.Visible = true; - selecteddevice.iconBtn.UnSelectedImagePath = "ZigeeLogic/timeparagraph.png"; - string s1 = "", s2 = ""; - s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; - s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"]; - ///鏄剧ず鏃堕棿 - selecteddevice.ordinaryBtn.Text = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2; - selecteddevice.selecetddevicestateBtn.Text = Language.StringByID(MyInternationalizationString.timeframe); + + //"0姝e父鏃堕棿鐐�","1鏃ュ嚭鏃堕棿","2鏃ヨ惤鏃堕棿","3姝e崍鏃堕棿" + switch (int.Parse(conditions["DateType"])) + { + case 0: + { + selecteddevice.ordinaryBtn.Text = Language.StringByID(MyInternationalizationString.immediateexecution); + selecteddevice.iconBtn.UnSelectedImagePath = "ZigeeLogic/timepoint.png"; + string s = ""; + s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; + selecteddevice.selecetddevicestateBtn.Text= conditions["StartHour"] + ":" + s; + } + break; + } + } break; - } if (Yes) { @@ -145,13 +159,19 @@ ///缂栬緫 selecteddevice.edit.MouseUpEventHandler += (sender, e) => { - if (Type==5) { - var timePage = new TimePage(); - UserView.HomePage.Instance.AddChidren(timePage); + if (Type == 0) + { + var oneTimePoint = new OneTimePoint(); + UserView.HomePage.Instance.AddChidren(oneTimePoint); UserView.HomePage.Instance.PageIndex += 1; - timePage.str1 = conditions["StartHour"] + ":" + conditions["StartMin"] + "-" + conditions["StopHour"] + ":" + conditions["StopMin"]; - timePage.IsEditor = true; - timePage.Show(); + oneTimePoint.Show((timeString) => + { + if (!string.IsNullOrEmpty(timeString)) + { + //缂栬緫瀹屽洖鏉ュ厛鏇存柊鏃堕棿 + selecteddevice.selecetddevicestateBtn.Text = timeString; + } + }); } }; @@ -313,7 +333,7 @@ } /// <summary> - /// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠舵垨鑰呯洰鏍囩殑瑙嗗浘鏂规硶 + /// 閫変腑璇ヤ綔涓烘潯浠舵垨鑰呯洰鏍囩殑瑙嗗浘鏂规硶 /// </summary> /// <param name="common">Common.</param> void DevcieView( CommonDevice common,Button button) @@ -351,7 +371,7 @@ Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); actionsInfo.Add("LinkType", 8); actionsInfo.Add("DeviceAddr", common.DeviceAddr); - actionsInfo.Add("Epoint", common.DeviceEpoint); + actionsInfo.Add("Epoint","200"); string SelectedDeviceStatus = ""; switch (common.Type) { -- Gitblit v1.8.0