WJC
2020-03-23 1f6f024bddf48dea1c17c54ade1535a10ef7b39b
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
old mode 100755 new mode 100644
@@ -23,6 +23,7 @@
        {
            #region  View布局代码
            UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -35,6 +36,7 @@
            }
            view.clickBtn.MouseDownEventHandler += (sender, e) =>
            {
               // UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑
                action();
                RemoveFromParent();
            };
@@ -179,6 +181,9 @@
                {
                    SelectedDeviceView selecteddevice = new SelectedDeviceView();
                    selecteddevice.Show(middle);
                    selecteddevice.stateRow.AddRightView(selecteddevice.edit);
                    selecteddevice.stateRow.AddRightView(selecteddevice.del);
                    var Type = int.Parse(ListConditions[i]["Type"]);
                    var conditions = ListConditions[i];
                    string name = "";
@@ -679,10 +684,7 @@
            addactionview.clickBtn.MouseUpEventHandler+= (sender, e) =>
            {
                Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
                var deviceTarget = new DeviceTarget();
                UserView.HomePage.Instance.AddChidren(deviceTarget);
                UserView.HomePage.Instance.PageIndex += 1;
                deviceTarget.Show();
                Method.View(IfString.Action_Logic,IfString.Action_LogicScene);
            };
            List<Dictionary<string, object>> ListActions = new List<Dictionary<string, object>>();
@@ -701,10 +703,7 @@
                    addflview.clickBtn.MouseUpEventHandler += (sender, e) =>
                    {
                        Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
                        var deviceTarget = new DeviceTarget();
                        UserView.HomePage.Instance.AddChidren(deviceTarget);
                        UserView.HomePage.Instance.PageIndex += 1;
                        deviceTarget.Show();
                        Method.View(IfString.Action_Logic, IfString.Action_LogicScene);
                    };
                }
                else
@@ -721,13 +720,13 @@
                    switch (linkType)
                    {
                        case 0:
                        case 8:
                            {
                                var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
                                name = deviceinof.DeviceEpointName;
                                actiondevice.regionNameBtn.Visible = true;
                                Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
                                switch (deviceinof.Type)
                                {
                                    case DeviceType.OnOffOutput:
@@ -968,16 +967,28 @@
                                            }
                                        }
                                        break;
                                    case DeviceType.DoorLock:
                                        {
                                            //门锁特殊
                                            icon = "ZigeeLogic/doorlock.png";
                                            if (actions["PassData"].ToString() == "055704010112")
                                            {
                                                state = Language.StringByID(MyInternationalizationString.logicopen);
                                            }
                                            else
                                            {
                                                state = Language.StringByID(MyInternationalizationString.logicclose);
                                            }
                                        }
                                        break;
                                }
                            }
                            break;
                        case 2:
                            {
                                //在本地查找该场景;
                                var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
                               //在本地查找该场景;
                               var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
                                //本地没有存在;
                                if (sceneinof == null)
                                {
@@ -1052,7 +1063,7 @@
                                var seconds = delaytimevalue % 60;
                                icon = "ZigeeLogic/delay.png";
                                if (Minutes != 0)
                                {
                                    if (seconds == 0)
@@ -1073,6 +1084,13 @@
                            };
                            break;
                    }
                    if (linkType != 2)
                    {
                        actiondevice.stateRow.AddRightView(actiondevice.edit);
                    }
                    actiondevice.stateRow.AddRightView(actiondevice.del);
                    if (linkType == 6 || linkType == 7)
                    {
                        actiondevice.ordinaryBtn.Visible = true;
@@ -1093,7 +1111,7 @@
                    {
                        switch (linkType)
                        {
                            case 8:
                            case 0:
                                {
                                    var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
@@ -1119,6 +1137,7 @@
                                    delayTime.Show(int.Parse(actiondevice.edit.Tag.ToString()), true);
                                }
                                break;
                        }
                    };
                    ///删除控件