old mode 100755
new mode 100644
| | |
| | | { |
| | | 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> |
| | |
| | | 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.backBtn.Visible = false; |
| | | |
| | | 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 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); |
| | | |
| | | }; |
| | |
| | | { |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | { |
| | | |
| | | #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 |
| | | } |
| | |
| | | #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)); |