.DS_StoreBinary files differ
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> ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ideBinary files differ
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); 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, ZigbeeApp/Shared/Phone/Device/Logic/Cycle.csold mode 100755 new mode 100644
@@ -15,11 +15,11 @@ { this.action = action; } public void Show() { Tag = "Logic"; #region 上面的布局代码 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; } 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) { ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.csold mode 100755 new mode 100644
@@ -38,6 +38,9 @@ foreach (var intvalue in timestrlist) { var timeframelayout = new FrameLayout { Height = Application.GetRealHeight(160), 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); 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; 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); } ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TypeView.csold mode 100755 new mode 100644
@@ -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; ZigbeeApp/Shared/Phone/Device/Logic/LogicView/mFunView.csold mode 100755 new mode 100644
@@ -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; 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 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"); ZigbeeApp/Shared/Phone/Device/Logic/TimePage.csold mode 100755 new mode 100644
@@ -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"; ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.csold mode 100755 new mode 100644
@@ -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)); 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;