| | |
| | | |
| | | bodyView = this; |
| | | scene = s; |
| | | sceneFunction = fc.localFunction.ConvertSceneFunction(); |
| | | sceneFunction = fc;//.localFunction.ConvertSceneFunction(); |
| | | foreach (var ll in sceneFunction.status) |
| | | { |
| | | try |
| | |
| | | { |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" }); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Delay, value = sceneFunction.delay }); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (temp != null) |
| | | { |
| | | //temp.delay = sceneFunction.delay; |
| | | //foreach (var attr in sceneFunction.status) |
| | | //{ |
| | | // var keva = temp.status.Find((obj) => obj.key == attr.key); |
| | | // if (keva != null) |
| | | // { |
| | | // keva.value = attr.value; |
| | | // } |
| | | //} |
| | | //temp = sceneFunction; |
| | | scene.functions.Remove(temp); |
| | | } |
| | | //else |
| | |
| | | |
| | | void UpdataFunctionRow() |
| | | { |
| | | try |
| | | { |
| | | contentView.RemoveAll(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log(ex.Message); |
| | | } |
| | | for (var i = 0; i < functionRowList.Count; i++) |
| | | { |
| | | try |
| | |
| | | { |
| | | if (view.Tag != null) |
| | | { |
| | | if (view.Tag.ToString() == FunctionAttributeKey.OnOff) |
| | | if (view.Tag.ToString() == FunctionAttributeKey.OnOff || view.Tag.ToString() == "delay") |
| | | { |
| | | contentView.AddChidren(view); |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (isOnStatus) |
| | | { |
| | | if (view.Tag.ToString() != FunctionAttributeKey.OnOff) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (view.Tag.ToString() != FunctionAttributeKey.OnOff) |
| | | if (view.Tag.ToString() != FunctionAttributeKey.OnOff && view.Tag.ToString() != "delay") |
| | | { |
| | | view.RemoveFromParent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | btnFunctionName.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEditDialog_OnOff(sceneStatus, btnFunctionText); |
| | | //var colorfulModePage = new SetSceneRgbColorfulModePage(); |
| | | //colorfulModePage.backAction = (selectedSerise,status) => { |
| | | // if (selectedSerise == null) |
| | | // { |
| | | // if (status == "on") |
| | | // { |
| | | // isColorful = true; |
| | | // } |
| | | // else |
| | | // { |
| | | // isColorful = false; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // isColorful = true; |
| | | // rgbColorful = selectedSerise.ConvertSceneFunction(); |
| | | // } |
| | | // if (isColorful) |
| | | // { |
| | | // btnFunctionText.TextID = StringId.On; |
| | | // if (selectedSerise != null) |
| | | // { |
| | | // btnFunctionText.Text = selectedSerise.name; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // btnFunctionText.TextID = StringId.OFF; |
| | | // } |
| | | // UpdataFunctionRow(); |
| | | //}; |
| | | //MainPage.BasePageView.AddChidren(colorfulModePage); |
| | | //colorfulModePage.LoadPage(sceneFunction.localFunction.sid.Substring(0,16)); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | |
| | | }; |
| | | |
| | | #endregion |