| | |
| | | #endregion |
| | | |
| | | #region ◆ 接口____________________________ |
| | | /// <summary> |
| | | /// 该接口将弃用 改用DeviceInfoChange() |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | public void Changed(CommonDevice common) |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Changeds the IL ogic status. |
| | | /// </summary> |
| | | /// <param name="logic">Logic.</param> |
| | | public void ChangedILogicStatus(ZigBee.Device.Logic logic) |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// Changeds the IS cene status. |
| | | /// </summary> |
| | | /// <param name="scene">Scene.</param> |
| | | public void ChangedISceneStatus(Scene scene) |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 设备状态更新接口 |
| | | /// <para>type:如果为 DeviceInComingRespon:设备新上报</para> |
| | |
| | | functionSceneBodyView.AddChidren(sceneScrolView); |
| | | foreach (var scene in sceneList) |
| | | { |
| | | var sceneView = new SceneCategoryView(0, 0); |
| | | var sceneView = new SceneCategoryView(); |
| | | sceneScrolView.AddChidren(sceneView); |
| | | sceneView.Init(scene, room); |
| | | GetDelayScene(sceneScrolView); |
| | | } |
| | | sceneView.InitControl(scene, room); |
| | | }
|
| | | GetDelayScene(sceneScrolView); |
| | | } |
| | | } |
| | | |
| | |
| | | for (int i = 0; scrolViewLayout != null && i < scrolViewLayout.ChildrenCount; i++) |
| | | { |
| | | var sceneView = scrolViewLayout.GetChildren(i) as SceneCategoryView; |
| | | if (sceneView == null)
|
| | | {
|
| | | continue;
|
| | | } |
| | | foreach (var delayScenesListResponseInfo in delayList) |
| | | { |
| | | if (delayScenesListResponseInfo.ScenesId == sceneView.scene.Id) |
| | |
| | | sceneView.scene.RemainTime = delayScenesListResponseInfo.RemainTime; |
| | | var remainTime = delayScenesListResponseInfo.RemainTime; |
| | | if (remainTime > 0) |
| | | { |
| | | {
|
| | | //开启内部延时时间线程(旨在全部地方的同一场景时间同步)
|
| | | HdlSceneLogic.Current.StartDelayTimeThread(sceneView.scene); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | while (remainTime-- > 0) |
| | | while (remainTime > 0 && this.Parent != null) |
| | | { |
| | | System.Threading.Thread.Sleep(1000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | sceneView.SetTimeText(CommonFormResouce.GetTimeString(remainTime)); |
| | | }); |
| | | remainTime--; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | sceneView.scene.RemainTime = 0; |
| | | sceneView.SetTimeImage(); |
| | | if (this.Parent != null)
|
| | | {
|
| | | sceneView.SetTimeImage(); |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// GetExecScene |
| | | /// </summary> |
| | | /// <param name="scrolViewLayout"></param> |
| | | private void GetExecScene(VerticalScrolViewLayout scrolViewLayout) |
| | | { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | }
|
| | |
|
| | | #endregion |
| | | |
| | |
|
| | | #region ◆ 自动化__________________________ |
| | | |
| | |
|
| | | /// <summary> |
| | | /// 自动化功能代码入口 |
| | | /// </summary> |
| | | private void ShowAutotion() |
| | | { |
| | | // functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | | #region ---推荐模板的组件 |
| | | //推荐模板背景控件 |
| | | {
|
| | | // functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
|
| | |
|
| | | var bjFrameLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080 - 58), |
| | |
| | | //关闭刷新View; |
| | | logicScrolView.EndHeaderRefreshing(); |
| | | }; |
| | | logicScrolView.BeginHeaderRefreshingAction += () => |
| | | { |
| | | //重新刷新logic列表 |
| | | Common.Logic.LogicList.Clear(); |
| | | Read(logicScrolView, no); |
| | | //关闭刷新View; |
| | | logicScrolView.EndHeaderRefreshing(); |
| | | };
|
| | |
|
| | | Read(logicScrolView, no); |
| | | |
| | | Read(logicScrolView, no); |
| | | |
| | |
| | | refresview.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | } |
| | | } |
| | | |
| | | |
| | | foreach (var logic in Common.Logic.LogicList) |
| | | { |
| | | var fLayout = new FrameLayout |
| | |
| | | Logic.Send.DelLogic(logic.LogicId); |
| | | } |
| | | }; |
| | | alert.Show(); |
| | | |
| | | }; |
| | | var line = new Button |
| | |
| | | { |
| | | commonDeviceList.Add(common); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | #endregion |
| | | |
| | | |
| | |
|
| | |
|
| | | } |
| | | } |