| | |
| | | |
| | | |
| | | var titleName = new Button { |
| | | //Text = "添加执行目标", |
| | | //TextID = MyInternationalizationString.addImplementationgoals, |
| | | TextID = MyInternationalizationString.addaction, |
| | | TextSize = 17, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(150), |
| | | }; |
| | | topFrameLayout.AddChidren (titleName); |
| | | |
| | |
| | | middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | this.AddChidren(middle); |
| | | |
| | | #region ----- 设备------ |
| | | var deviceRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | |
| | | deviceRowLayout.MouseUpEventHandler += deviceclick; |
| | | device.MouseUpEventHandler += deviceclick; |
| | | btndeviceback.MouseUpEventHandler += deviceclick; |
| | | #endregion |
| | | |
| | | #region ----- 场景------ |
| | | var sceneRowLayout = new RowLayout { |
| | | Height = Application.GetRealHeight (180), |
| | | //BackgroundColor = 0xff323232, |
| | |
| | | sceneRowLayout.MouseUpEventHandler += sceneclick; |
| | | scene.MouseUpEventHandler += sceneclick; |
| | | btnsceneback.MouseUpEventHandler += sceneclick; |
| | | #endregion |
| | | |
| | | #region ----- 安防模式------ |
| | | ///安防模式 |
| | | var securityRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | //BackgroundColor = 0xff323232, |
| | | Y = sceneRowLayout.Bottom, |
| | | }; |
| | | middle.AddChidren(securityRowLayout); |
| | | |
| | | var security = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | TextID = MyInternationalizationString.securitymode, |
| | | //Text = "安防模式", |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(40), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | securityRowLayout.AddChidren(security); |
| | | |
| | | var btnsecurityback = new Button |
| | | { |
| | | Width = Application.GetRealWidth(110), |
| | | Height = Application.GetRealHeight(110), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | SelectedImagePath = "ZigeeLogic/NextSelecte.png", |
| | | X = Application.GetRealWidth(1080 - 140),//550 |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | securityRowLayout.AddChidren(btnsecurityback); |
| | | |
| | | EventHandler<MouseEventArgs> securityclick = (sender, e) => { |
| | | var securityMode = new SecurityMode(); |
| | | UserView.HomePage.Instance.AddChidren(securityMode); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | securityMode.Show(); |
| | | }; |
| | | |
| | | securityRowLayout.MouseUpEventHandler += securityclick; |
| | | security.MouseUpEventHandler += securityclick; |
| | | btnsecurityback.MouseUpEventHandler += securityclick; |
| | | #endregion |
| | | |
| | | #region ----- 已有自动化------ |
| | | |
| | | ///已有自动化 |
| | | var existenceRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | //BackgroundColor = 0xff323232, |
| | | Y = sceneRowLayout.Bottom, |
| | | Y = securityRowLayout.Bottom, |
| | | }; |
| | | middle.AddChidren(existenceRowLayout); |
| | | //middle.AddChidren(existenceRowLayout); |
| | | |
| | | var existence = new Button |
| | | { |
| | |
| | | existenceRowLayout.MouseUpEventHandler += existenceclick; |
| | | existence.MouseUpEventHandler += existenceclick; |
| | | btnexistenceback.MouseUpEventHandler += existenceclick; |
| | | #endregion |
| | | |
| | | ///安防模式 |
| | | var securityRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | //BackgroundColor = 0xff323232, |
| | | Y = existenceRowLayout.Bottom, |
| | | }; |
| | | middle.AddChidren(securityRowLayout); |
| | | |
| | | var security = new Button |
| | | { |
| | | Width = Application.GetRealWidth(400), |
| | | TextID = MyInternationalizationString.securitymode, |
| | | //Text = "安防模式", |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(40), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | securityRowLayout.AddChidren(security); |
| | | |
| | | var btnsecurityback = new Button |
| | | { |
| | | Width = Application.GetRealWidth(110), |
| | | Height = Application.GetRealHeight(110), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | SelectedImagePath = "ZigeeLogic/NextSelecte.png", |
| | | X = Application.GetRealWidth(1080 - 140),//550 |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | securityRowLayout.AddChidren(btnsecurityback); |
| | | |
| | | EventHandler<MouseEventArgs>securityclick = (sender, e) => { |
| | | var securityMode = new SecurityMode(); |
| | | UserView.HomePage.Instance.AddChidren(securityMode); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | securityMode.Show(); |
| | | }; |
| | | |
| | | securityRowLayout.MouseUpEventHandler += securityclick; |
| | | security.MouseUpEventHandler += securityclick; |
| | | btnsecurityback.MouseUpEventHandler += securityclick; |
| | | |
| | | |
| | | |
| | | #region ----- 延时------ |
| | | var delayedRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | //BackgroundColor = 0xff323232, |
| | | Y=securityRowLayout.Bottom, |
| | | }; |
| | | middle.AddChidren(delayedRowLayout); |
| | | //middle.AddChidren(delayedRowLayout); |
| | | |
| | | var delayed = new Button |
| | | { |
| | |
| | | delayedRowLayout.MouseUpEventHandler += delayedclick; |
| | | delayed.MouseUpEventHandler += delayedclick; |
| | | btndelayedback.MouseUpEventHandler += delayedclick; |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | public static void DelayTimeView(Dictionary<string, object> delayactionsInfo=null) |