| | |
| | | |
| | | namespace Shared.Phone.Device.Logic |
| | | { |
| | | |
| | | public class AddLogicPage : FrameLayout |
| | | { |
| | | public AddLogicPage () |
| | | public AddLogicPage() |
| | | { |
| | | Tag = "Logic"; |
| | | } |
| | | public void Show() |
| | | public void Show() |
| | | { |
| | | |
| | | #region 最上面的布局代码 |
| | |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor, |
| | | Height = Application.GetRealHeight(184), |
| | | LineColor= ZigbeeColor.Current.LogicRowLayoutTopLineColor, |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor, |
| | | }; |
| | | this.AddChidren(topRowLayout); |
| | | |
| | |
| | | var clickBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(81 + 51), |
| | | Height = Application.GetRealHeight(58+40), |
| | | Y = Application.GetRealHeight(98-40), |
| | | Height = Application.GetRealHeight(58 + 40), |
| | | Y = Application.GetRealHeight(98 - 40), |
| | | }; |
| | | topRowLayout.AddChidren(clickBtn); |
| | | clickBtn.MouseDownEventHandler += (sender, e) => |
| | |
| | | //Gravity = Gravity.CenterVertical; |
| | | UnSelectedImagePath = "ZigeeLogic/back.png", |
| | | }; |
| | | topRowLayout.AddChidren (back); |
| | | topRowLayout.AddChidren(back); |
| | | back.MouseDownEventHandler += (sender, e) => { |
| | | RemoveFromParent (); |
| | | RemoveFromParent(); |
| | | }; |
| | | #endregion |
| | | |
| | | #region 最下面的布局代码 |
| | | var middle = new FrameLayout { |
| | | Y=topRowLayout.Bottom, |
| | | Height=Application.GetRealHeight(1920-184), |
| | | Y = topRowLayout.Bottom, |
| | | Height = Application.GetRealHeight(1920 - 184), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | this.AddChidren (middle); |
| | | this.AddChidren(middle); |
| | | |
| | | #region ----时间条件---- |
| | | var timeframelayout= new FrameLayout |
| | | var timeframelayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | middle.AddChidren(timeframelayout); |
| | | |
| | | |
| | | |
| | | var timeiconBtn = new Button |
| | | { |
| | |
| | | Width = Application.GetRealWidth(850), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(176), |
| | | LineColor= ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | timeframelayout.AddChidren(timerow); |
| | | ///时间条件 |
| | | var btntime = new Button { |
| | | Text=Language.StringByID (MyInternationalizationString.timecondition), |
| | | Text = Language.StringByID(MyInternationalizationString.timecondition), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | timerow.AddChidren (btntime); |
| | | timerow.AddChidren(btntime); |
| | | |
| | | var btntimeback = new Button { |
| | | Width = Application.GetRealWidth(58), |
| | |
| | | X = Application.GetRealWidth(789), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | timerow.AddChidren (btntimeback); |
| | | timerow.AddChidren(btntimeback); |
| | | |
| | | EventHandler<MouseEventArgs> timeclick = (sender, e) => |
| | | { |
| | |
| | | timeiconBtn.MouseUpEventHandler += timeclick; |
| | | timerow.MouseUpEventHandler += timeclick; |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region ----设备状态条件---- |
| | | var deviceframelayout = new FrameLayout |
| | | { |
| | |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | Y = timeframelayout.Bottom, |
| | | }; |
| | | middle.AddChidren (deviceframelayout); |
| | | middle.AddChidren(deviceframelayout); |
| | | |
| | | var deviceiconBtn = new Button |
| | | { |
| | |
| | | }; |
| | | deviceframelayout.AddChidren(devicerow); |
| | | |
| | | |
| | | |
| | | ///设备状态条件 |
| | | var btndevice = new Button { |
| | | //Text = "设备状态条件", |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | devicerow.AddChidren (btndevice); |
| | | devicerow.AddChidren(btndevice); |
| | | |
| | | var btndeviceback = new Button { |
| | | Width = Application.GetRealWidth(58), |
| | |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | |
| | | }; |
| | | devicerow.AddChidren (btndeviceback); |
| | | devicerow.AddChidren(btndeviceback); |
| | | |
| | | EventHandler<MouseEventArgs> devicestateclick = (sender, e) => |
| | | { |
| | |
| | | Height = Application.GetRealHeight(58), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | X = Application.GetRealWidth(789), |
| | | Gravity=Gravity.CenterVertical, |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | securityrow.AddChidren(btnsecurityback); |
| | | |
| | |
| | | |
| | | #region ----已有自动化条件---- |
| | | var existencerowlayout = new RowLayout { |
| | | Height = Application.GetRealHeight (180), |
| | | Y= securityframelayout.Bottom, |
| | | Height = Application.GetRealHeight(180), |
| | | Y = securityframelayout.Bottom, |
| | | }; |
| | | //middle.AddChidren (existencerowlayout); |
| | | ///已有自动化条件 |
| | |
| | | TextID = MyInternationalizationString.automation, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | existencerowlayout.AddChidren (btnexistence); |
| | | existencerowlayout.AddChidren(btnexistence); |
| | | |
| | | var btnexistenceback = new Button { |
| | | Width = Application.GetRealWidth (110), |
| | | Height = Application.GetRealHeight (110), |
| | | Width = Application.GetRealWidth(110), |
| | | Height = Application.GetRealHeight(110), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | SelectedImagePath = "ZigeeLogic/NextSelecte.png", |
| | | X = Application.GetRealWidth (1080 - 140), |
| | | Gravity=Gravity.CenterVertical, |
| | | X = Application.GetRealWidth(1080 - 140), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | existencerowlayout.AddChidren (btnexistenceback); |
| | | existencerowlayout.AddChidren(btnexistenceback); |
| | | |
| | | EventHandler<MouseEventArgs> logicclick = (sender, e) => { |
| | | var logicListAutomation = new LogicListAutomation (); |
| | | UserView.HomePage.Instance.AddChidren (logicListAutomation); |
| | | var logicListAutomation = new LogicListAutomation(); |
| | | UserView.HomePage.Instance.AddChidren(logicListAutomation); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | logicListAutomation.Show (); |
| | | logicListAutomation.Show(); |
| | | }; |
| | | btnexistenceback.MouseUpEventHandler += logicclick; |
| | | btnexistence.MouseUpEventHandler += logicclick; |
| | | existencerowlayout.MouseUpEventHandler += logicclick; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 安防条件View |
| | | /// </summary> |
| | |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | |
| | | var securityfra1= new FrameLayout |
| | | var securityfra1 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080), |
| | | Height = Application.GetRealHeight(100), |
| | |
| | | { |
| | | Width = Application.GetRealWidth(1080), |
| | | Height = Application.GetRealHeight(690), |
| | | Y = Application.GetRealHeight(1920-690), |
| | | Y = Application.GetRealHeight(1920 - 690), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(60), |
| | | }; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | logicCommunalPage.Show(() => { }); |
| | | }; |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 地理围栏View |
| | |
| | | TextColor = ZigbeeColor.Current.LogicBtnCancelColor, |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(200), |
| | | X=Application.GetRealWidth(80), |
| | | TextAlignment=TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(80), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | timetype.AddChidren(Btncancel); |
| | | Btncancel.MouseUpEventHandler += (sender16, e16) => |
| | |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | }; |
| | | |
| | | var Btntitle= new Button |
| | | var Btntitle = new Button |
| | | { |
| | | TextID = MyInternationalizationString.type, |
| | | TextColor = ZigbeeColor.Current.LogicBtnTypeColor, |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(320), |
| | | TextAlignment = TextAlignment.Center, |
| | | X= Btncancel.Right+Application.GetRealWidth(100), |
| | | X = Btncancel.Right + Application.GetRealWidth(100), |
| | | TextSize = 16, |
| | | }; |
| | | timetype.AddChidren(Btntitle); |
| | |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Btntitle.Right + Application.GetRealWidth(100), |
| | | |
| | | |
| | | }; |
| | | timetype.AddChidren(Btncomplete); |
| | | #endregion |
| | |
| | | var timepointFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y = timetype.Bottom+Application.GetRealHeight(20), |
| | | Y = timetype.Bottom + Application.GetRealHeight(20), |
| | | }; |
| | | timetypeframelayout.AddChidren(timepointFrameLayout); |
| | | |
| | |
| | | var timeFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y =timepointFrameLayout.Bottom, |
| | | Y = timepointFrameLayout.Bottom, |
| | | }; |
| | | timetypeframelayout.AddChidren(timeFrameLayout); |
| | | |
| | |
| | | time1row.AddChidren(timeSelected); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | ///立即执行点击事件 |
| | | EventHandler<MouseEventArgs> timepointclick = (sedner14, e14) => |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |