old mode 100644
new mode 100755
| | |
| | | Tag = "Logic"; |
| | | } |
| | | |
| | | public void Show(int isInt=0, bool edit=false) |
| | | public void Show(int isInt = 0, bool edit = false) |
| | | { |
| | | |
| | | |
| | | #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(400), |
| | | Height = Application.GetRealHeight(69), |
| | | Y = Application.GetRealHeight(92), |
| | | TextID = MyInternationalizationString.adddelay, |
| | | }; |
| | | 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.adddelay; |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); }; |
| | | #endregion |
| | | |
| | | var middle = new FrameLayout |
| | | { |
| | | Y = topRowLayout.Bottom, |
| | | Height = Application.GetRealHeight(1920 - 184), |
| | | Y = view.topRowLayout.Bottom, |
| | | Height = Application.GetRealHeight(Method.H - 184), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | this.AddChidren(middle); |
| | | |
| | | |
| | | var blancolor = new FrameLayout |
| | | var blancolorFl = new FrameLayout |
| | | { |
| | | Width = Application.GetMinRealAverage(200), |
| | | Height = Application.GetMinRealAverage(200), |
| | |
| | | Radius = (uint)Application.GetMinRealAverage(100), |
| | | X = Application.GetRealWidth(440), |
| | | }; |
| | | middle.AddChidren(blancolor); |
| | | var color = new FrameLayout |
| | | middle.AddChidren(blancolorFl); |
| | | var colorBtn = new Button |
| | | { |
| | | Width = blancolor.Width - Application.GetMinRealAverage(24), |
| | | Height = blancolor.Height - Application.GetMinRealAverage(24), |
| | | Y = Application.GetRealHeight(12), |
| | | Width = Application.GetMinRealAverage(200-24), |
| | | Height =Application.GetMinRealAverage(200-24), |
| | | X = Application.GetMinRealAverage(12), |
| | | Y = Application.GetMinRealAverage(12), |
| | | BackgroundColor = 0xFFFEF1ED, |
| | | Radius = (uint)Application.GetMinRealAverage(86), |
| | | X = Application.GetRealWidth(12), |
| | | Radius = (uint)Application.GetMinRealAverage(88), |
| | | }; |
| | | blancolor.AddChidren(color); |
| | | blancolorFl.AddChidren(colorBtn); |
| | | var btnicon = new Button |
| | | { |
| | | X = Application.GetRealWidth(48), |
| | | Width = Application.GetRealWidth(80), |
| | | Height = Application.GetRealHeight(80), |
| | | Y = Application.GetRealHeight(48), |
| | | X = Application.GetMinRealAverage(58), |
| | | Y = Application.GetMinRealAverage(58), |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | UnSelectedImagePath = "ZigeeLogic/delay.png", |
| | | }; |
| | | color.AddChidren(btnicon); |
| | | blancolorFl.AddChidren(btnicon); |
| | | var titleText = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(480), |
| | | Height = Application.GetMinRealAverage(60), |
| | | X = Application.GetRealWidth(300), |
| | | Y = blancolor.Bottom + Application.GetRealHeight(50), |
| | | TextID =MyInternationalizationString.createtimetext, |
| | | Width = Application.GetRealWidth(580), |
| | | Height = Application.GetRealHeight(60), |
| | | X = Application.GetRealWidth(250), |
| | | Y = blancolorFl.Bottom + Application.GetRealHeight(50), |
| | | TextID = MyInternationalizationString.createtimetext, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextSize = 15, |
| | | |
| | |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | middle.AddChidren(PickerViewfra); |
| | | |
| | | |
| | | PickerViewfra.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | |
| | | var mUIPickerView = new UIPickerView |
| | | { |
| | | Y = Application.GetRealHeight(50), |
| | | Height = Application.GetRealHeight(600), |
| | | //Width=Application.GetRealWidth(1080-400), |
| | | //X=Application.GetRealWidth(200), |
| | | }; |
| | | PickerViewfra.AddChidren(mUIPickerView); |
| | | |
| | | var mList1 = new List<string>(); |
| | | var mList2 = new List<string>(); |
| | | for (int i = 0; i < 61; i++) |
| | | for (int i = 0; i < 60; i++) |
| | | { |
| | | if (i < 10) |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | mUIPickerView.setNPicker(mList1, mList2, new List<string>()); |
| | | |
| | | mUIPickerView.setNPicker(mList1, mList2,null); |
| | | ///默认状态 |
| | | mUIPickerView.setCurrentItems(0, 5, 0); |
| | | int timevalue = 5; |
| | | int value = 0; |
| | | if (edit) |
| | | { |
| | | |
| | | |
| | | timevalue = int.Parse(Common.Logic.CurrentLogic.Actions[isInt]["DelayTime"].ToString()); |
| | | var minutevalue1 = timevalue / 60; |
| | | var secondvalue1 = timevalue % 60; |
| | | //更新最新状态 |
| | | mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0); |
| | | if (timevalue > 3600) |
| | | { |
| | | //更新最新状态 |
| | | mUIPickerView.setCurrentItems(60, timevalue - 3600, 0); |
| | | } |
| | | else |
| | | { |
| | | |
| | | var minutevalue1 = timevalue / 60; |
| | | var secondvalue1 = timevalue % 60; |
| | | //更新最新状态 |
| | | mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0); |
| | | } |
| | | |
| | | value = timevalue; |
| | | } |
| | | string selectde = ""; |
| | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | var btnsave = new Button |
| | | { |
| | | Y = PickerViewfra.Height - Application.GetRealHeight(260), |
| | |
| | | BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor, |
| | | TextID = MyInternationalizationString.Save, |
| | | TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor, |
| | | TextSize=16, |
| | | }; |
| | | PickerViewfra.AddChidren(btnsave); |
| | | |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (selectde != ""|| timevalue==5) |
| | | if (selectde != "" || timevalue == 5) |
| | | { |
| | | Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); |
| | | actionsInfo.Add("LinkType", 7); |
| | |
| | | if (!edit) |
| | | { |
| | | var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt), |
| | | Language.StringByID(MyInternationalizationString.selectdevicestatuscondition), |
| | | Language.StringByID(MyInternationalizationString.complete)); |
| | | Language.StringByID(MyInternationalizationString.delaytip), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | | return; |
| | | } |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | logicCommunalPage.Show(() => { }); |
| | | }; |
| | | |
| | | } |
| | | } |
| | | } |