黄学彪
2020-04-08 4dce704aaf8587cf3f91cf88f2208315a03c4cbb
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -1005,27 +1005,27 @@
                            }
                            sceneRemoveMemberData.DeviceList = removeSceneDeviceListInfoList;
                            sceneRemoveMemberData.ScenesId = modifySceneUI.Id;
                            var result = await HdlSceneLogic.Current.ModifyScene(modifySceneUI, sceneRemoveMemberData, memberDataList);
                            if (result == 1)
                            {
                                if (modifyRoom != curRoom)
                                {
                                    modifyRoom.ListSceneId.Remove(modifySceneUI.Id);
                                    curRoom.ListSceneId.Add(modifySceneUI.Id);
                                    modifyRoom.Save();
                                    curRoom.Save();
                                }
                                EditorAction?.Invoke(modifySceneUI, curRoom);
                                RemoveFromParent();
                            }
                            else if (result == 0)
                            {
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
                            }
                            else if (result == -1)
                            {
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            }
                            //var result = await HdlSceneLogic.Current.ModifyScene(modifySceneUI, sceneRemoveMemberData, memberDataList);
                            //if (result == 1)
                            //{
                            //    if (modifyRoom != curRoom)
                            //    {
                            //        modifyRoom.ListSceneId.Remove(modifySceneUI.Id);
                            //        curRoom.ListSceneId.Add(modifySceneUI.Id);
                            //        modifyRoom.Save();
                            //        curRoom.Save();
                            //    }
                            //    EditorAction?.Invoke(modifySceneUI, curRoom);
                            //    RemoveFromParent();
                            //}
                            //else if (result == 0)
                            //{
                            //    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
                            //}
                            //else if (result == -1)
                            //{
                            //    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            //}
                        }
                        catch (Exception ex)
                        {
@@ -1116,20 +1116,20 @@
                                }
                            }
                            var result = await HdlSceneLogic.Current.AddScene(curRoom, nameRow.NameText.Text, imgPath, memberDataList, IconPathType);
                            if (result == 1)
                            {
                                AddAction?.Invoke();
                                RemoveFromParent();
                            }
                            else if (result == 0)
                            {
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.AddSceneFail));
                            }
                            else if (result == -1)
                            {
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            }
                            //var result = await HdlSceneLogic.Current.AddScene(curRoom, nameRow.NameText.Text, imgPath, memberDataList, IconPathType);
                            //if (result == 1)
                            //{
                            //    AddAction?.Invoke();
                            //    RemoveFromParent();
                            //}
                            //else if (result == 0)
                            //{
                            //    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.AddSceneFail));
                            //}
                            //else if (result == -1)
                            //{
                            //    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            //}
                        }
                        catch (Exception ex)
                        {
@@ -1314,7 +1314,7 @@
            comfrimBtn.MouseUpEventHandler = (sender, e) =>
            {
                var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
                var taskList = new List<Safeguard.TaskListInfo> { };
                int taskType = 1;
                int data1 = 0;
                int data2 = 0;
@@ -1331,7 +1331,7 @@
                    data1 = 0;
                    data2 = 0;
                }
                var taskInfo = new ZigBee.Device.Scene.TaskListInfo
                var taskInfo = new Safeguard.TaskListInfo
                {
                    TaskType = taskType,
                    Data1 = data1,
@@ -1477,7 +1477,7 @@
            comfrimBtn.MouseUpEventHandler = (sender, e) =>
            {
                var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
                var taskList = new List<Safeguard.TaskListInfo> { };
                int taskType = 6;
                int data1 = 0;
@@ -1496,7 +1496,7 @@
                    data2 = open.SeekBar.Progress;
                }
                var taskInfo = new ZigBee.Device.Scene.TaskListInfo
                var taskInfo = new Safeguard.TaskListInfo
                {
                    TaskType = taskType,
                    Data1 = data1,
@@ -1643,7 +1643,7 @@
            comfrimBtn.MouseUpEventHandler = (sender, e) =>
            {
                var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
                var taskList = new List<Safeguard.TaskListInfo> { };
                int taskType = 3;
                int data1 = 0;
@@ -1662,7 +1662,7 @@
                    data2 = 0;
                }
                var taskInfo = new ZigBee.Device.Scene.TaskListInfo
                var taskInfo = new Safeguard.TaskListInfo
                {
                    TaskType = taskType,
                    Data1 = data1,
@@ -1834,7 +1834,7 @@
            comfrimBtn.MouseUpEventHandler = (sender, e) =>
            {
                var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
                var taskList = new List<Safeguard.TaskListInfo> { };
                int taskType = 5;
                int data1 = 0;
@@ -1845,7 +1845,7 @@
                    //关
                    data1 = 3;
                    data2 = 0;
                    var taskInfo = new ZigBee.Device.Scene.TaskListInfo
                    var taskInfo = new Safeguard.TaskListInfo
                    {
                        TaskType = taskType,
                        Data1 = data1,
@@ -1856,7 +1856,7 @@
                else
                {
                    //fan
                    var taskInfo = new ZigBee.Device.Scene.TaskListInfo
                    var taskInfo = new Safeguard.TaskListInfo
                    {
                        TaskType = taskType,
                        Data1 = 6,
@@ -1865,7 +1865,7 @@
                    taskList.Add(taskInfo);
                    //mode
                    var taskInfo2 = new ZigBee.Device.Scene.TaskListInfo
                    var taskInfo2 = new Safeguard.TaskListInfo
                    {
                        TaskType = taskType,
                        Data1 = 3,
@@ -1877,7 +1877,7 @@
                    if (open.modeList[modelId] == 4)
                    {
                        //heat
                        var taskInfo3 = new ZigBee.Device.Scene.TaskListInfo
                        var taskInfo3 = new Safeguard.TaskListInfo
                        {
                            TaskType = taskType,
                            Data1 = 4,
@@ -1889,7 +1889,7 @@
                    else
                    {
                        //heat
                        var taskInfo3 = new ZigBee.Device.Scene.TaskListInfo
                        var taskInfo3 = new Safeguard.TaskListInfo
                        {
                            TaskType = taskType,
                            Data1 = 5,