From 1c4904d77f484c075080942d87785481b52b6fb2 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 28 十月 2019 14:58:46 +0800
Subject: [PATCH] Revert "Merge branch 'dev-tzy' into DEV_GXC"
---
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs | 1243 +++++++++++++++++++----------------------------------------
1 files changed, 402 insertions(+), 841 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index df2d07c..2e14c60 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -14,172 +14,106 @@
{
Tag = "Logic";
}
- public void Show()
+ public void Show ()
{
+
+ this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- #region 鏈�涓婇潰鐨勫竷灞�浠g爜
- var topRowLayout = new RowLayout
- {
- BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
- Height = Application.GetRealHeight(184),
- LineColor= ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ var topFrameLayout = new FrameLayout {
+ Height = Application.GetRealHeight (140),
+ Y = Application.GetRealHeight (80),
};
- this.AddChidren(topRowLayout);
+ AddChidren (topFrameLayout);
var titleName = new Button {
- TextSize = 16,
+ TextID = MyInternationalizationString.selection,
+ TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(176),
- Width = Application.GetRealWidth(400),
- Height = Application.GetRealHeight(69),
- Y = Application.GetRealHeight(92),
- TextID = MyInternationalizationString.selection,
+ X = Application.GetRealWidth(150),
};
- topRowLayout.AddChidren(titleName);
+ topFrameLayout.AddChidren (titleName);
- var clickBtn = new Button
- {
- Width = Application.GetRealWidth(81 + 51),
- Height = Application.GetRealHeight(58+40),
- Y = Application.GetRealHeight(98-40),
+ var back = new Button {
+ Width = Application.GetRealWidth (110),
+ Height = Application.GetRealHeight (110),
+ X = Application.GetRealWidth (20),
+ Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = "ZigeeLogic/Back.png",
};
- topRowLayout.AddChidren(clickBtn);
- clickBtn.MouseDownEventHandler += (sender, e) =>
- {
- RemoveFromParent();
- };
-
- var back = new Button
- {
- Width = Application.GetRealWidth(30),
- Height = Application.GetRealHeight(51),
- X = Application.GetRealWidth(81),
- Y = Application.GetRealHeight(98),
- //Gravity = Gravity.CenterVertical;
- UnSelectedImagePath = "ZigeeLogic/back.png",
- };
- topRowLayout.AddChidren (back);
+ topFrameLayout.AddChidren (back);
back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent ();
};
- #endregion
- #region 鏈�涓嬮潰鐨勫竷灞�浠g爜
- var middle = new FrameLayout {
- Y=topRowLayout.Bottom,
- Height=Application.GetRealHeight(1920-184),
- BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
- };
+ var middle = new FrameLayout ();
+ middle.Y = topFrameLayout.Bottom;
+ middle.Height = Application.GetRealHeight (1920 - 220);
+ middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
this.AddChidren (middle);
-
+
+
#region ----鏃堕棿鏉′欢----
- var timeframelayout= new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ var timerowlayout = new RowLayout {
+ Height = Application.GetRealHeight (180),
+ //Y=pointtimerowlayout.Bottom,
};
- middle.AddChidren(timeframelayout);
-
-
- var timeiconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/time.png",
-
- };
- timeframelayout.AddChidren(timeiconBtn);
-
- var timerow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor= ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- timeframelayout.AddChidren(timerow);
+ middle.AddChidren (timerowlayout);
///鏃堕棿鏉′欢
var btntime = new Button {
Text=Language.StringByID (MyInternationalizationString.timecondition),
TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth (60),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- timerow.AddChidren (btntime);
+ timerowlayout.AddChidren (btntime);
var btntimeback = new Button {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth (110),
+ Height = Application.GetRealHeight (110),
UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
+ SelectedImagePath = "ZigeeLogic/NextSelecte.png",
+ X = Application.GetRealWidth (1080 - 140),
Gravity = Gravity.CenterVertical,
};
- timerow.AddChidren (btntimeback);
+ timerowlayout.AddChidren (btntimeback);
- EventHandler<MouseEventArgs> timeclick = (sender, e) =>
- {
+ EventHandler<MouseEventArgs> timeclick = (sender, e) => {
+ //var timePage = new TimePage ();
+ //UserView.HomePage.Instance.AddChidren (timePage);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //timePage.Show ();
TimeView();
};
btntime.MouseUpEventHandler += timeclick;
btntimeback.MouseUpEventHandler += timeclick;
- timeframelayout.MouseUpEventHandler += timeclick;
- timeiconBtn.MouseUpEventHandler += timeclick;
- timerow.MouseUpEventHandler += timeclick;
-
#endregion
#region ----璁惧鐘舵�佹潯浠�----
- var deviceframelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- Y = timeframelayout.Bottom,
+ var devicerowlayout = new RowLayout {
+ Height = Application.GetRealHeight (180),
+ Y=timerowlayout.Bottom,
};
- middle.AddChidren (deviceframelayout);
-
- var deviceiconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/function.png",
-
- };
- deviceframelayout.AddChidren(deviceiconBtn);
-
- var devicerow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- deviceframelayout.AddChidren(devicerow);
-
-
+ middle.AddChidren (devicerowlayout);
///璁惧鐘舵�佹潯浠�
var btndevice = new Button {
//Text = "璁惧鐘舵�佹潯浠�",
TextID = MyInternationalizationString.device,
TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth (60),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- devicerow.AddChidren (btndevice);
+ devicerowlayout.AddChidren (btndevice);
var btndeviceback = new Button {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
- X = Application.GetRealWidth(789),
- Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth (110),
+ Height = Application.GetRealHeight (110),
UnSelectedImagePath = "ZigeeLogic/next.png",
-
+ SelectedImagePath = "ZigeeLogic/NextSelecte.png",
+ X = Application.GetRealWidth (1080-140),
+ Gravity = Gravity.CenterVertical,
};
- devicerow.AddChidren (btndeviceback);
+ devicerowlayout.AddChidren (btndeviceback);
EventHandler<MouseEventArgs> devicestateclick = (sender, e) =>
{
@@ -193,61 +127,39 @@
UserView.HomePage.Instance.PageIndex += 1;
deviceStateCondition.Show();
};
- deviceframelayout.MouseUpEventHandler += devicestateclick;
+ devicerowlayout.MouseUpEventHandler += devicestateclick;
btndevice.MouseUpEventHandler += devicestateclick;
btndeviceback.MouseUpEventHandler += devicestateclick;
- deviceiconBtn.MouseUpEventHandler += devicestateclick;
- devicerow.MouseUpEventHandler += devicestateclick;
#endregion
#region ----瀹夐槻鏉′欢----
- var securityframelayout = new FrameLayout
+ var securityrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(160),
- Y = deviceframelayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Height = Application.GetRealHeight(180),
+ Y = devicerowlayout.Bottom,
};
- middle.AddChidren(securityframelayout);
-
- var securityiconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- UnSelectedImagePath = "ZigeeLogic/security.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- securityframelayout.AddChidren(securityiconBtn);
-
- var securityrow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- securityframelayout.AddChidren(securityrow);
-
+ middle.AddChidren(securityrowlayout);
var btnsecurity = new Button
{
//Text = "瀹夐槻鏉′欢",
TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(60),
TextID = MyInternationalizationString.security,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- securityrow.AddChidren(btnsecurity);
+ securityrowlayout.AddChidren(btnsecurity);
var btnsecurityback = new Button
{
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(110),
+ Height = Application.GetRealHeight(110),
UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
- Gravity=Gravity.CenterVertical,
+ SelectedImagePath = "ZigeeLogic/NextSelecte.png",
+ X = Application.GetRealWidth(1080 - 140),
+ Gravity = Gravity.CenterVertical,
};
- securityrow.AddChidren(btnsecurityback);
+ securityrowlayout.AddChidren(btnsecurityback);
EventHandler<MouseEventArgs> securityclick = (sender, e) =>
{
@@ -255,77 +167,15 @@
this.AddChidren(flMain);
SecurityView(flMain, false);
};
- securityframelayout.MouseUpEventHandler += securityclick;
+ securityrowlayout.MouseUpEventHandler += securityclick;
btnsecurity.MouseUpEventHandler += securityclick;
btnsecurityback.MouseUpEventHandler += securityclick;
- securityiconBtn.MouseUpEventHandler += securityclick;
- securityrow.MouseUpEventHandler += securityclick;
- #endregion
-
- #region ----鍦扮悊鍥存爮鏉′欢----
- var locationframelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = securityframelayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(locationframelayout);
-
- var locationiconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- UnSelectedImagePath = "ZigeeLogic/position.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- locationframelayout.AddChidren(locationiconBtn);
-
- var locationrow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- locationframelayout.AddChidren(locationrow);
-
- var btnlocation = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- TextID = MyInternationalizationString.location,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- locationrow.AddChidren(btnlocation);
-
- var btnlocationback = new Button
- {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
- Gravity = Gravity.CenterVertical,
- };
- locationrow.AddChidren(btnlocationback);
-
- EventHandler<MouseEventArgs> locationclick = (sender, e) =>
- {
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
- this.AddChidren(flMain);
- LocationView(flMain, false);
- };
- locationframelayout.MouseUpEventHandler += locationclick;
- locationiconBtn.MouseUpEventHandler += locationclick;
- locationrow.MouseUpEventHandler += locationclick;
- btnlocation.MouseUpEventHandler += locationclick;
- btnlocationback.MouseUpEventHandler += locationclick;
#endregion
#region ----宸叉湁鑷姩鍖栨潯浠�----
var existencerowlayout = new RowLayout {
Height = Application.GetRealHeight (180),
- Y= securityframelayout.Bottom,
+ Y= securityrowlayout.Bottom,
};
//middle.AddChidren (existencerowlayout);
///宸叉湁鑷姩鍖栨潯浠�
@@ -360,10 +210,48 @@
existencerowlayout.MouseUpEventHandler += logicclick;
#endregion
-
+ #region ----鍦扮悊鍥存爮鏉′欢----
+ var locationrowlayout = new RowLayout
+ {
+ Height = Application.GetRealHeight(180),
+ Y = securityrowlayout.Bottom,
+ };
+ //middle.AddChidren(locationrowlayout);
+ var btnlocation = new Button
+ {
+ //Text = "鍦扮悊鍥存爮",
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(60),
+ TextID = MyInternationalizationString.location,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ locationrowlayout.AddChidren(btnlocation);
+
+ var btnlocationback = new Button
+ {
+ Width = Application.GetRealWidth(110),
+ Height = Application.GetRealHeight(110),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ SelectedImagePath = "ZigeeLogic/NextSelecte.png",
+ X = Application.GetRealWidth(1080 - 140),
+ Gravity = Gravity.CenterVertical,
+ };
+ locationrowlayout.AddChidren(btnlocationback);
+
+ EventHandler<MouseEventArgs> locationclick = (sender, e) =>
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ LocationView(flMain, false);
+ };
+ locationrowlayout.MouseUpEventHandler += locationclick;
+ btnlocation.MouseUpEventHandler += locationclick;
+ btnlocationback.MouseUpEventHandler += locationclick;
#endregion
-
+
+
+
}
/// <summary>
/// 瀹夐槻鏉′欢View
@@ -380,217 +268,143 @@
{
flMain.RemoveFromParent();
};
-
- var securityfra1= new FrameLayout
+ var devicefra = new FrameLayout
{
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(100),
- Y = Application.GetRealHeight(1920 - 100),
+ Width = Application.GetRealWidth(1080 - 80),
+ Height = Application.GetRealHeight(720),
+ Y = Application.GetRealHeight(1920 - 30 - 720),
+ X = Application.GetRealWidth(40),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(50),
};
- flMain.AddChidren(securityfra1);
- var securityfra = new FrameLayout
+ flMain.AddChidren(devicefra);
+
+ var devicename = new Button
{
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(690),
- Y = Application.GetRealHeight(1920-690),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(60),
+ Y = Application.GetRealHeight(20),
+ TextID = MyInternationalizationString.securityconditions,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Height = Application.GetRealHeight(150),
+ Width = Application.GetRealWidth(1080 - 80),
};
- flMain.AddChidren(securityfra);
- #region -------鍙栨秷 瀹屾垚
- var timetype = new RowLayout
+ devicefra.AddChidren(devicename);
+
+ if (SecurityConditionsInfo.ContainsKey("Type"))
{
- Height = Application.GetRealHeight(140),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- securityfra.AddChidren(timetype);
- var Btncancel = new Button
+ SecurityConditionsInfo.Remove("Type");
+ }
+ if (SecurityConditionsInfo.ContainsKey("IsValid"))
{
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- X = Application.GetRealWidth(80),
- TextAlignment = TextAlignment.CenterLeft,
- };
- timetype.AddChidren(Btncancel);
- Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ SecurityConditionsInfo.Remove("IsValid");
+ }
+ if (SecurityConditionsInfo.ContainsKey("ModeId"))
{
- flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
- };
+ SecurityConditionsInfo.Remove("ModeId");
+ }
+
+ SecurityConditionsInfo.Add("Type", "6");
+ SecurityConditionsInfo.Add("IsValid", "1");
+ SecurityConditionsInfo.Add("ModeId", "0");
- var Btntitle = new Button
+ var defenceRowLayout = new RowLayout
{
- TextID = MyInternationalizationString.security,
- TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(320),
- TextAlignment = TextAlignment.Center,
- X = Btncancel.Right + Application.GetRealWidth(100),
- TextSize = 16,
+ Height = Application.GetRealHeight(180),
+ Y = devicename.Bottom,
};
- timetype.AddChidren(Btntitle);
- var Btncomplete = new Button
- {
- TextID = MyInternationalizationString.complete,
- TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- TextAlignment = TextAlignment.CenterRight,
- X = Btntitle.Right + Application.GetRealWidth(100),
+ devicefra.AddChidren(defenceRowLayout);
- };
- timetype.AddChidren(Btncomplete);
- #endregion
-
-
- #region ----鍦ㄥ甯冮槻 绂诲甯冮槻 鎾ら槻
-
- #region 鍦ㄥ甯冮槻
-
-
- var athomeFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = timetype.Bottom + Application.GetRealHeight(20),
- };
- securityfra.AddChidren(athomeFrameLayout);
-
- var athomedefenceRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- athomeFrameLayout.AddChidren(athomedefenceRowLayout);
-
- var btnathomedefence = new Button
+ var btndefence = new Button
{
Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.logicathomegarrison,
+ TextID = MyInternationalizationString.defence,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //Text="甯冮槻",
};
- athomedefenceRowLayout.AddChidren(btnathomedefence);
-
-
- var athomedefenceSelected = new SelectedButton();
- athomedefenceRowLayout.AddChidren(athomedefenceSelected);
-
- #endregion
- #region 绂诲甯冮槻
-
- var leavehomeFrameLayout = new FrameLayout
+ defenceRowLayout.AddChidren(btndefence);
+ var defenceSelected = new Button
{
- Height = Application.GetRealHeight(160),
- Y = athomeFrameLayout.Bottom,
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
};
- securityfra.AddChidren(leavehomeFrameLayout);
-
- var leavehomedefenceRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- leavehomeFrameLayout.AddChidren(leavehomedefenceRowLayout);
-
- var leavehomebtndefence = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.logicremovehomegarrison,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
- };
- leavehomedefenceRowLayout.AddChidren(leavehomebtndefence);
- var leavehomedefenceSelected = new SelectedButton();
- leavehomedefenceRowLayout.AddChidren(leavehomedefenceSelected);
- #endregion
- #region 鎾ら槻
- var withdrawalFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = leavehomeFrameLayout.Bottom,
- };
- securityfra.AddChidren(withdrawalFrameLayout);
-
+ defenceRowLayout.AddChidren(defenceSelected);
var withdrawalRowLayout = new RowLayout
{
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = defenceRowLayout.Bottom,
+ Height = Application.GetRealHeight(180),
};
- withdrawalFrameLayout.AddChidren(withdrawalRowLayout);
+ devicefra.AddChidren(withdrawalRowLayout);
var btnwithdrawal = new Button
{
-
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.withdrawal,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //Text = "鎾ら槻",
};
withdrawalRowLayout.AddChidren(btnwithdrawal);
- var withdrawalSelected = new SelectedButton();
+ var withdrawalSelected = new Button
+ {
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
+ };
withdrawalRowLayout.AddChidren(withdrawalSelected);
- #endregion
- #region ----鍦ㄥ甯冮槻 绂诲甯冮槻 鎾ら槻鐐瑰嚮浜嬩欢
- ///鍦ㄥ甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> athomeclick = (sedner14, e14) =>
+ ///甯冮槻鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> copenclick = (sedner14, e14) =>
{
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- athomedefenceSelected.Visible = true;
- leavehomedefenceSelected.Visible = false;
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ defenceSelected.Visible = true;
withdrawalSelected.Visible = false;
- };
- athomedefenceRowLayout.MouseUpEventHandler += athomeclick;
- btnathomedefence.MouseUpEventHandler += athomeclick;
- athomedefenceSelected.MouseUpEventHandler += athomeclick;
- athomeFrameLayout.MouseUpEventHandler += athomeclick;
+ if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
+ {
+ SecurityConditionsInfo.Remove("EnOrWithdrawMode");
+ }
+ SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
- ///绂诲甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
- {
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
+ LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
};
- leavehomedefenceRowLayout.MouseUpEventHandler += leavehomeclick;
- leavehomebtndefence.MouseUpEventHandler += leavehomeclick;
- leavehomedefenceSelected.MouseUpEventHandler += leavehomeclick;
- leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
+ btndefence.MouseUpEventHandler += copenclick;
+ defenceRowLayout.MouseUpEventHandler += copenclick;
+ defenceSelected.MouseUpEventHandler += copenclick;
+
+
///鎾ら槻鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> disableclick = (sedner15, e15) =>
{
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ defenceSelected.Visible = false;
withdrawalSelected.Visible = true;
+ if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
+ {
+ SecurityConditionsInfo.Remove("EnOrWithdrawMode");
+ }
+ SecurityConditionsInfo.Add("EnOrWithdrawMode", "1");
+ LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
};
withdrawalRowLayout.MouseUpEventHandler += disableclick;
btnwithdrawal.MouseUpEventHandler += disableclick;
withdrawalSelected.MouseUpEventHandler += disableclick;
- withdrawalFrameLayout.MouseUpEventHandler += disableclick;
- #endregion
- #endregion
-
if (edit)
{
@@ -601,107 +415,36 @@
{
if (securityifon["EnOrWithdrawMode"] == "0")
{
- if (securityifon["ModeId"] == "1")
- {
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- athomedefenceSelected.Visible = true;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = false;
- }
- else
- {
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
- }
-
+ defenceSelected.Visible = true;
+ withdrawalSelected.Visible = false;
}
else
{
- btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
+ defenceSelected.Visible = false;
withdrawalSelected.Visible = true;
}
break;
}
}
}
- Btncomplete.MouseUpEventHandler += (sender, e) =>
+ var cancel = new Button
{
- if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible)
- {
- return;
- }
- UserView.HomePage.Instance.ScrollEnabled = true;
- if (SecurityConditionsInfo.ContainsKey("Type"))
- {
- SecurityConditionsInfo.Remove("Type");
- }
- if (SecurityConditionsInfo.ContainsKey("IsValid"))
- {
- SecurityConditionsInfo.Remove("IsValid");
- }
- if (SecurityConditionsInfo.ContainsKey("ModeId"))
- {
- SecurityConditionsInfo.Remove("ModeId");
- }
+ Height = Application.GetRealHeight(160),
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextSize = 16,
+ BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ Y = devicefra.Height - Application.GetRealHeight(160),
- SecurityConditionsInfo.Add("Type", "6");
- SecurityConditionsInfo.Add("IsValid", "1");
- SecurityConditionsInfo.Add("ModeId", "0");
- //鍦ㄥ甯冮槻
- if (athomedefenceSelected.Visible)
- {
- if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
- {
- SecurityConditionsInfo.Remove("EnOrWithdrawMode");
- }
- if (SecurityConditionsInfo.ContainsKey("ModeId"))
- {
- SecurityConditionsInfo.Remove("ModeId");
- }
- SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
- SecurityConditionsInfo.Add("ModeId", "1");
- }
- //绂诲甯冮槻
- if (leavehomedefenceSelected.Visible)
- {
- if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
- {
- SecurityConditionsInfo.Remove("EnOrWithdrawMode");
- }
- if (SecurityConditionsInfo.ContainsKey("ModeId"))
- {
- SecurityConditionsInfo.Remove("ModeId");
- }
- SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
- SecurityConditionsInfo.Add("ModeId", "2");
- }
- //鎾ら槻
- if (withdrawalSelected.Visible)
- {
- if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
- {
- SecurityConditionsInfo.Remove("EnOrWithdrawMode");
- }
- SecurityConditionsInfo.Add("EnOrWithdrawMode", "1");
- }
- LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
};
-
+ devicefra.AddChidren(cancel);
+ cancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
}
/// <summary>
/// 鍦扮悊鍥存爮View
@@ -718,168 +461,139 @@
{
flMain.RemoveFromParent();
};
-
- var Locationfra1 = new FrameLayout
- {
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(100),
- Y = Application.GetRealHeight(1920 - 100),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- flMain.AddChidren(Locationfra1);
var Locationfra = new FrameLayout
{
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(530),
- Y = Application.GetRealHeight(1920 - 530),
+ Width = Application.GetRealWidth(1080 - 80),
+ Height = Application.GetRealHeight(720),
+ Y = Application.GetRealHeight(1920 - 30 - 720),
+ X = Application.GetRealWidth(40),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(60),
+ Radius = (uint)Application.GetRealHeight(50),
};
flMain.AddChidren(Locationfra);
-
- #region -------鍙栨秷 瀹屾垚
- var typeRow = new RowLayout
+ var locationviewname = new Button
{
- Height = Application.GetRealHeight(140),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ Y = Application.GetRealHeight(20),
+ TextID = MyInternationalizationString.locationmode,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Height = Application.GetRealHeight(150),
+ Width = Application.GetRealWidth(1080 - 80),
+ //Text="浣嶇疆妯″紡",
};
- Locationfra.AddChidren(typeRow);
- var Btncancel = new Button
+ Locationfra.AddChidren(locationviewname);
+
+ if (LocationConditionsInfo.ContainsKey("Type"))
{
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- X = Application.GetRealWidth(80),
- TextAlignment = TextAlignment.CenterLeft,
- };
- typeRow.AddChidren(Btncancel);
- Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ LocationConditionsInfo.Remove("Type");
+ }
+ if (LocationConditionsInfo.ContainsKey("IsValid"))
{
- flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
- };
-
- var Btntitle = new Button
- {
- TextID = MyInternationalizationString.location,
- TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(320),
- TextAlignment = TextAlignment.Center,
- X = Btncancel.Right + Application.GetRealWidth(100),
- TextSize = 16,
- };
- typeRow.AddChidren(Btntitle);
- var Btncomplete = new Button
- {
- TextID = MyInternationalizationString.complete,
- TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- TextAlignment = TextAlignment.CenterRight,
- X = Btntitle.Right + Application.GetRealWidth(100),
-
- };
- typeRow.AddChidren(Btncomplete);
- #endregion
-
- #region ------鍦ㄥ 绂诲
- #region ------鍦ㄥ
-
- var athomeFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = typeRow.Bottom + Application.GetRealHeight(20),
- };
- Locationfra.AddChidren(athomeFrameLayout);
-
- var athomeRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- athomeFrameLayout.AddChidren(athomeRowLayout);
-
- var btnathome = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.athome,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
-
-
- };
- athomeRowLayout.AddChidren(btnathome);
- var athomeSelected = new SelectedButton();
- athomeRowLayout.AddChidren(athomeSelected);
- #endregion
-
- #region -------绂诲
- var leavehomeFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = athomeFrameLayout.Bottom,
- };
- Locationfra.AddChidren(leavehomeFrameLayout);
+ LocationConditionsInfo.Remove("IsValid");
+ }
+
+ LocationConditionsInfo.Add("Type", "7");
+ LocationConditionsInfo.Add("IsValid", "1");
var leavehomeRowLayout = new RowLayout
{
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Height = Application.GetRealHeight(180),
+ Y = locationviewname.Bottom,
};
- leavehomeFrameLayout.AddChidren(leavehomeRowLayout);
+ Locationfra.AddChidren(leavehomeRowLayout);
var btnleavehome = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.leavehome,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //Text="绂诲",
};
leavehomeRowLayout.AddChidren(btnleavehome);
- var leavehomeSelected = new SelectedButton();
- leavehomeRowLayout.AddChidren(leavehomeSelected);
- #endregion
-
- #endregion
- string strname = "";
- ///鍦ㄥ鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> athomeclick = (sedner15, e15) =>
+ var leavehomeSelected = new Button
{
- strname = btnathome.Text;
- btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnathome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- leavehomeSelected.Visible = false;
- athomeSelected.Visible = true;
-
-
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
};
- btnathome.MouseUpEventHandler += athomeclick;
- athomeSelected.MouseUpEventHandler += athomeclick;
- athomeRowLayout.MouseUpEventHandler += athomeclick;
- athomeFrameLayout.MouseUpEventHandler += athomeclick;
+ leavehomeRowLayout.AddChidren(leavehomeSelected);
+
+ var athomeRowLayout = new RowLayout
+ {
+ Y = leavehomeRowLayout.Bottom,
+ Height = Application.GetRealHeight(180),
+ };
+ Locationfra.AddChidren(athomeRowLayout);
+
+ var btnathome = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.athome,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //Text = "鍦ㄥ",
+ };
+ athomeRowLayout.AddChidren(btnathome);
+ var athomeSelected = new Button
+ {
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
+ };
+ athomeRowLayout.AddChidren(athomeSelected);
///绂诲鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
{
- strname = btnleavehome.Text;
- btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- btnathome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ UserView.HomePage.Instance.ScrollEnabled = true;
leavehomeSelected.Visible = true;
athomeSelected.Visible = false;
+ if (LocationConditionsInfo.ContainsKey("AtHome"))
+ {
+ LocationConditionsInfo.Remove("AtHome");
+ }
+ LocationConditionsInfo.Add("AtHome", "0");
+
+ LogicIfon.AddLocationconditions(LocationConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
};
btnleavehome.MouseUpEventHandler += leavehomeclick;
leavehomeSelected.MouseUpEventHandler += leavehomeclick;
leavehomeRowLayout.MouseUpEventHandler += leavehomeclick;
- leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
+
+
+ ///鍦ㄥ鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> athomeclick = (sedner15, e15) =>
+ {
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ leavehomeSelected.Visible = false;
+ athomeSelected.Visible = true;
+ if (LocationConditionsInfo.ContainsKey("AtHome"))
+ {
+ LocationConditionsInfo.Remove("AtHome");
+ }
+ LocationConditionsInfo.Add("AtHome", "1");
+ LogicIfon.AddLocationconditions(LocationConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+ };
+ btnathome.MouseUpEventHandler += athomeclick;
+ athomeSelected.MouseUpEventHandler += athomeclick;
+ athomeRowLayout.MouseUpEventHandler += athomeclick;
if (edit)
{
@@ -890,102 +604,36 @@
{
if (Locationifon["AtHome"] == "0")
{
- strname = btnleavehome.Text;
leavehomeSelected.Visible = true;
athomeSelected.Visible = false;
- btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- btnathome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+
}
else
{
- strname = btnathome.Text;
leavehomeSelected.Visible = false;
athomeSelected.Visible = true;
- btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- btnathome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
}
break;
}
}
}
-
- Btncomplete.MouseUpEventHandler += (sender, e) =>
+ var cancel = new Button
{
+ Height = Application.GetRealHeight(160),
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextSize = 16,
+ BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ Y = Locationfra.Height - Application.GetRealHeight(160),
- if (!leavehomeSelected.Visible && !athomeSelected.Visible)
- {
- ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
- return;
- }
- UserView.HomePage.Instance.ScrollEnabled = true;
- if (LocationConditionsInfo.ContainsKey("Type"))
- {
- LocationConditionsInfo.Remove("Type");
- }
- if (LocationConditionsInfo.ContainsKey("IsValid"))
- {
- LocationConditionsInfo.Remove("IsValid");
- }
- LocationConditionsInfo.Add("Type", "7");
- LocationConditionsInfo.Add("IsValid", "1");
- if (leavehomeSelected.Visible)
- {
- if (LocationConditionsInfo.ContainsKey("AtHome"))
- {
- LocationConditionsInfo.Remove("AtHome");
- }
- LocationConditionsInfo.Add("AtHome", "0");
- }
- else
- {
- if (LocationConditionsInfo.ContainsKey("AtHome"))
- {
- LocationConditionsInfo.Remove("AtHome");
- }
- LocationConditionsInfo.Add("AtHome", "1");
- }
- double a1 = 23.134421, a2 = 113.267189;
- //璋冪敤鏂规硶锛岃烦杞〉闈�
- GDMapKit.Show((mLatitude, mLongitude, mRadius, name) =>
- {
-
- //鐐瑰嚮淇濆瓨鎸夐挳锛屽洖璋冨綋鍓嶉�夋嫨鐨勭含搴︼紝缁忓害锛屽崐寰勮寖鍥�
- var latitud = (int)Math.Truncate(mLatitude * 1000000);
- var longitude = (int)Math.Truncate(mLongitude * 1000000);
- Dictionary<string, string> accounts = new Dictionary<string, string>();
- if (accounts.ContainsKey("Account"))
- {
- accounts.Remove("Account");
- }
- if (accounts.ContainsKey("Type"))
- {
- accounts.Remove("Type");
- }
- if (accounts.ContainsKey("Latitude"))
- {
- accounts.Remove("latitude");
- }
- if (accounts.ContainsKey("Longitude"))
- {
- accounts.Remove("Longitude");
- }
- if (accounts.ContainsKey("Radius"))
- {
- accounts.Remove("radius");
- }
- accounts.Add("Account", Config.Instance.Guid);
- accounts.Add("Type", "7");
- accounts.Add("Latitude", latitud.ToString());
- accounts.Add("Longitude", longitude.ToString());
- accounts.Add("Radius", mRadius.ToString());
- LogicIfon.Addaccounts(accounts);
- LogicIfon.AddLocationconditions(LocationConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
- }, strname, true, a1, a2, 500);
};
+ Locationfra.AddChidren(cancel);
+ cancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
}
/// <summary>
@@ -995,213 +643,126 @@
{
UserView.HomePage.Instance.ScrollEnabled = false;
Dictionary<string, string> SecurityConditionsInfo = new Dictionary<string, string>();
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender12, e12) =>
{
flMain.RemoveFromParent();
};
-
- var timetypeframelayout1 = new FrameLayout
- {
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(100),
- Y = Application.GetRealHeight(1920 - 100),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- flMain.AddChidren(timetypeframelayout1);
-
var timetypeframelayout = new FrameLayout
{
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(530),
- Y = Application.GetRealHeight(1920 - 530),
+ Width = Application.GetRealWidth(1080 - 80),
+ Height = Application.GetRealHeight(720),
+ Y = Application.GetRealHeight(1920 - 30 - 720),
+ X = Application.GetRealWidth(40),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(60),
+ Radius = (uint)Application.GetRealHeight(50),
};
flMain.AddChidren(timetypeframelayout);
- #region -------鍙栨秷 瀹屾垚
- var timetype = new RowLayout
- {
- Height = Application.GetRealHeight(140),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- timetypeframelayout.AddChidren(timetype);
- var Btncancel = new Button
- {
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- X=Application.GetRealWidth(80),
- TextAlignment=TextAlignment.CenterLeft,
- };
- timetype.AddChidren(Btncancel);
- Btncancel.MouseUpEventHandler += (sender16, e16) =>
- {
- flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
- };
-
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),
- TextSize = 16,
+ Y = Application.GetRealHeight(20),
+ TextID = MyInternationalizationString.Selectedtimetype,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Height = Application.GetRealHeight(150),
+ Width = Application.GetRealWidth(1080 - 80),
+ //Text="鏃堕棿绫诲瀷",
};
- timetype.AddChidren(Btntitle);
- var Btncomplete = new Button
+ timetypeframelayout.AddChidren(Btntitle);
+
+
+
+ var timepointrow= new RowLayout
{
- TextID = MyInternationalizationString.complete,
- TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
- Height = Application.GetRealHeight(140),
- Width = Application.GetRealWidth(200),
- TextAlignment = TextAlignment.CenterRight,
- X = Btntitle.Right + Application.GetRealWidth(100),
-
+ Height = Application.GetRealHeight(180),
+ Y = Btntitle.Bottom,
};
- timetype.AddChidren(Btncomplete);
- #endregion
-
- #region -------绔嬪嵆鎵ц 鏃堕棿鑼冨洿
-
- #region -------绔嬪嵆鎵ц
- var timepointFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = timetype.Bottom+Application.GetRealHeight(20),
- };
- timetypeframelayout.AddChidren(timepointFrameLayout);
-
- var timerow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- timepointFrameLayout.AddChidren(timerow);
-
+ timetypeframelayout.AddChidren(timepointrow);
var Btntimepoint = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.immediateexecution,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
//Text="绔嬪嵆鎵ц",
};
- timerow.AddChidren(Btntimepoint);
+ timepointrow.AddChidren(Btntimepoint);
- var timepointSelected = new SelectedButton();
- timerow.AddChidren(timepointSelected);
- #endregion
-
-
- #region -------鏃堕棿鑼冨洿
- var timeFrameLayout = new FrameLayout
+ var timerow = new RowLayout
{
- Height = Application.GetRealHeight(160),
- Y =timepointFrameLayout.Bottom,
+ Y = timepointrow.Bottom,
+ Height = Application.GetRealHeight(180),
};
- timetypeframelayout.AddChidren(timeFrameLayout);
-
- var time1row = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- timeFrameLayout.AddChidren(time1row);
+ timetypeframelayout.AddChidren(timerow);
var Btntime = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.timeframe,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ X = Application.GetRealWidth(40),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
//Text = "鏃堕棿鑼冨洿",
};
- time1row.AddChidren(Btntime);
+ timerow.AddChidren(Btntime);
- var timeSelected = new SelectedButton();
- time1row.AddChidren(timeSelected);
- #endregion
-
-
///绔嬪嵆鎵ц鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> timepointclick = (sedner14, e14) =>
{
- Btntimepoint.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- Btntime.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- timepointSelected.Visible = true;
- timeSelected.Visible = false;
+ Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
+ timeConditionsInfo.Add("Type", "0");
+ timeConditionsInfo.Add("IsValid", "1");
+ timeConditionsInfo.Add("DateType", "1");
+ timeConditionsInfo.Add("RemindTime", "0");
+ timeConditionsInfo.Add("EnDelay", "0");
+ timeConditionsInfo.Add("DelayTime", "0");
+ timeConditionsInfo.Add("AdjustTime", "0");
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ flMain.RemoveFromParent();
+ var timePoint = new TimePoint();
+ UserView.HomePage.Instance.AddChidren(timePoint);
+ UserView.HomePage.Instance.PageIndex += 1;
+ timePoint.Show(timeConditionsInfo);
};
- timepointFrameLayout.MouseUpEventHandler += timepointclick;
- timerow.MouseUpEventHandler += timepointclick;
Btntimepoint.MouseUpEventHandler += timepointclick;
- timepointSelected.MouseUpEventHandler += timepointclick;
+ timepointrow.MouseUpEventHandler += timepointclick;
///鏃堕棿鑼冨洿鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> timeclick = (sedner15, e15) =>
{
- Btntimepoint.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- Btntime.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- timepointSelected.Visible = false;
- timeSelected.Visible = true;
- };
- Btntime.MouseUpEventHandler += timeclick;
- time1row.MouseUpEventHandler += timeclick;
- timeSelected.MouseUpEventHandler += timeclick;
- timeFrameLayout.MouseUpEventHandler += timeclick;
- #endregion
-
-
-
- Btncomplete.MouseUpEventHandler += (sender, e) =>
- {
- if (!timepointSelected.Visible && !timeSelected.Visible)
- {
- ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
- return;
- }
UserView.HomePage.Instance.ScrollEnabled = true;
flMain.RemoveFromParent();
- if (timepointSelected.Visible)
- {
-
- Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
- timeConditionsInfo.Add("Type", "0");
- timeConditionsInfo.Add("IsValid", "1");
- timeConditionsInfo.Add("DateType", "1");
- timeConditionsInfo.Add("RemindTime", "0");
- timeConditionsInfo.Add("EnDelay", "0");
- timeConditionsInfo.Add("DelayTime", "0");
- timeConditionsInfo.Add("AdjustTime", "0");
-
- var timePoint = new TimePoint();
- UserView.HomePage.Instance.AddChidren(timePoint);
- UserView.HomePage.Instance.PageIndex += 1;
- timePoint.Show(timeConditionsInfo);
- }
- else
- {
- var timePage = new TimePage();
- UserView.HomePage.Instance.AddChidren(timePage);
- UserView.HomePage.Instance.PageIndex += 1;
- timePage.Show();
-
- }
+ var timePage = new TimePage();
+ UserView.HomePage.Instance.AddChidren (timePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ timePage.Show ();
+
};
+ Btntime.MouseUpEventHandler += timeclick;
+ timerow.MouseUpEventHandler += timeclick;
+
+
+ var cancel = new Button
+ {
+ Height = Application.GetRealHeight(160),
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextSize = 16,
+ BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ Y = timetypeframelayout.Height - Application.GetRealHeight(160),
+
+ };
+ timetypeframelayout.AddChidren(cancel);
+ cancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
}
}
--
Gitblit v1.8.0