| | |
| | | }
|
| | | 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)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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)
|
| | | {
|
| | |
| | |
|
| | | 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;
|
| | |
| | | data1 = 0;
|
| | | data2 = 0;
|
| | | }
|
| | | var taskInfo = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = data1,
|
| | |
| | |
|
| | | comfrimBtn.MouseUpEventHandler = (sender, e) =>
|
| | | {
|
| | | var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
|
| | | var taskList = new List<Safeguard.TaskListInfo> { };
|
| | |
|
| | | int taskType = 6;
|
| | | int data1 = 0;
|
| | |
| | | data2 = open.SeekBar.Progress;
|
| | | }
|
| | |
|
| | | var taskInfo = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = data1,
|
| | |
| | |
|
| | | comfrimBtn.MouseUpEventHandler = (sender, e) =>
|
| | | {
|
| | | var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
|
| | | var taskList = new List<Safeguard.TaskListInfo> { };
|
| | |
|
| | | int taskType = 3;
|
| | | int data1 = 0;
|
| | |
| | | data2 = 0;
|
| | | }
|
| | |
|
| | | var taskInfo = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = data1,
|
| | |
| | | comfrimBtn.MouseUpEventHandler = (sender, e) =>
|
| | | {
|
| | |
|
| | | var taskList = new List<ZigBee.Device.Scene.TaskListInfo> { };
|
| | | var taskList = new List<Safeguard.TaskListInfo> { };
|
| | |
|
| | | int taskType = 5;
|
| | | int data1 = 0;
|
| | |
| | | //关
|
| | | data1 = 3;
|
| | | data2 = 0;
|
| | | var taskInfo = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = data1,
|
| | |
| | | else
|
| | | {
|
| | | //fan
|
| | | var taskInfo = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = 6,
|
| | |
| | | taskList.Add(taskInfo);
|
| | |
|
| | | //mode
|
| | | var taskInfo2 = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo2 = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = 3,
|
| | |
| | | if (open.modeList[modelId] == 4)
|
| | | {
|
| | | //heat
|
| | | var taskInfo3 = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo3 = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = 4,
|
| | |
| | | else
|
| | | {
|
| | | //heat
|
| | | var taskInfo3 = new ZigBee.Device.Scene.TaskListInfo
|
| | | var taskInfo3 = new Safeguard.TaskListInfo
|
| | | {
|
| | | TaskType = taskType,
|
| | | Data1 = 5,
|