From 133ca903ae9c4df6ff037f5223d5abcd0df926f4 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期五, 20 三月 2020 17:55:32 +0800
Subject: [PATCH] 2020-03-20-1
---
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs | 3
ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs | 329 +++++--------------
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs | 49 +-
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.cs | 5
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 17
ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs | 53 +-
ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs | 3
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/Addview.cs | 5
ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs | 4
ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs | 1
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/FunView.cs | 5
ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs | 1
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.cs | 5
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0
ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs | 96 +----
.DS_Store | 0
ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs | 4
ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs | 359 ++++------------------
18 files changed, 251 insertions(+), 688 deletions(-)
diff --git a/.DS_Store b/.DS_Store
index f4a56ed..b98f026 100644
--- a/.DS_Store
+++ b/.DS_Store
Binary files differ
diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
index a803aea..b699a2a 100644
--- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
+++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,14 +1,16 @@
锘�<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default">
<MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" />
<MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.SelectDevice" />
- <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Category/Category.cs">
- <Files>
- <File FileName="Shared/Phone/Device/Category/Category.cs" Line="2115" Column="55" />
- </Files>
+ <MonoDevelop.Ide.Workbench>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="GateWay" expanded="True">
+ <Node name="GateWay.Droid" expanded="True">
+ <Node name="Assets" expanded="True">
+ <Node name="Phone" expanded="True" />
+ </Node>
+ </Node>
<Node name="Shared" expanded="True">
<Node name="Common" expanded="True" />
<Node name="Phone" expanded="True">
@@ -17,16 +19,9 @@
<Node name="Category.cs" selected="True" />
</Node>
<Node name="Logic" expanded="True">
- <Node name="DoorLockLogic" expanded="True" />
<Node name="LogicView" expanded="True" />
</Node>
</Node>
- <Node name="UserCenter" expanded="True">
- <Node name="CommonBase" expanded="True">
- <Node name="Logic" expanded="True" />
- </Node>
- </Node>
- <Node name="UserView" expanded="True" />
</Node>
</Node>
</Node>
diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
index b1564da..39d42b2 100644
--- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
+++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index 73cfb83..3d0f6c6 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -33,21 +33,21 @@
};
this.AddChidren(middle);
///鏃堕棿
- FunView timeview = new FunView();
- timeview.iconBtn.UnSelectedImagePath = "ZigeeLogic/time.png";
- timeview.funnameBtn.TextID = MyInternationalizationString.timecondition;
- middle.AddChidren(timeview.FunFrameView());
- timeview.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+ FunView timeView = new FunView();
+ timeView.iconBtn.UnSelectedImagePath = "ZigeeLogic/time.png";
+ timeView.funnameBtn.TextID = MyInternationalizationString.timecondition;
+ middle.AddChidren(timeView.FunFrameView());
+ timeView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
TimeView();
};
///璁惧
- FunView functionview = new FunView();
- functionview.funFrameLayout.Y = timeview.funFrameLayout.Bottom;
- functionview.iconBtn.UnSelectedImagePath = "ZigeeLogic/function.png";
- functionview.funnameBtn.TextID = MyInternationalizationString.device;
- middle.AddChidren(functionview.FunFrameView());
- functionview.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+ FunView functionView = new FunView();
+ functionView.funFrameLayout.Y = timeView.funFrameLayout.Bottom;
+ functionView.iconBtn.UnSelectedImagePath = "ZigeeLogic/function.png";
+ functionView.funnameBtn.TextID = MyInternationalizationString.device;
+ middle.AddChidren(functionView.FunFrameView());
+ functionView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
var roomAndDeviceView = new RoomAndDeviceView();
UserView.HomePage.Instance.AddChidren(roomAndDeviceView);
@@ -56,12 +56,12 @@
roomAndDeviceView.Show(Language.StringByID(MyInternationalizationString.devicestate));
};
///瀹夐槻
- FunView securityview = new FunView();
- securityview.funFrameLayout.Y = functionview.funFrameLayout.Bottom;
- securityview.iconBtn.UnSelectedImagePath = "ZigeeLogic/security.png";
- securityview.funnameBtn.TextID = MyInternationalizationString.security;
- middle.AddChidren(securityview.FunFrameView());
- securityview.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+ FunView securityView = new FunView();
+ securityView.funFrameLayout.Y = functionView.funFrameLayout.Bottom;
+ securityView.iconBtn.UnSelectedImagePath = "ZigeeLogic/security.png";
+ securityView.funnameBtn.TextID = MyInternationalizationString.security;
+ middle.AddChidren(securityView.FunFrameView());
+ securityView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
//CurtainPanel.ButtonSet buttonSet = new CurtainPanel.ButtonSet();
//UserView.HomePage.Instance.AddChidren(buttonSet);
@@ -73,13 +73,14 @@
SecurityView(flMain, false);
};
///鍦扮悊鍥存爮
- FunView positionview = new FunView();
- positionview.funFrameLayout.Y = securityview.funFrameLayout.Bottom;
- positionview.iconBtn.UnSelectedImagePath = "ZigeeLogic/position.png";
- positionview.funnameBtn.TextID = MyInternationalizationString.location;
- positionview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
- middle.AddChidren(positionview.FunFrameView());
- positionview.clickviewBtn.MouseUpEventHandler += (sender, e) =>
+ FunView positionView = new FunView();
+ positionView.funFrameLayout.Y = securityView.funFrameLayout.Bottom;
+ positionView.funFrameLayout.Height = Application.GetRealHeight(160+20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
+ positionView.iconBtn.UnSelectedImagePath = "ZigeeLogic/position.png";
+ positionView.funnameBtn.TextID = MyInternationalizationString.location;
+ positionView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
+ middle.AddChidren(positionView.FunFrameView());
+ positionView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 0dd0501..ed169c1 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -349,8 +349,8 @@
var selectedBtn = new Button
{
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
X = Application.GetRealWidth(789),
UnSelectedImagePath = "ZigeeLogic/selected.png",
Visible = false,
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
old mode 100755
new mode 100644
index 4a0de72..5f733d0
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
@@ -15,11 +15,11 @@
{
this.action = action;
}
-
+
public void Show()
{
Tag = "Logic";
-
+
#region 涓婇潰鐨勫竷灞�浠g爜
TopView view = new TopView();
this.AddChidren(view.TopRowView());
@@ -35,354 +35,127 @@
BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
this.AddChidren(middle);
-
-
- var btnsave = new Button
- {
- Y= middle.Height-Application.GetRealHeight(260),
- X = Application.GetRealWidth(85),
- Height = Application.GetRealHeight(130),
- Width = Application.GetRealWidth(910),
- Radius = (uint)Application.GetRealHeight(60),
- BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
- TextID = MyInternationalizationString.Save,
- TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
- TextSize = 16,
- };
- middle.AddChidren(btnsave);
+ LogicView.SaveView saveView = new LogicView.SaveView();
+ saveView.frameLayout.Y = middle.Height - Application.GetRealHeight(260);
+ middle.AddChidren(saveView.Show());
#region ----鎵ц涓�娆�----
- var onceFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(onceFramelayout);
-
- var onceIconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/point.png",
-
- };
- onceFramelayout.AddChidren(onceIconBtn);
-
- var onceRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- onceFramelayout.AddChidren(onceRow);
- var onceTextBtn = new Button
- {
- Text = Language.StringByID(MyInternationalizationString.executeonce),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- onceRow.AddChidren(onceTextBtn);
-
- var onceBackBtn = new SelectedButton(789);
- onceRow.AddChidren(onceBackBtn);
-
-
+ FunView onceView = new FunView();
+ onceView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ onceView.funnameBtn.TextID = MyInternationalizationString.executeonce;
+ onceView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ onceView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ onceView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ onceView.funnextBtn.Visible = false;
+ middle.AddChidren(onceView.FunFrameView());
#endregion
#region ----姣忓ぉ----
- var everydayFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- Y = onceFramelayout.Bottom,
- };
- middle.AddChidren(everydayFramelayout);
+ FunView dayView = new FunView();
+ dayView.funFrameLayout.Y = onceView.funFrameLayout.Bottom;
+ dayView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ dayView.funnameBtn.TextID = MyInternationalizationString.everyday;
+ dayView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ dayView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ dayView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ dayView.funnextBtn.Visible = false;
+ middle.AddChidren(dayView.FunFrameView());
- var everydayIconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/point.png",
-
- };
- everydayFramelayout.AddChidren(everydayIconBtn);
-
- var everydayRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- everydayFramelayout.AddChidren(everydayRow);
-
-
- var everydayTxetBtn = new Button
- {
- TextID = MyInternationalizationString.everyday,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- everydayRow.AddChidren(everydayTxetBtn);
-
- var everydayBack = new SelectedButton(789);
- everydayRow.AddChidren(everydayBack);
-
-
#endregion
#region ----姣忓懆----
- var weekFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = everydayFramelayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(weekFramelayout);
- var weekIconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- UnSelectedImagePath = "ZigeeLogic/point.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- weekFramelayout.AddChidren(weekIconBtn);
-
- var weekRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- weekFramelayout.AddChidren(weekRow);
-
-
- var weekTextBtn = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- TextID = MyInternationalizationString.weekly,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- weekRow.AddChidren(weekTextBtn);
-
- var weekBack = new Button
- {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
- Gravity = Gravity.CenterVertical,
- };
- weekRow.AddChidren(weekBack);
+ FunView weekView = new FunView();
+ weekView.funFrameLayout.Y = dayView.funFrameLayout.Bottom;
+ weekView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ weekView.funnameBtn.TextID = MyInternationalizationString.weekly;
+ middle.AddChidren(weekView.FunFrameView());
#endregion
#region ----姣忔湀----
- var monthlyFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = weekFramelayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(monthlyFramelayout);
+ FunView monView = new FunView();
+ monView.funFrameLayout.Y = weekView.funFrameLayout.Bottom;
+ monView.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
+ monView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; ///鏀瑰彉鏈�鍚庡姛鑳藉揩绾挎潯棰滆壊
+ monView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ monView.funnameBtn.TextID = MyInternationalizationString.monthly;
+ middle.AddChidren(monView.FunFrameView());
- var monthlyIconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- UnSelectedImagePath = "ZigeeLogic/point.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- monthlyFramelayout.AddChidren(monthlyIconBtn);
-
- var monthlyRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- monthlyFramelayout.AddChidren(monthlyRow);
-
- var monthlyTextBtn = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- TextID = MyInternationalizationString.monthly,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- monthlyRow.AddChidren(monthlyTextBtn);
-
- var monthlyBack = new Button
- {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
- Gravity = Gravity.CenterVertical,
- };
- monthlyRow.AddChidren(monthlyBack);
#endregion
#region ----姣忓勾----
- var yearFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = monthlyFramelayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- //middle.AddChidren(yearFramelayout);
+ FunView yearView = new FunView();
+ yearView.funFrameLayout.Y = monView.funFrameLayout.Bottom;
+ yearView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ yearView.funnameBtn.TextID = MyInternationalizationString.everyyear;
+ //middle.AddChidren(yearView.FunFrameView());
- var yearIconBtn = new Button
- {
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
- UnSelectedImagePath = "ZigeeLogic/point.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- yearFramelayout.AddChidren(yearIconBtn);
-
- var yearRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- yearFramelayout.AddChidren(yearRow);
-
-
- var yearTextBtn = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- TextID = MyInternationalizationString.everyyear,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- yearRow.AddChidren(yearTextBtn);
-
- var yearBack = new Button
- {
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(789),
- Gravity = Gravity.CenterVertical,
- };
- yearRow.AddChidren(yearBack);
-
- EventHandler<MouseEventArgs> yearclick = (sender, e) =>
+ yearView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
var everyyearPage = new EveryyearPage();
UserView.HomePage.Instance.AddChidren(everyyearPage);
UserView.HomePage.Instance.PageIndex += 1;
everyyearPage.Show();
-
};
- yearFramelayout.MouseUpEventHandler += yearclick;
- yearTextBtn.MouseUpEventHandler += yearclick;
- yearBack.MouseUpEventHandler += yearclick;
- yearIconBtn.MouseUpEventHandler += yearclick;
- yearRow.MouseUpEventHandler += yearclick;
+
#endregion
- EventHandler<MouseEventArgs> onceclick = (sender, e) =>
+ onceView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- onceBackBtn.Visible = true;
- everydayBack.Visible = false;
+ onceView.funnextBtn.Visible = true;
+ dayView.funnextBtn.Visible = false;
};
- onceTextBtn.MouseUpEventHandler += onceclick;
- onceBackBtn.MouseUpEventHandler += onceclick;
- onceFramelayout.MouseUpEventHandler += onceclick;
- onceIconBtn.MouseUpEventHandler += onceclick;
- onceRow.MouseUpEventHandler += onceclick;
-
- EventHandler<MouseEventArgs> everydayclick = (sender, e) =>
+ dayView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- onceBackBtn.Visible = false;
- everydayBack.Visible = true;
+ onceView.funnextBtn.Visible = false;
+ dayView.funnextBtn.Visible = true;
};
- everydayFramelayout.MouseUpEventHandler += everydayclick;
- everydayTxetBtn.MouseUpEventHandler += everydayclick;
- everydayBack.MouseUpEventHandler += everydayclick;
- everydayIconBtn.MouseUpEventHandler += everydayclick;
- everydayRow.MouseUpEventHandler += everydayclick;
-
- EventHandler<MouseEventArgs> weekclick = (sender, e) =>
+ weekView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- onceBackBtn.Visible = false;
- everydayBack.Visible = false;
+ onceView.funnextBtn.Visible = false;
+ dayView.funnextBtn.Visible = false;
var weekPage = new WeekPage();
UserView.HomePage.Instance.AddChidren(weekPage);
UserView.HomePage.Instance.PageIndex += 1;
- weekPage.Show(weekTextBtn.Text);
+ weekPage.Show(weekView.funnameBtn.Text);
};
- weekFramelayout.MouseUpEventHandler += weekclick;
- weekTextBtn.MouseUpEventHandler += weekclick;
- weekBack.MouseUpEventHandler += weekclick;
- weekIconBtn.MouseUpEventHandler += weekclick;
- weekRow.MouseUpEventHandler += weekclick;
-
- EventHandler<MouseEventArgs> monthlyclick = (sender, e) =>
+ monView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- onceBackBtn.Visible = false;
- everydayBack.Visible = false;
+ onceView.funnextBtn.Visible = false;
+ dayView.funnextBtn.Visible = false;
var everymonthPage = new EverymonthPage();
UserView.HomePage.Instance.AddChidren(everymonthPage);
UserView.HomePage.Instance.PageIndex += 1;
- everymonthPage.Show(monthlyTextBtn.Text);
+ everymonthPage.Show(monView.funnameBtn.Text);
};
- monthlyFramelayout.MouseUpEventHandler += monthlyclick;
- monthlyIconBtn.MouseUpEventHandler += monthlyclick;
- monthlyRow.MouseUpEventHandler += monthlyclick;
- monthlyTextBtn.MouseUpEventHandler += monthlyclick;
- monthlyBack.MouseUpEventHandler += monthlyclick;
if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 0)
{
- onceBackBtn.Visible = true;
- everydayBack.Visible = false;
+ onceView.funnextBtn.Visible = true;
+ dayView.funnextBtn.Visible = false;
}
else if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 2)
{
- onceBackBtn.Visible = false;
- everydayBack.Visible = true;
+ onceView.funnextBtn.Visible = false;
+ dayView.funnextBtn.Visible = true;
}
else
{
- onceBackBtn.Visible = false;
- everydayBack.Visible = false;
+ onceView.funnextBtn.Visible = false;
+ dayView.funnextBtn.Visible = false;
}
-
- btnsave.MouseUpEventHandler += (sedder, e) =>
+ saveView.clickviewBtn.MouseUpEventHandler += (sedder, e) =>
{
- if (!onceBackBtn.Visible && !everydayBack.Visible)
+ if (!onceView.funnextBtn.Visible && !dayView.funnextBtn.Visible)
{
-
+
var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
Language.StringByID(MyInternationalizationString.selectweek),
@@ -390,12 +163,12 @@
alert.Show();
return;
}
- if (onceBackBtn.Visible)
+ if (onceView.funnextBtn.Visible)
{
Common.Logic.CurrentLogic.TimeAttribute.Repeat = 0;
}
- if (everydayBack.Visible)
+ if (dayView.funnextBtn.Visible)
{
Common.Logic.CurrentLogic.TimeAttribute.Repeat = 2;
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
index 59cb29b..eb8dd95 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
@@ -103,6 +103,7 @@
delayedview.iconBtn.UnSelectedImagePath = "ZigeeLogic/delay.png";
delayedview.funnameBtn.TextID = MyInternationalizationString.delayed;
delayedview.funFrameLayout.Y = securityview.funFrameLayout.Bottom;
+ delayedview.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
delayedview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; ///鏀瑰彉鏈�鍚庡姛鑳藉揩绾挎潯棰滆壊
if (str1 == LogicView.IfString.Action_Logic)
{
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs
old mode 100755
new mode 100644
index 4e11f1f..f139eba
--- a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs
@@ -38,6 +38,9 @@
foreach (var intvalue in timestrlist)
{
+
+
+
var timeframelayout = new FrameLayout
{
Height = Application.GetRealHeight(160),
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/Addview.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/Addview.cs
index 9b8d4d4..73b019c 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/Addview.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/Addview.cs
@@ -12,9 +12,9 @@
};
public Button lineBtn = new Button
{
- Y = Application.GetRealHeight(155),
+ //Y = Application.GetRealHeight(155),
Width = Application.GetRealWidth(1080-58-58),
- Height = Application.GetRealHeight(5),
+ Height =1,
X = Application.GetRealWidth(58),
BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
@@ -65,6 +65,7 @@
public FrameLayout AddDeviceView()
{
+ lineBtn.Y = frameLayout.Height - 1;
frameLayout.AddChidren(lineBtn);
frameLayout.AddChidren(titleBtn);
frameLayout.AddChidren(iconBtn);
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/FunView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/FunView.cs
index d453130..0ac3aeb 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/FunView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/FunView.cs
@@ -42,9 +42,8 @@
};
public Button lineBtn = new Button
{
- Y = Application.GetRealHeight(155),
Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(5),
+ Height =1,
X = Application.GetRealWidth(176),
BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
@@ -55,10 +54,10 @@
public FrameLayout FunFrameView()
{
-
funFrameLayout.AddChidren(iconBtn);
funFrameLayout.AddChidren(funnameBtn);
funFrameLayout.AddChidren(funnextBtn);
+ lineBtn.Y = funFrameLayout.Height - 1;
funFrameLayout.AddChidren(lineBtn);
funFrameLayout.AddChidren(clickviewBtn);
return funFrameLayout;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs
index e657b38..99849fd 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs
@@ -90,7 +90,7 @@
{
Width = Application.GetRealWidth(800),
Y=Application.GetRealHeight(130-5),
- Height = Application.GetRealHeight(5),
+ Height =Application.GetRealHeight(5),
BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
@@ -122,6 +122,7 @@
stateRow.AddChidren(regionNameBtn);
stateRow.AddChidren(ordinaryBtn);
stateRow.AddChidren(selecetddevicestateBtn);
+ // lineBtn.Y = stateRow.Height - 1;
stateRow.AddChidren(lineBtn);
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.cs
old mode 100755
new mode 100644
index d90b0fe..49164d9
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.cs
@@ -48,9 +48,9 @@
public Button lineBtn = new Button
{
- Y = Application.GetRealHeight(155),
+ // Y = Application.GetRealHeight(155),
Width = Application.GetRealWidth(965),
- Height = Application.GetRealHeight(5),
+ Height =1,// Application.GetRealHeight(5),
X = Application.GetRealWidth(58),
BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
@@ -63,6 +63,7 @@
frameLayout.AddChidren(textBtn);
frameLayout.AddChidren(titleBtn);
frameLayout.AddChidren(backBtn);
+ lineBtn.Y = frameLayout.Height - 1;
frameLayout.AddChidren(lineBtn);
frameLayout.AddChidren(clickviewBtn);
return frameLayout;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.cs
old mode 100755
new mode 100644
index 2994079..80e6b93
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.cs
@@ -37,9 +37,9 @@
};
public Button lineBtn = new Button
{
- Y = Application.GetRealHeight(155),
+ //Y = Application.GetRealHeight(155),
Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(5),
+ Height = 1, //Application.GetRealHeight(5),
X = Application.GetRealWidth(80),
BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
@@ -51,6 +51,7 @@
{
frameLayout.AddChidren(titleBtn);
frameLayout.AddChidren(selectedIconBtn);
+ lineBtn.Y = frameLayout.Height - 1;
frameLayout.AddChidren(lineBtn);
frameLayout.AddChidren(clickviewBtn);
return frameLayout;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
index 2b1f119..0f453b8 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -413,7 +413,6 @@
Height = Application.GetRealHeight(130),
X = Application.GetRealWidth(176 + 10),
LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
-
};
deviceFramelayout.AddChidren(deviceRow);
var devicename = new Button
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
index 809e2ed..c90e508 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
@@ -34,264 +34,116 @@
middle.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
this.AddChidren(middle);
- var btnsave = new Button
- {
- Y= middle.Height-Application.GetRealHeight(260),
- X = Application.GetRealWidth(85),
- Height = Application.GetRealHeight(130),
- Width = Application.GetRealWidth(910),
- Radius = (uint)Application.GetRealHeight(60),
- BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
- TextID = MyInternationalizationString.Save,
- TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
- TextSize=16,
+ LogicView.SaveView saveView = new LogicView.SaveView();
+ saveView.frameLayout.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ saveView.frameLayout.Y = middle.Height - Application.GetRealHeight(260);
+ middle.AddChidren(saveView.Show());
- };
- middle.AddChidren(btnsave);
+
#region ----(鍦ㄥ/绂诲)甯冮槻 鎾ら槻 鑳佽揩鎾ら槻----
#region 鍦ㄥ甯冮槻
- var athomeFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(athomeFrameLayout);
+ FunView athomeView = new FunView();
+ athomeView.iconBtn.UnSelectedImagePath = "ZigeeLogic/athome.png";
+ athomeView.funnameBtn.TextID = MyInternationalizationString.logicathomegarrison;
+ athomeView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ athomeView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ athomeView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ athomeView.funnextBtn.Visible = false;
+ middle.AddChidren(athomeView.FunFrameView());
- var athomeiconBtn = new Button
- {
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/athome.png",
- };
- athomeFrameLayout.AddChidren(athomeiconBtn);
- var athomedefenceRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- athomeFrameLayout.AddChidren(athomedefenceRowLayout);
-
- var btnathomedefence = new Button
- {
- Text = Language.StringByID(MyInternationalizationString.logicathomegarrison),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
-
- };
- athomedefenceRowLayout.AddChidren(btnathomedefence);
- var athomedefenceSelected = new SelectedButton(789);
- athomedefenceRowLayout.AddChidren(athomedefenceSelected);
#endregion
#region 绂诲甯冮槻
- var leavehomeFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = athomeFrameLayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(leavehomeFrameLayout);
+ FunView leaveView= new FunView();
+ leaveView.funFrameLayout.Y = athomeView.funFrameLayout.Bottom;
+ leaveView.iconBtn.UnSelectedImagePath = "ZigeeLogic/leavehome.png";
+ leaveView.funnameBtn.TextID = MyInternationalizationString.logicremovehomegarrison;
+ leaveView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ leaveView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ leaveView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ leaveView.funnextBtn.Visible = false;
+ middle.AddChidren(leaveView.FunFrameView());
- var leavehomeiconBtn = new Button
- {
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/leavehome.png",
-
- };
- leavehomeFrameLayout.AddChidren(leavehomeiconBtn);
-
-
- var leavehomedefenceRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- leavehomeFrameLayout.AddChidren(leavehomedefenceRowLayout);
-
- var leavehomebtndefence = new Button
- {
- Text = Language.StringByID(MyInternationalizationString.logicremovehomegarrison),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
-
- };
- leavehomedefenceRowLayout.AddChidren(leavehomebtndefence);
- var leavehomedefenceSelected = new SelectedButton(789);
- leavehomedefenceRowLayout.AddChidren(leavehomedefenceSelected);
#endregion
#region 鎾ら槻
-
- var withdrawalFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = leavehomeFrameLayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(withdrawalFrameLayout);
-
-
- var withdrawaliconBtn = new Button
- {
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/withdrawal.png",
-
- };
- withdrawalFrameLayout.AddChidren(withdrawaliconBtn);
-
-
-
- var withdrawalRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- withdrawalFrameLayout.AddChidren(withdrawalRowLayout);
-
- var btnwithdrawal = new Button
- {
-
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.withdrawal,
- TextSize = 15,
-
- };
- withdrawalRowLayout.AddChidren(btnwithdrawal);
- var withdrawalSelected = new SelectedButton(789);
- withdrawalRowLayout.AddChidren(withdrawalSelected);
+ FunView withdrawalView= new FunView();
+ withdrawalView.funFrameLayout.Y = leaveView.funFrameLayout.Bottom;
+ withdrawalView.iconBtn.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
+ withdrawalView.funnameBtn.TextID = MyInternationalizationString.withdrawal;
+ withdrawalView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ withdrawalView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ withdrawalView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ withdrawalView.funnextBtn.Visible = false;
+ middle.AddChidren(withdrawalView.FunFrameView());
#endregion
#region 鑳佽揩鎾ら槻
- var urgentwithdFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- Y = withdrawalFrameLayout.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(urgentwithdFrameLayout);
-
- var urgentwithdiconBtn = new Button
- {
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- UnSelectedImagePath = "ZigeeLogic/withdrawal.png",
-
- };
- urgentwithdFrameLayout.AddChidren(urgentwithdiconBtn);
-
- var urgentwithdrawalRowLayout = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- urgentwithdFrameLayout.AddChidren(urgentwithdrawalRowLayout);
-
- var btnurgentwithdrawal = new Button
- {
- TextID = MyInternationalizationString.urgentwithdrawal,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- urgentwithdrawalRowLayout.AddChidren(btnurgentwithdrawal);
-
- var urgentwithdrawalSelected = new SelectedButton(789);
- urgentwithdrawalRowLayout.AddChidren(urgentwithdrawalSelected);
+ FunView urgentwithdView = new FunView();
+ urgentwithdView.funFrameLayout.Y = withdrawalView.funFrameLayout.Bottom;
+ urgentwithdView.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
+ urgentwithdView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; ///鏀瑰彉鏈�鍚庡姛鑳藉揩绾挎潯棰滆壊
+ urgentwithdView.iconBtn.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
+ urgentwithdView.funnameBtn.TextID = MyInternationalizationString.urgentwithdrawal;
+ urgentwithdView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ urgentwithdView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ urgentwithdView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ urgentwithdView.funnextBtn.Visible = false;
+ middle.AddChidren(urgentwithdView.FunFrameView());
#endregion
#endregion
///鍦ㄥ甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> athomeclick = (sedner14, e14) =>
+ athomeView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- athomedefenceSelected.Visible = true;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = true;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = false;
};
- athomedefenceRowLayout.MouseUpEventHandler += athomeclick;
- btnathomedefence.MouseUpEventHandler += athomeclick;
- athomedefenceSelected.MouseUpEventHandler += athomeclick;
- athomeFrameLayout.MouseUpEventHandler += athomeclick;
- athomeiconBtn.MouseUpEventHandler += athomeclick;
+
///绂诲甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
+ leaveView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = true;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = false;
};
- leavehomedefenceRowLayout.MouseUpEventHandler += leavehomeclick;
- leavehomebtndefence.MouseUpEventHandler += leavehomeclick;
- leavehomedefenceSelected.MouseUpEventHandler += leavehomeclick;
- leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
- leavehomeiconBtn.MouseUpEventHandler += leavehomeclick;
+
///鎾ら槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> disableclick = (seder, e) =>
+ withdrawalView.clickviewBtn.MouseUpEventHandler+= (seder, e) =>
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = true;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = true;
+ urgentwithdView.funnextBtn.Visible = false;
};
- withdrawalRowLayout.MouseUpEventHandler += disableclick;
- btnwithdrawal.MouseUpEventHandler += disableclick;
- withdrawalSelected.MouseUpEventHandler += disableclick;
- withdrawalFrameLayout.MouseUpEventHandler += disableclick;
- withdrawaliconBtn.MouseUpEventHandler += disableclick;
+
///鑳佽揩鎾ら槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> urgentwithdrawalclick = (seder, e) =>
+ urgentwithdView.clickviewBtn.MouseUpEventHandler += (seder, e) =>
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = true;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = true;
};
- urgentwithdrawalRowLayout.MouseUpEventHandler += urgentwithdrawalclick;
- btnurgentwithdrawal.MouseUpEventHandler += urgentwithdrawalclick;
- urgentwithdrawalSelected.MouseUpEventHandler+= urgentwithdrawalclick;
- urgentwithdFrameLayout.MouseUpEventHandler += urgentwithdrawalclick;
- urgentwithdiconBtn.MouseUpEventHandler += urgentwithdrawalclick;
+
if (IsDeviceEditor)
{
@@ -304,17 +156,17 @@
{
if (actions["Password"].ToString() == "888888")
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = true;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = true;
}
else
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = true;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = true;
+ urgentwithdView.funnextBtn.Visible = false;
}
}
@@ -323,17 +175,17 @@
if (actions["SecurityModeId"].ToString() == "1")
{
- athomedefenceSelected.Visible = true;
- leavehomedefenceSelected.Visible = false;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = true;
+ leaveView.funnextBtn.Visible = false;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = false;
}
else
{
- athomedefenceSelected.Visible = false;
- leavehomedefenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = false;
+ athomeView.funnextBtn.Visible = false;
+ leaveView.funnextBtn.Visible = true;
+ withdrawalView.funnextBtn.Visible = false;
+ urgentwithdView.funnextBtn.Visible = false;
}
}
@@ -344,13 +196,12 @@
}
}
-
- btnsave.MouseUpEventHandler += (sender, e) =>
+ saveView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
- if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible && !urgentwithdrawalSelected.Visible)
+ if (!athomeView.funnextBtn.Visible && !leaveView.funnextBtn.Visible && !withdrawalView.funnextBtn.Visible && !urgentwithdView.funnextBtn.Visible)
{
-
+
var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
Language.StringByID(MyInternationalizationString.securitytip),
Language.StringByID(MyInternationalizationString.confrim));
@@ -374,7 +225,7 @@
actionsInfo.Add("LinkType", 6);
actionsInfo.Add("CheckIASStatus", 0);
actionsInfo.Add("IsDelayStart", 0);
-
+
if (actionsInfo.ContainsKey("Password"))
{
actionsInfo.Remove("Password");
@@ -388,7 +239,7 @@
actionsInfo.Remove("SecurityModeId");
}
///鍦ㄥ甯冮槻
- if (athomedefenceSelected.Visible)
+ if (athomeView.funnextBtn.Visible)
{
actionsInfo.Add("SecuritySetting", "1");
actionsInfo.Add("SecurityModeId", "1");
@@ -396,7 +247,7 @@
}
///绂诲甯冮槻
- if (leavehomedefenceSelected.Visible)
+ if (leaveView.funnextBtn.Visible)
{
actionsInfo.Add("SecuritySetting", "1");
actionsInfo.Add("SecurityModeId", "2");
@@ -404,7 +255,7 @@
}
///鎾ら槻
- if (withdrawalSelected.Visible)
+ if (withdrawalView.funnextBtn.Visible)
{
actionsInfo.Add("SecuritySetting", "0");
actionsInfo.Add("SecurityModeId", "0");
@@ -412,7 +263,7 @@
}
///绱ц揩鎾ら槻
- if (urgentwithdrawalSelected.Visible)
+ if (urgentwithdView.funnextBtn.Visible)
{
actionsInfo.Add("SecuritySetting", "0");
actionsInfo.Add("SecurityModeId", "0");
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
old mode 100755
new mode 100644
index ef3652f..ae014e0
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
@@ -50,7 +50,9 @@
TypeView typeView = new TypeView();
middle.AddChidren(typeView.Show());
typeView.textBtn.TextID = MyInternationalizationString.type;
+ typeView.titleBtn.Width = Application.GetRealWidth(630+70);
typeView.titleBtn.TextID = MyInternationalizationString.timeframe;
+ typeView.backBtn.Visible = false;
#endregion
@@ -67,7 +69,9 @@
TypeView endView = new TypeView();
endView.frameLayout.Y = startView.frameLayout.Bottom;
+ endView.frameLayout.Height = Application.GetRealHeight(160 + 20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
middle.AddChidren(endView.Show());
+ endView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;//鏀瑰彉鏈�鍚庝竴琛岀嚎棰滆壊;
endView.textBtn.TextID = MyInternationalizationString.endtime;
endView.titleBtn.Tag = "0";
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
old mode 100755
new mode 100644
index 8e1134d..6994a1b
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
@@ -14,13 +14,12 @@
{
Tag = "Logic";
}
-
Dictionary<string, string> timeifon = new Dictionary<string, string>();
- Button beforeClickButton = new Button();
TimeView timeview = new TimeView
{
- Height = Application.GetRealHeight(600),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+
+ Height = Application.GetRealHeight(550),
+ BackgroundColor =0x40ffffff,// ZigbeeColor.Current.LogicTopViewBackgroundColor,
Width = Application.GetRealWidth(1080),
};
/// <summary>
@@ -96,17 +95,20 @@
void SelectedTimeTypeView(FrameLayout middle, int TypeValue)
{
middle.RemoveAll();
- #region -----绔嬪嵆鎵ц 鏃跺埢
+ #region -----绫诲瀷 鏃跺埢
TypeView typeView = new TypeView();
middle.AddChidren(typeView.Show());
typeView.textBtn.TextID = MyInternationalizationString.type;
+ typeView.titleBtn.Width = Application.GetRealWidth(630 + 70);
typeView.titleBtn.TextID = MyInternationalizationString.immediateexecution;
-
- TypeView timeView = new TypeView();
- timeView.frameLayout.Y = typeView.frameLayout.Bottom;
- middle.AddChidren(timeView.Show());
- timeView.textBtn.TextID = MyInternationalizationString.moment;
- timeView.clickviewBtn.MouseUpEventHandler += (sender, e) => {
+ typeView.backBtn.Visible = false;
+
+
+ TypeView skView = new TypeView();
+ skView.frameLayout.Y = typeView.frameLayout.Bottom;
+ middle.AddChidren(skView.Show());
+ skView.textBtn.TextID = MyInternationalizationString.moment;
+ skView.clickviewBtn.MouseUpEventHandler += (sender, e) => {
TimeTypeView(middle, TypeValue);
};
@@ -117,13 +119,13 @@
{
case 0:
{
- timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.logiccustom);
+ skView.titleBtn.Text = Language.StringByID(MyInternationalizationString.logiccustom);
textvalue = timeifon["StartHour"] + ":" + timeifon["StartMin"];
}
break;
case 1:
{
- timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunrise);
+ skView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunrise);
if (int.Parse(timeifon["AdjustTime"]) > 0)
{
textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
@@ -140,7 +142,7 @@
break;
case 2:
{
- timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunset);
+ skView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunset);
if (int.Parse(timeifon["AdjustTime"]) > 0)
{
textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
@@ -157,7 +159,7 @@
break;
case 3:
{
- timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.noon);
+ skView.titleBtn.Text = Language.StringByID(MyInternationalizationString.noon);
if (int.Parse(timeifon["AdjustTime"]) > 0)
{
textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
@@ -177,24 +179,13 @@
{
#region -----鑷畾涔夋椂闂�
- typeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
- timeView.backBtn.UnSelectedImagePath = "ZigeeLogic/dropdown.png";
- var linebtn = new Button
+ skView.backBtn.UnSelectedImagePath = "ZigeeLogic/dropdown.png";
+ var rowTimeView = new FrameLayout
{
- Y = timeView.frameLayout.Bottom,
- Height = Application.GetRealHeight(5),
- BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- X = Application.GetRealWidth(58),
- Width = Application.GetRealWidth(965),
- };
- middle.AddChidren(linebtn);
- var rowTimeView = new RowLayout
- {
- Y = linebtn.Bottom,
+ Y = skView.frameLayout.Bottom,
Height = Application.GetRealHeight(600),
};
middle.AddChidren(rowTimeView);
-
rowTimeView.AddChidren(timeview);
#endregion
}
@@ -204,10 +195,12 @@
#region -----鎻愬墠/寤舵椂
TypeView delayView = new TypeView();
- delayView.frameLayout.Y = timeView.frameLayout.Bottom;
+ delayView.frameLayout.Y = skView.frameLayout.Bottom;
+ delayView.frameLayout.Height = Application.GetRealHeight(160+20);//澧為珮鏈�鍚庝竴琛岀殑楂樺害20;
middle.AddChidren(delayView.Show());
delayView.textBtn.TextID = MyInternationalizationString.Advancedelay;
delayView.titleBtn.Text = textvalue;
+ delayView.lineBtn.BackgroundColor = BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
delayView.clickviewBtn.MouseUpEventHandler += (sender, e) => {
var mList = new List<string>();
mList.Add(Language.StringByID(MyInternationalizationString.advance));
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
index 680359b..c30fa40 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
@@ -32,25 +32,9 @@
};
this.AddChidren(middle);
- var saveFramelayout = new FrameLayout
- {
- Y = middle.Bottom,
- Height = Application.GetRealHeight(260),
- BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
- };
- this.AddChidren(saveFramelayout);
- var saveBtn= new Button
- {
- X = Application.GetRealWidth(85),
- Height = Application.GetRealHeight(130),//194
- Width = Application.GetRealWidth(910),
- Radius = (uint)Application.GetRealHeight(60),
- BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
- TextID = MyInternationalizationString.Save,
- TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
- TextSize = 16,
- };
- saveFramelayout.AddChidren(saveBtn);
+ LogicView.SaveView saveView = new LogicView.SaveView();
+ saveView.frameLayout.Y = middle.Bottom;
+ this.AddChidren(saveView.Show());
if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 5)
{
@@ -113,68 +97,29 @@
foreach (var name in cyclelist)
{
- var weekFramelayout = new FrameLayout
- {
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- };
- middle.AddChidren(weekFramelayout);
-
- var weekIconBtn = new Button
- {
- Width = Application.GetMinRealAverage(81),
- Height = Application.GetMinRealAverage(81),
- UnSelectedImagePath = "ZigeeLogic/point.png",
- X = Application.GetRealWidth(58),
- Y = Application.GetRealHeight(55),
- };
- weekFramelayout.AddChidren(weekIconBtn);
-
- var weekRow = new RowLayout
- {
- Y = Application.GetRealHeight(30),
- Width = Application.GetRealWidth(850),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(176),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
- };
- weekFramelayout.AddChidren(weekRow);
-
-
- var weekTextBtn = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- Text = name,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 15,
- };
- weekRow.AddChidren(weekTextBtn);
-
- var selectedBtn = new Button
- {
- X = Application.GetRealWidth(789),
- Width = Application.GetMinRealAverage(60),
- Height = Application.GetMinRealAverage(60),
- UnSelectedImagePath = "ZigeeLogic/selected.png",
- Gravity = Gravity.CenterVertical,
- Visible = false,
- };
- weekRow.AddChidren(selectedBtn);
-
+ FunView monView = new FunView();
+ monView.iconBtn.UnSelectedImagePath = "ZigeeLogic/point.png";
+ monView.funnameBtn.Text= name;
+ monView.funnextBtn.Width = Application.GetMinRealAverage(60);
+ monView.funnextBtn.Height = Application.GetMinRealAverage(60);
+ monView.funnextBtn.UnSelectedImagePath = "ZigeeLogic/selected.png";
+ monView.funnextBtn.Visible = false;
+ middle.AddChidren(monView.FunFrameView());
if (Language.StringByID(MyInternationalizationString.sun) == name)
{
- weekRow.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
+ monView.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//鏈�鍚庝竴琛屽鍔�20楂樺害;
+ monView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; ///鏀瑰彉鏈�鍚庡姛鑳藉揩绾挎潯棰滆壊
}
var str = weeklist.Find((o) => { return o == name; });
if (str != null)
{
- selectedBtn.Visible = true;
+ monView.funnextBtn.Visible = true;
}
- EventHandler<MouseEventArgs> weekclick = (sender, e) =>
+ monView.clickviewBtn.MouseUpEventHandler+= (sender, e) =>
{
- selectedBtn.Visible = !selectedBtn.Visible;
- if (selectedBtn.Visible)
+ monView.funnextBtn.Visible = !monView.funnextBtn.Visible;
+ if (monView.funnextBtn.Visible)
{
var d = weeklist.Find((o) => { return o == name; });
if (d == null)
@@ -191,16 +136,11 @@
}
};
- weekFramelayout.MouseUpEventHandler += weekclick;
- weekTextBtn.MouseUpEventHandler += weekclick;
- selectedBtn.MouseUpEventHandler += weekclick;
- weekIconBtn.MouseUpEventHandler += weekclick;
- weekRow.MouseUpEventHandler += weekclick;
}
- saveBtn.MouseUpEventHandler += (sender, e) =>
+ saveView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
{
int weekvalue = 0;
--
Gitblit v1.8.0