| | |
| | | using Shared; |
| | | using Shared.Common; |
| | | using Shared.Phone; |
| | | using Shared.Phone.Device.Logic.LogicView; |
| | | using Shared.R; |
| | | using ZigBee.Device; |
| | | namespace Shared.Phone.Device.Logic |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | #region 最上面的布局代码 |
| | | var topRowLayout = new RowLayout |
| | | { |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor, |
| | | Height = Application.GetRealHeight(184), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor, |
| | | }; |
| | | this.AddChidren(topRowLayout); |
| | | |
| | | var titleName = new Button |
| | | { |
| | | TextSize = 17, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(176), |
| | | Width = Application.GetRealWidth(600), |
| | | Height = Application.GetRealHeight(69), |
| | | Y = Application.GetRealHeight(92), |
| | | TextID = MyInternationalizationString.addtime, |
| | | IsBold = true, |
| | | }; |
| | | topRowLayout.AddChidren(titleName); |
| | | |
| | | var clickBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(81 + 51), |
| | | Height = Application.GetRealHeight(58 + 40), |
| | | Y = Application.GetRealHeight(98 - 40), |
| | | }; |
| | | topRowLayout.AddChidren(clickBtn); |
| | | clickBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | var back = new Button |
| | | { |
| | | Width = Application.GetRealWidth(30), |
| | | Height = Application.GetRealHeight(51), |
| | | X = Application.GetRealWidth(81), |
| | | Y = Application.GetRealHeight(98), |
| | | //Gravity = Gravity.CenterVertical; |
| | | UnSelectedImagePath = "ZigeeLogic/back.png", |
| | | }; |
| | | topRowLayout.AddChidren(back); |
| | | back.MouseDownEventHandler += (sender, e) => { |
| | | RemoveFromParent(); |
| | | }; |
| | | #region 上面的布局代码 |
| | | TopView view = new TopView(); |
| | | this.AddChidren(view.TopRowView()); |
| | | view.toptitleNameBtn.TextID = MyInternationalizationString.addtime; |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); }; |
| | | #endregion |
| | | |
| | | |
| | | var middle = new FrameLayout |
| | | { |
| | | Y = topRowLayout.Bottom, |
| | | Y = view.topRowLayout.Bottom, |
| | | Height = Application.GetRealHeight(1920 - 184-260), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | this.AddChidren(middle); |
| | | |
| | | SelectedTimeTypeView(middle,TypeValue); |
| | | |
| | | |
| | |
| | | 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.TextID = MyInternationalizationString.immediateexecution; |
| | | |
| | | |
| | | var typeFramelayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | middle.AddChidren(typeFramelayout); |
| | | |
| | | |
| | | var typeRowlayout = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(965), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(58), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | typeFramelayout.AddChidren(typeRowlayout); |
| | | |
| | | var btnTypeTextTitle = new Button |
| | | { |
| | | Text = Language.StringByID(MyInternationalizationString.type), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | Width = Application.GetRealWidth(265), |
| | | TextSize = 14, |
| | | }; |
| | | typeRowlayout.AddChidren(btnTypeTextTitle); |
| | | |
| | | |
| | | ///显示时间类型的控件 |
| | | var btnimmediateexecution = new Button |
| | | { |
| | | X = btnTypeTextTitle.Right, |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(630), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextID=MyInternationalizationString.immediateexecution, |
| | | TextSize = 14, |
| | | }; |
| | | typeRowlayout.AddChidren(btnimmediateexecution); |
| | | |
| | | |
| | | var btnimmediateexecutionBack = new Button |
| | | { |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealHeight(58), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | X = btnimmediateexecution.Right + Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | typeRowlayout.AddChidren(btnimmediateexecutionBack); |
| | | |
| | | #endregion |
| | | |
| | | #region -----时刻 |
| | | |
| | | |
| | | var timetypeFramelayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | Y= typeFramelayout.Bottom, |
| | | }; |
| | | middle.AddChidren(timetypeFramelayout); |
| | | |
| | | |
| | | var rowSelectedTimeType = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(965), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(58), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | |
| | | }; |
| | | timetypeFramelayout.AddChidren(rowSelectedTimeType); |
| | | |
| | | var btnTimeText = new Button |
| | | { |
| | | Text = Language.StringByID(MyInternationalizationString.moment), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | Width=Application.GetRealWidth(265), |
| | | TextSize = 14, |
| | | }; |
| | | rowSelectedTimeType.AddChidren(btnTimeText); |
| | | |
| | | |
| | | ///显示时间类型的控件 |
| | | var btnTimeTpye = new Button |
| | | { |
| | | X = btnTimeText.Right, |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(630), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextSize = 14, |
| | | }; |
| | | rowSelectedTimeType.AddChidren(btnTimeTpye); |
| | | |
| | | |
| | | var btnTimeTpyeBack = new Button |
| | | { |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealHeight(58), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | X = btnTimeTpye.Right+ Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | rowSelectedTimeType.AddChidren(btnTimeTpyeBack); |
| | | |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> timetpyeclick = (sedner, e) => |
| | | { |
| | | TypeView timeView = new TypeView(); |
| | | timeView.frameLayout.Y = typeView.frameLayout.Bottom; |
| | | middle.AddChidren(timeView.Show()); |
| | | timeView.textBtn.TextID = MyInternationalizationString.moment; |
| | | timeView.clickviewBtn.MouseUpEventHandler += (sender, e) => { |
| | | TimeTypeView(middle, TypeValue); |
| | | }; |
| | | rowSelectedTimeType.MouseUpEventHandler += timetpyeclick; |
| | | btnTimeText.MouseUpEventHandler += timetpyeclick; |
| | | btnTimeTpye.MouseUpEventHandler += timetpyeclick; |
| | | btnTimeTpyeBack.MouseUpEventHandler += timetpyeclick; |
| | | timetypeFramelayout.MouseUpEventHandler += timetpyeclick; |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | string textvalue = ""; |
| | |
| | | { |
| | | case 0: |
| | | { |
| | | btnTimeTpye.Text = Language.StringByID(MyInternationalizationString.logiccustom); |
| | | timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.logiccustom); |
| | | textvalue = timeifon["StartHour"] + ":" + timeifon["StartMin"]; |
| | | } |
| | | break; |
| | | case 1: |
| | | { |
| | | btnTimeTpye.Text = Language.StringByID(MyInternationalizationString.sunrise); |
| | | timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunrise); |
| | | if (int.Parse(timeifon["AdjustTime"]) > 0) |
| | | { |
| | | textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute); |
| | |
| | | break; |
| | | case 2: |
| | | { |
| | | btnTimeTpye.Text = Language.StringByID(MyInternationalizationString.sunset); |
| | | timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.sunset); |
| | | if (int.Parse(timeifon["AdjustTime"]) > 0) |
| | | { |
| | | textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute); |
| | |
| | | break; |
| | | case 3: |
| | | { |
| | | btnTimeTpye.Text = Language.StringByID(MyInternationalizationString.noon); |
| | | timeView.titleBtn.Text = Language.StringByID(MyInternationalizationString.noon); |
| | | if (int.Parse(timeifon["AdjustTime"]) > 0) |
| | | { |
| | | textvalue = Language.StringByID(MyInternationalizationString.delayed) + timeifon["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute); |
| | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (TypeValue == 0) |
| | | { |
| | | |
| | | #region -----自定义时间 |
| | | rowSelectedTimeType.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | btnTimeTpyeBack.UnSelectedImagePath = "ZigeeLogic/dropdown.png"; |
| | | typeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | timeView.backBtn.UnSelectedImagePath = "ZigeeLogic/dropdown.png"; |
| | | var linebtn = new Button |
| | | { |
| | | Y = timetypeFramelayout.Bottom, |
| | | Y = timeView.frameLayout.Bottom, |
| | | Height = Application.GetRealHeight(5), |
| | | BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | X=Application.GetRealWidth(58), |
| | |
| | | |
| | | #region -----提前/延时 |
| | | |
| | | var delayFramelayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | Y = timetypeFramelayout.Bottom, |
| | | }; |
| | | middle.AddChidren(delayFramelayout); |
| | | |
| | | |
| | | var rowDelayType = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(965), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(58), |
| | | LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | delayFramelayout.AddChidren(rowDelayType); |
| | | |
| | | var btnDelayTimeText = new Button |
| | | { |
| | | Text = Language.StringByID(MyInternationalizationString.Advancedelay), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | Width = Application.GetRealWidth(265), |
| | | TextSize = 14, |
| | | }; |
| | | rowDelayType.AddChidren(btnDelayTimeText); |
| | | |
| | | |
| | | ///显示时间类型的控件 |
| | | var btnDelayTime = new Button |
| | | { |
| | | X = btnTimeText.Right, |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(630), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | Text = textvalue, |
| | | TextSize = 14, |
| | | }; |
| | | rowDelayType.AddChidren(btnDelayTime); |
| | | |
| | | |
| | | var btnDelayTimeBack = new Button |
| | | { |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealHeight(58), |
| | | UnSelectedImagePath = "ZigeeLogic/next.png", |
| | | X = btnTimeTpye.Right + Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | rowDelayType.AddChidren(btnDelayTimeBack); |
| | | |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> timeclick = (sedner, e) => |
| | | { |
| | | |
| | | TypeView delayView = new TypeView(); |
| | | delayView.frameLayout.Y = timeView.frameLayout.Bottom; |
| | | middle.AddChidren(delayView.Show()); |
| | | delayView.textBtn.TextID = MyInternationalizationString.Advancedelay; |
| | | delayView.titleBtn.Text = textvalue; |
| | | delayView.clickviewBtn.MouseUpEventHandler += (sender, e) => { |
| | | var mList = new List<string>(); |
| | | mList.Add(Language.StringByID(MyInternationalizationString.advance)); |
| | | mList.Add(Language.StringByID(MyInternationalizationString.nothing)); |
| | |
| | | }, selectIndex, timevalue - 1, Language.StringByID(MyInternationalizationString.Advancedelay)); |
| | | |
| | | }; |
| | | delayFramelayout.MouseUpEventHandler += timeclick; |
| | | rowDelayType.MouseUpEventHandler += timeclick; |
| | | btnDelayTimeText.MouseUpEventHandler += timeclick; |
| | | btnDelayTime.MouseUpEventHandler += timeclick; |
| | | btnDelayTimeBack.MouseUpEventHandler += timeclick; |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | |
| | | var fra = new FrameLayout |
| | | { |
| | | Y = middle.Bottom, |
| | | Height = Application.GetRealHeight(260), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | this.AddChidren(fra); |
| | | var btnsave = 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, |
| | | }; |
| | | fra.AddChidren(btnsave); |
| | | btnsave.MouseUpEventHandler += (sender, e) => |
| | | //保存 |
| | | SaveView saveView = new SaveView(); |
| | | saveView.frameLayout.Y = middle.Bottom; |
| | | this.AddChidren(saveView.Show()); |
| | | saveView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (TypeValue == 0) |
| | | { |
| | |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor }; |
| | | this.AddChidren(flMain); |
| | | flMain.MouseUpEventHandler += (sender12, e12) => |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | var fraview = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080), |
| | | Height = Application.GetRealHeight(850), |
| | | Y = Application.GetRealHeight(1920 - 850), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | //Radius = (uint)Application.GetRealHeight(60), |
| | | }; |
| | | flMain.AddChidren(fraview); |
| | | fraview.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | |
| | | #region -------取消 完成 |
| | | var timetype = new RowLayout |
| | | CompleteView completeView = new CompleteView(); |
| | | flMain.AddChidren(completeView.Show(4)); |
| | | completeView.Btntitle.TextID = MyInternationalizationString.type; |
| | | EventHandler<MouseEventArgs> clickcancel = (sender, e) => |
| | | { |
| | | Height = Application.GetRealHeight(140), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | fraview.AddChidren(timetype); |
| | | var Btncancel = new Button |
| | | { |
| | | TextID = MyInternationalizationString.cancel, |
| | | TextColor = ZigbeeColor.Current.LogicBtnCancelColor, |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(200), |
| | | X = Application.GetRealWidth(80), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | }; |
| | | timetype.AddChidren(Btncancel); |
| | | Btncancel.MouseUpEventHandler += (sender16, e16) => |
| | | { |
| | | flMain.RemoveFromParent(); |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | flMain.MouseUpEventHandler += clickcancel; |
| | | completeView.Btncancel.MouseUpEventHandler += clickcancel; |
| | | |
| | | var Btntitle = new Button |
| | | { |
| | | TextID = MyInternationalizationString.type, |
| | | TextColor = ZigbeeColor.Current.LogicBtnTypeColor, |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(320), |
| | | TextAlignment = TextAlignment.Center, |
| | | X = Btncancel.Right + Application.GetRealWidth(100), |
| | | TextSize = 16, |
| | | }; |
| | | timetype.AddChidren(Btntitle); |
| | | var Btncomplete = new Button |
| | | { |
| | | TextID = MyInternationalizationString.complete, |
| | | TextColor = ZigbeeColor.Current.LogicBtnCompleteColor, |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Btntitle.Right + Application.GetRealWidth(100), |
| | | TextSize = 14, |
| | | |
| | | }; |
| | | timetype.AddChidren(Btncomplete); |
| | | #endregion |
| | | #region -------日出,日落,正午,自定义 |
| | | #region 日出 |
| | | // 日出 |
| | | mFunView sunriseView = new mFunView(); |
| | | sunriseView.frameLayout.Y = Application.GetRealHeight(140 + 20); |
| | | completeView.Show(4).AddChidren(sunriseView.Show()); |
| | | sunriseView.titleBtn.TextID = MyInternationalizationString.sunrise; |
| | | |
| | | //日落 |
| | | mFunView sunsetView = new mFunView(); |
| | | sunsetView.frameLayout.Y = sunriseView.frameLayout.Bottom; |
| | | completeView.Show(4).AddChidren(sunsetView.Show()); |
| | | sunsetView.titleBtn.TextID = MyInternationalizationString.sunset; |
| | | |
| | | var sunriseFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y = timetype.Bottom + Application.GetRealHeight(50), |
| | | }; |
| | | fraview.AddChidren(sunriseFrameLayout); |
| | | |
| | | var sunriseRow = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(920), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(80), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | sunriseFrameLayout.AddChidren(sunriseRow); |
| | | |
| | | var btnsunrisetext = new Button |
| | | { |
| | | Width = Application.GetRealWidth(600), |
| | | TextID = MyInternationalizationString.sunrise, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, |
| | | TextSize = 14, |
| | | }; |
| | | sunriseRow.AddChidren(btnsunrisetext); |
| | | |
| | | var sunriseSelected = new SelectedButton(); |
| | | sunriseRow.AddChidren(sunriseSelected); |
| | | #endregion |
| | | #region 日落 |
| | | |
| | | |
| | | |
| | | var sunsetFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y = sunriseFrameLayout.Bottom, |
| | | }; |
| | | fraview.AddChidren(sunsetFrameLayout); |
| | | |
| | | var sunsetRow = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(920), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(80), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | sunsetFrameLayout.AddChidren(sunsetRow); |
| | | |
| | | var btnsunsettext = new Button |
| | | { |
| | | Width = Application.GetRealWidth(600), |
| | | TextID = MyInternationalizationString.sunset, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, |
| | | TextSize = 14, |
| | | }; |
| | | sunsetRow.AddChidren(btnsunsettext); |
| | | |
| | | var sunsetSelected = new SelectedButton(); |
| | | sunsetRow.AddChidren(sunsetSelected); |
| | | #endregion |
| | | |
| | | #region 正午 |
| | | //正午 |
| | | mFunView noonView = new mFunView(); |
| | | noonView.frameLayout.Y = sunsetView.frameLayout.Bottom; |
| | | completeView.Show(4).AddChidren(noonView.Show()); |
| | | noonView.titleBtn.TextID = MyInternationalizationString.noon; |
| | | |
| | | //自定义 |
| | | mFunView customView = new mFunView(); |
| | | customView.frameLayout.Y = noonView.frameLayout.Bottom; |
| | | completeView.Show(4).AddChidren(customView.Show()); |
| | | customView.titleBtn.TextID = MyInternationalizationString.logiccustom; |
| | | customView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | |
| | | |
| | | var noonFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y = sunsetFrameLayout.Bottom, |
| | | }; |
| | | fraview.AddChidren(noonFrameLayout); |
| | | |
| | | var noonRow = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(920), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(80), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | noonFrameLayout.AddChidren(noonRow); |
| | | |
| | | var btnnoontext = new Button |
| | | { |
| | | Width = Application.GetRealWidth(600), |
| | | TextID = MyInternationalizationString.noon, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, |
| | | TextSize = 14, |
| | | }; |
| | | noonRow.AddChidren(btnnoontext); |
| | | |
| | | var noonSelected = new SelectedButton(); |
| | | noonRow.AddChidren(noonSelected); |
| | | |
| | | #endregion |
| | | #region 自定义 |
| | | |
| | | var logiccustomFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Y = noonFrameLayout.Bottom, |
| | | }; |
| | | fraview.AddChidren(logiccustomFrameLayout); |
| | | |
| | | var logiccustomRow = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(920), |
| | | Height = Application.GetRealHeight(130), |
| | | X = Application.GetRealWidth(80), |
| | | LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | logiccustomFrameLayout.AddChidren(logiccustomRow); |
| | | |
| | | var btnlogiccustomtext = new Button |
| | | { |
| | | Width = Application.GetRealWidth(600), |
| | | TextID = MyInternationalizationString.logiccustom, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, |
| | | TextSize = 14, |
| | | }; |
| | | logiccustomRow.AddChidren(btnlogiccustomtext); |
| | | |
| | | var logiccustomSelected = new SelectedButton(); |
| | | logiccustomRow.AddChidren(logiccustomSelected); |
| | | #endregion |
| | | int value = -1; |
| | | EventHandler<MouseEventArgs> sunriseclick = (sender,e) => { |
| | | btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseSelected.Visible = true; |
| | | sunsetSelected.Visible = false; |
| | | noonSelected.Visible = false; |
| | | logiccustomSelected.Visible = false; |
| | | sunriseView.clickviewBtn.MouseUpEventHandler += (sender, e) => { |
| | | sunriseView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | sunsetView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | noonView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | customView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseView.selectedIconBtn.Visible = true; |
| | | sunsetView.selectedIconBtn.Visible = false; |
| | | noonView.selectedIconBtn.Visible = false; |
| | | customView.selectedIconBtn.Visible = false; |
| | | value = 1; |
| | | }; |
| | | sunriseFrameLayout.MouseUpEventHandler += sunriseclick; |
| | | sunriseRow.MouseUpEventHandler += sunriseclick; |
| | | btnsunrisetext.MouseUpEventHandler += sunriseclick; |
| | | sunriseSelected.MouseUpEventHandler += sunriseclick; |
| | | |
| | | EventHandler<MouseEventArgs> sunsetclick = (sender, e) => { |
| | | btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseSelected.Visible = false; |
| | | sunsetSelected.Visible = true; |
| | | noonSelected.Visible = false; |
| | | logiccustomSelected.Visible = false; |
| | | sunsetView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | sunriseView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunsetView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | noonView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | customView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseView.selectedIconBtn.Visible = false; |
| | | sunsetView.selectedIconBtn.Visible = true; |
| | | noonView.selectedIconBtn.Visible = false; |
| | | customView.selectedIconBtn.Visible = false; |
| | | value = 2; |
| | | }; |
| | | sunsetFrameLayout.MouseUpEventHandler += sunsetclick; |
| | | sunsetRow.MouseUpEventHandler += sunsetclick; |
| | | btnsunsettext.MouseUpEventHandler += sunsetclick; |
| | | sunsetSelected.MouseUpEventHandler += sunsetclick; |
| | | |
| | | EventHandler<MouseEventArgs> noonclick = (sender, e) => |
| | | noonView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseSelected.Visible = false; |
| | | sunsetSelected.Visible = false; |
| | | noonSelected.Visible = true; |
| | | logiccustomSelected.Visible = false; |
| | | sunriseView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunsetView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | noonView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | customView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunriseView.selectedIconBtn.Visible = false; |
| | | sunsetView.selectedIconBtn.Visible = false; |
| | | noonView.selectedIconBtn.Visible = true; |
| | | customView.selectedIconBtn.Visible = false; |
| | | value = 3; |
| | | }; |
| | | noonFrameLayout.MouseUpEventHandler += sunsetclick; |
| | | noonRow.MouseUpEventHandler += noonclick; |
| | | btnnoontext.MouseUpEventHandler += noonclick; |
| | | noonSelected.MouseUpEventHandler += noonclick; |
| | | |
| | | EventHandler<MouseEventArgs> ogiccustomclick = (sender, e) => |
| | | customView.clickviewBtn.MouseUpEventHandler +=(sender, e) => |
| | | { |
| | | btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | sunriseSelected.Visible = false; |
| | | sunsetSelected.Visible = false; |
| | | noonSelected.Visible = false; |
| | | logiccustomSelected.Visible = true; |
| | | sunriseView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | sunsetView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | noonView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | customView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | sunriseView.selectedIconBtn.Visible = false; |
| | | sunsetView.selectedIconBtn.Visible = false; |
| | | noonView.selectedIconBtn.Visible = false; |
| | | customView.selectedIconBtn.Visible = true; |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | flMain.RemoveFromParent(); |
| | | |
| | |
| | | timeifon.Add("StartMin", "0"); |
| | | SelectedTimeTypeView(middle, 0); |
| | | }; |
| | | logiccustomFrameLayout.MouseUpEventHandler += ogiccustomclick; |
| | | logiccustomRow.MouseUpEventHandler += ogiccustomclick; |
| | | btnlogiccustomtext.MouseUpEventHandler += ogiccustomclick; |
| | | logiccustomSelected.MouseUpEventHandler += ogiccustomclick; |
| | | |
| | | #endregion |
| | | Btncomplete.MouseUpEventHandler += (sender, e) => |
| | | completeView.Btncomplete.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (value == -1) |
| | | { |