黄学彪
2020-04-26 18a7f9f40e5fab3bee5d4ac3d8fd0273dea052d6
ZigbeeApp/Shared/Phone/Device/Logic/OneLogic.cs
@@ -53,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);
@@ -130,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正常时间点","1日出时间","2日落时间","3正午时间"
                            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)
                {
@@ -154,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(true);
                        oneTimePoint.Show((timeString) =>
                        {
                            if (!string.IsNullOrEmpty(timeString))
                            {
                                //编辑完回来先更新时间
                                selecteddevice.selecetddevicestateBtn.Text = timeString;
                            }
                        });
                    }
                };
@@ -322,7 +333,7 @@
        }
        /// <summary>
        /// 选中该设备功能作为条件或者目标的视图方法
        /// 选中该作为条件或者目标的视图方法
        /// </summary>
        /// <param name="common">Common.</param>
         void DevcieView( CommonDevice common,Button button)
@@ -360,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)
            {