From 8b9ce384b26c414db32f98e94e088f5334869c2d Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 13 十一月 2019 15:36:28 +0800 Subject: [PATCH] 全部合并了代码,安卓和 IOS 都测试通过了 --- ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs | 95 ++++++++++++++++++++++++----------------------- 1 files changed, 49 insertions(+), 46 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs index 1b5ddfc..299fba0 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs @@ -8,13 +8,14 @@ namespace Shared.Phone.Device.Logic { + public class AddLogicPage : FrameLayout { - public AddLogicPage () + public AddLogicPage() { Tag = "Logic"; } - public void Show() + public void Show() { #region 鏈�涓婇潰鐨勫竷灞�浠g爜 @@ -22,7 +23,7 @@ { BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor, Height = Application.GetRealHeight(184), - LineColor= ZigbeeColor.Current.LogicRowLayoutTopLineColor, + LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor, }; this.AddChidren(topRowLayout); @@ -41,8 +42,8 @@ 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) => @@ -59,28 +60,28 @@ //Gravity = Gravity.CenterVertical; UnSelectedImagePath = "ZigeeLogic/back.png", }; - topRowLayout.AddChidren (back); + topRowLayout.AddChidren(back); back.MouseDownEventHandler += (sender, e) => { - RemoveFromParent (); + RemoveFromParent(); }; #endregion #region 鏈�涓嬮潰鐨勫竷灞�浠g爜 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 { @@ -99,16 +100,16 @@ 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), @@ -117,7 +118,7 @@ X = Application.GetRealWidth(789), Gravity = Gravity.CenterVertical, }; - timerow.AddChidren (btntimeback); + timerow.AddChidren(btntimeback); EventHandler<MouseEventArgs> timeclick = (sender, e) => { @@ -129,8 +130,8 @@ timeiconBtn.MouseUpEventHandler += timeclick; timerow.MouseUpEventHandler += timeclick; - #endregion - + #endregion + #region ----璁惧鐘舵�佹潯浠�---- var deviceframelayout = new FrameLayout { @@ -138,7 +139,7 @@ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, Y = timeframelayout.Bottom, }; - middle.AddChidren (deviceframelayout); + middle.AddChidren(deviceframelayout); var deviceiconBtn = new Button { @@ -161,7 +162,7 @@ }; deviceframelayout.AddChidren(devicerow); - + ///璁惧鐘舵�佹潯浠� var btndevice = new Button { //Text = "璁惧鐘舵�佹潯浠�", @@ -169,7 +170,7 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicTextBlackColor, }; - devicerow.AddChidren (btndevice); + devicerow.AddChidren(btndevice); var btndeviceback = new Button { Width = Application.GetRealWidth(58), @@ -179,7 +180,7 @@ UnSelectedImagePath = "ZigeeLogic/next.png", }; - devicerow.AddChidren (btndeviceback); + devicerow.AddChidren(btndeviceback); EventHandler<MouseEventArgs> devicestateclick = (sender, e) => { @@ -240,7 +241,7 @@ Height = Application.GetRealHeight(58), UnSelectedImagePath = "ZigeeLogic/next.png", X = Application.GetRealWidth(789), - Gravity=Gravity.CenterVertical, + Gravity = Gravity.CenterVertical, }; securityrow.AddChidren(btnsecurityback); @@ -319,8 +320,8 @@ #region ----宸叉湁鑷姩鍖栨潯浠�---- var existencerowlayout = new RowLayout { - Height = Application.GetRealHeight (180), - Y= securityframelayout.Bottom, + Height = Application.GetRealHeight(180), + Y = securityframelayout.Bottom, }; //middle.AddChidren (existencerowlayout); ///宸叉湁鑷姩鍖栨潯浠� @@ -332,34 +333,35 @@ 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> @@ -376,7 +378,7 @@ flMain.RemoveFromParent(); }; - var securityfra1= new FrameLayout + var securityfra1 = new FrameLayout { Width = Application.GetRealWidth(1080), Height = Application.GetRealHeight(100), @@ -388,7 +390,7 @@ { 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), }; @@ -696,7 +698,7 @@ UserView.HomePage.Instance.PageIndex += 1; logicCommunalPage.Show(() => { }); }; - + } /// <summary> /// 鍦扮悊鍥存爮View @@ -1029,8 +1031,8 @@ 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) => @@ -1039,14 +1041,14 @@ 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); @@ -1058,7 +1060,7 @@ Width = Application.GetRealWidth(200), TextAlignment = TextAlignment.CenterRight, X = Btntitle.Right + Application.GetRealWidth(100), - + }; timetype.AddChidren(Btncomplete); #endregion @@ -1069,7 +1071,7 @@ var timepointFrameLayout = new FrameLayout { Height = Application.GetRealHeight(160), - Y = timetype.Bottom+Application.GetRealHeight(20), + Y = timetype.Bottom + Application.GetRealHeight(20), }; timetypeframelayout.AddChidren(timepointFrameLayout); @@ -1103,7 +1105,7 @@ var timeFrameLayout = new FrameLayout { Height = Application.GetRealHeight(160), - Y =timepointFrameLayout.Bottom, + Y = timepointFrameLayout.Bottom, }; timetypeframelayout.AddChidren(timeFrameLayout); @@ -1131,7 +1133,7 @@ time1row.AddChidren(timeSelected); #endregion - + ///绔嬪嵆鎵ц鐐瑰嚮浜嬩欢 EventHandler<MouseEventArgs> timepointclick = (sedner14, e14) => { @@ -1200,4 +1202,5 @@ } } + } -- Gitblit v1.8.0