| | |
| | | |
| | | var titleName = new Button |
| | | { |
| | | |
| | | |
| | | TextSize = 17, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealWidth(150), |
| | | }; |
| | | topFrameLayout.AddChidren(titleName); |
| | | if (Common.Logic.CurrentLogic.LogicId == 1) |
| | | if (Common.Logic.CurrentLogic.LogicId != 0) |
| | | { |
| | | titleName.Text = Language.StringByID(MyInternationalizationString.editautomation); |
| | | } |
| | |
| | | UnSelectedImagePath = "ZigeeLogic/Back.png", |
| | | }; |
| | | topFrameLayout.AddChidren(back); |
| | | |
| | | back.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | //if (Common.Logic.CurrentLogic.LogicId != 0) |
| | |
| | | }; |
| | | logicnamefl.AddChidren(text); |
| | | |
| | | logicTextBox = new EditText |
| | | logicTextBox = new EditText |
| | | { |
| | | Width = Application.GetRealWidth(900), |
| | | Height = Application.GetRealHeight(60), |
| | |
| | | Y = text.Bottom + Application.GetRealHeight(10), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextSize=13, |
| | | Text =Common.Logic.CurrentLogic.LogicName, |
| | | TextSize = 13, |
| | | Text = Common.Logic.CurrentLogic.LogicName, |
| | | //TextID=MyInternationalizationString.automation1, |
| | | }; |
| | | logicnamefl.AddChidren(logicTextBox); |
| | | |
| | | |
| | | var btnline = new Button |
| | | { |
| | | Height = Application.GetRealHeight(4), |
| | |
| | | //BackgroundColor = 0xff323232, |
| | | }; |
| | | middle.AddChidren(conditionRowLayout); |
| | | |
| | | |
| | | conditionRowLayout.AddChidren(new Button |
| | | { |
| | | Width = Application.GetRealWidth(300), |
| | |
| | | }; |
| | | addfl.AddChidren(addbtn); |
| | | addbtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ConditionView(); |
| | | }; |
| | | { |
| | | ConditionView(); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | |
| | | case 0: |
| | | { |
| | | string s = ""; |
| | | s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; |
| | | s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; |
| | | timevalue.Text = Language.StringByID(MyInternationalizationString.time) + conditions["StartHour"] + ":" + s; |
| | | } |
| | | break; |
| | |
| | | } |
| | | else |
| | | { |
| | | timevalue.Text =Language.StringByID(MyInternationalizationString.sunset); |
| | | timevalue.Text = Language.StringByID(MyInternationalizationString.sunset); |
| | | } |
| | | break; |
| | | case 3: |
| | |
| | | } |
| | | else |
| | | { |
| | | timevalue.Text =Language.StringByID(MyInternationalizationString.noon); |
| | | timevalue.Text = Language.StringByID(MyInternationalizationString.noon); |
| | | } |
| | | break; |
| | | } |
| | |
| | | break; |
| | | case 5: |
| | | { |
| | | string s1="", s2=""; |
| | | s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; |
| | | s2 = conditions["StopMin"].Length <2 ? "0" + conditions["StopMin"] : conditions["StopMin"]; |
| | | string s1 = "", s2 = ""; |
| | | s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"]; |
| | | s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"]; |
| | | ///显示时间 |
| | | var timevalue = new Button |
| | | { |
| | |
| | | |
| | | var timeedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | //TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | |
| | | var deviceedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | Height = Application.GetRealHeight(160), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | X = Application.GetRealWidth(1080 - 340), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | conditionsowLayout.AddChidren(devicestatus); |
| | |
| | | |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | { |
| | | if (intvalue == "1") |
| | | { |
| | | devicestatus.TextID = MyInternationalizationString.callthepolice; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |
| | | break; |
| | | case DeviceType.OnOffSwitch: |
| | |
| | | |
| | | var logicedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | |
| | | var btnsecurityedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | break; |
| | | case 7: |
| | | { |
| | | var btnlocation= new Button |
| | | var btnlocation = new Button |
| | | { |
| | | X = Application.GetRealWidth(40), |
| | | Width = Application.GetRealWidth(700), |
| | |
| | | |
| | | var btnlocationedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | conditionsowLayout.AddRightView(btnlocationedit); |
| | | btnlocationedit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | AddLogicPage.LocationView(flMain, true); |
| | |
| | | |
| | | if (conditions["AtHome"] == "1") |
| | | { |
| | | locationstatus.Text =Language.StringByID(MyInternationalizationString.athome); |
| | | locationstatus.Text = Language.StringByID(MyInternationalizationString.athome); |
| | | } |
| | | else |
| | | { |
| | | locationstatus.Text =Language.StringByID(MyInternationalizationString.leavehome); |
| | | locationstatus.Text = Language.StringByID(MyInternationalizationString.leavehome); |
| | | } |
| | | } |
| | | break; |
| | |
| | | } |
| | | }; |
| | | alert.Show(); |
| | | |
| | | |
| | | }; |
| | | |
| | | } |
| | |
| | | // BackgroundColor = 0xff323232, |
| | | }; |
| | | middle.AddChidren(targetRowLayout); |
| | | |
| | | |
| | | |
| | | var btntargettitle = new Button |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | var actionsrowLayout = new RowLayout |
| | | var actionsrowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | }; |
| | |
| | | { |
| | | case 10: |
| | | { |
| | | var delaytime =actions["DelayTime"].ToString(); |
| | | |
| | | var delaytime = actions["DelayTime"].ToString(); |
| | | |
| | | var btnDelayTime = new Button |
| | | { |
| | | X = Application.GetRealWidth(40), |
| | |
| | | ///编辑设备状态Button |
| | | var timeedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | } |
| | | ListActions[i].Add("Time", 0); |
| | | } |
| | | |
| | | |
| | | ///设备名称Button |
| | | var btndevicename = new Button |
| | | { |
| | |
| | | Height = Application.GetRealHeight(160), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | X = Application.GetRealWidth(1080 - 340), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | }; |
| | | actionsrowLayout.AddChidren(devicestatus); |
| | | |
| | | ///编辑设备状态Button |
| | | var deviceedit = new Button |
| | | { |
| | | BackgroundColor =ZigbeeColor.Current.LogicEditBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor, |
| | | Text = Language.StringByID(MyInternationalizationString.edit), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | |
| | | ///编辑点击事件 |
| | | deviceedit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //var deviceStatePage = new DeviceStatePage(); |
| | | //UserView.HomePage.Instance.AddChidren(deviceStatePage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //deviceStatePage.IsDeviceEditor = true; |
| | | //deviceStatePage.Show(deviceinof); |
| | | { |
| | | //var deviceStatePage = new DeviceStatePage(); |
| | | //UserView.HomePage.Instance.AddChidren(deviceStatePage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //deviceStatePage.IsDeviceEditor = true; |
| | | //deviceStatePage.Show(deviceinof); |
| | | |
| | | //ActionModifyDeviceStateView(deviceinof); |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | LogicDevicePage.CurrentDeviceStateView(flMain, deviceinof, true); |
| | | }; |
| | | //ActionModifyDeviceStateView(deviceinof); |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | LogicDevicePage.CurrentDeviceStateView(flMain, deviceinof, true); |
| | | }; |
| | | |
| | | |
| | | switch (deviceinof.Type) |
| | | { |
| | | |
| | | case DeviceType.OnOffOutput: |
| | | { |
| | | var TaskList = actions["TaskList"] as List<Dictionary<string, string>>; |
| | |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case DeviceType.DimmableLight: |
| | | { |
| | | var TaskList = actions["TaskList"] as List<Dictionary<string, string>>; |
| | | if (TaskList == null) |
| | | { |
| | | continue; |
| | | } |
| | | foreach (var status in TaskList) |
| | | { |
| | | if (status["TaskType"].ToString() == "3") |
| | | { |
| | | var intvalue = int.Parse(status["Data1"]); |
| | | var lightbrightnessvalue = (intvalue * 100) / 254; |
| | | devicestatus.Text = lightbrightnessvalue.ToString() + "%"; |
| | | } |
| | | else if (status["TaskType"].ToString() == "1") |
| | | { |
| | | if (status["Data1"].ToString() == "1") |
| | | { |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open); |
| | | } |
| | | else |
| | | { |
| | | devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | //TextColor = 0xff121212, |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment=TextAlignment.CenterRight, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | }; |
| | | actionsrowLayout.AddChidren(logicstatus); |
| | | |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | //TextColor = 0xff121212, |
| | | TextID = MyInternationalizationString.securitymode, |
| | | TextID = MyInternationalizationString.security, |
| | | }; |
| | | actionsrowLayout.AddChidren(btnsecurity); |
| | | |
| | |
| | | Height = Application.GetRealHeight(160), |
| | | Gravity = Gravity.CenterVertical, |
| | | //TextColor = 0xff121212, |
| | | X = Application.GetRealWidth(1080 -330), |
| | | X = Application.GetRealWidth(1080 - 330), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment=TextAlignment.CenterRight, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | }; |
| | | actionsrowLayout.AddChidren(securitystatus); |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region ----推送设置---- |
| | | |
| | | /* |
| | | var pushRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(150), |
| | | }; |
| | | middle.AddChidren(pushRowLayout); |
| | | |
| | | |
| | | var btnpushtitle = new Button |
| | | { |
| | | //Text = "推送设置", |
| | |
| | | //TextID = MyInternationalizationString.execute, |
| | | }; |
| | | pushRowLayout.AddChidren(btnpushtitle); |
| | | |
| | | |
| | | var pushswitchRowlayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | LineColor = ZigbeeColor.Current.LogicLineColor, |
| | | }; |
| | | middle.AddChidren(pushswitchRowlayout); |
| | | |
| | | |
| | | var btnswitchtxet = new Button |
| | | { |
| | | //Text = "推送开关", |
| | |
| | | TextID = MyInternationalizationString.pushswitch, |
| | | }; |
| | | pushswitchRowlayout.AddChidren(btnswitchtxet); |
| | | |
| | | |
| | | var btnswitch = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(183), |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | pushswitchRowlayout.AddChidren(btnswitch); |
| | | |
| | | |
| | | btnswitch.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | btnswitch.IsSelected = !btnswitch.IsSelected; |
| | | if (btnswitch.IsSelected) |
| | | { |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | var custompushRowLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | }; |
| | | middle.AddChidren(custompushRowLayout); |
| | | |
| | | |
| | | var btncustompush = new Button |
| | | { |
| | | TextID = MyInternationalizationString.custompush, |
| | |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | | custompushRowLayout.AddChidren(btncustompush); |
| | | |
| | | |
| | | |
| | | |
| | | var custompushback = new Button |
| | | { |
| | | Width = Application.GetRealWidth(110), |
| | |
| | | UserView.HomePage.Instance.AddChidren(CustomText); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | CustomText.Show(); |
| | | |
| | | |
| | | }; |
| | | btncustompush.MouseUpEventHandler += customclick; |
| | | custompushback.MouseUpEventHandler += customclick; |
| | | custompushRowLayout.MouseUpEventHandler += customclick; |
| | | */ |
| | | #endregion |
| | | |
| | | |
| | | |
| | | var btnsave = new Button |
| | | { |
| | | Height = Application.GetRealHeight(150),//194 |
| | |
| | | AddChidren(btnsave); |
| | | } |
| | | btnsave.MouseUpEventHandler += async (sender, e) => |
| | | { |
| | | var name = logicTextBox.Text.Trim(); |
| | | { |
| | | var name = logicTextBox.Text.Trim(); |
| | | |
| | | if (string.IsNullOrEmpty(logicTextBox.Text.Trim())) |
| | | { |
| | | new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show(); |
| | | return; |
| | | } |
| | | var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name); |
| | | if (logicname != null) |
| | | { |
| | | new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(logicTextBox.Text.Trim())) |
| | | { |
| | | new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show(); |
| | | return; |
| | | } |
| | | var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name); |
| | | if (logicname != null) |
| | | { |
| | | new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show(); |
| | | return; |
| | | } |
| | | |
| | | Common.Logic.CurrentLogic.LogicName = name; |
| | | Common.Logic.CurrentLogic.LogicName = name; |
| | | |
| | | //判断是新添加逻辑(默认0)还是修改逻辑 |
| | | CommonPage.Loading.Start(); |
| | | if (Common.Logic.CurrentLogic.LogicId == 0) |
| | | { |
| | | //发送添加逻辑命令 |
| | | var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic); |
| | | if (logicifon != null && logicifon.LogicId != 0) |
| | | { |
| | | Common.Logic.CurrentLogic.LogicId = logicifon.LogicId; |
| | | Common.Logic.LogicList.Add(Common.Logic.CurrentLogic); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //发送修改逻辑命令 |
| | | Send.AddModifyLogic(Common.Logic.CurrentLogic); |
| | | } |
| | | //判断是新添加逻辑(默认0)还是修改逻辑 |
| | | CommonPage.Loading.Start(); |
| | | if (Common.Logic.CurrentLogic.LogicId == 0) |
| | | { |
| | | //发送添加逻辑命令 |
| | | var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic); |
| | | if (logicifon != null && logicifon.LogicId != 0) |
| | | { |
| | | Common.Logic.CurrentLogic.LogicId = logicifon.LogicId; |
| | | Common.Logic.LogicList.Add(Common.Logic.CurrentLogic); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //发送修改逻辑命令 |
| | | Send.AddModifyLogic(Common.Logic.CurrentLogic); |
| | | } |
| | | |
| | | CommonPage.Loading.Hide(); |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic"); |
| | | Category.Category.instance?.RefreshBodyView(); |
| | | //UserView.HomePage.Instance.RemoveAt("Logic1"); |
| | | //Category.Category category = new Category.Category(); |
| | | //UserView.HomePage.Instance.AddChidren(category); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //category.Show(2); |
| | | }; |
| | | CommonPage.Loading.Hide(); |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic"); |
| | | Category.Category.instance?.RefreshBodyView(); |
| | | //UserView.HomePage.Instance.RemoveAt("Logic1"); |
| | | //Category.Category category = new Category.Category(); |
| | | //UserView.HomePage.Instance.AddChidren(category); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //category.Show(2); |
| | | }; |
| | | |
| | | |
| | | } |
| | |
| | | if (dictionary.Count != 0 && dictionary.Count == 1) |
| | | { |
| | | string len = "", leng = ""; |
| | | int minvalue = 0,Maximum=0; |
| | | int minvalue = 0, Maximum = 0; |
| | | foreach (var value in dictionary) |
| | | { |
| | | ///取出月份 |
| | |
| | | { |
| | | leng = month.ToString(); |
| | | } |
| | | if (minvalue==Maximum) |
| | | if (minvalue == Maximum) |
| | | { |
| | | btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()); |
| | | } |
| | | else |
| | | { |
| | | btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString():Maximum.ToString()); |
| | | btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString()); |
| | | } |
| | | } |
| | | |
| | |
| | | foreach (var value in dictionary) |
| | | { |
| | | string len = "", leng = ""; |
| | | int minvalue = 0,Maximum=0; |
| | | int minvalue = 0, Maximum = 0; |
| | | ///取出月份 |
| | | var month = value.Key; |
| | | ///取出日数 |
| | |
| | | { |
| | | len += str.Substring(j, 1); |
| | | } |
| | | |
| | | |
| | | |
| | | if (month.ToString().Length < 2) |
| | | { |
| | |
| | | Maximum = j + 1; |
| | | } |
| | | } |
| | | stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" +Maximum.ToString() :Maximum.ToString()); |
| | | stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString()); |
| | | |
| | | } |
| | | b++; |
| | |
| | | |
| | | var frameLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(1920 - 720), |
| | | Height = Application.GetRealHeight(720), |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor, |
| | | Y = Application.GetRealHeight(1920 - 680 - 50), |
| | | Height = Application.GetRealHeight(680), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | Width = Application.GetRealWidth(1000), |
| | | X = Application.GetRealWidth(40), |
| | | Radius = (uint)Application.GetRealHeight(40), |
| | | }; |
| | | flMain.AddChidren(frameLayout); |
| | | |
| | | var titlerow = new RowLayout |
| | | var titlerow = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(150), |
| | | }; |
| | | frameLayout.AddChidren(titlerow); |
| | | |
| | | var titlebtn = new Button |
| | | { |
| | | //Text = "请选择多条件组合", |
| | | //TextID = MyInternationalizationString.Multicondition, |
| | | TextID = MyInternationalizationString.multicondition, |
| | | TextSize = 16, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | |
| | | var androw = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(160), |
| | | Y = titlerow.Bottom, |
| | | }; |
| | | frameLayout.AddChidren(androw); |
| | |
| | | Width = Application.GetRealWidth(600), |
| | | TextID = MyInternationalizationString.Allconditions, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | //Text = "满足全部条件时", |
| | | //Text = "满足全部条件时", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealHeight(50), |
| | | }; |
| | | androw.AddChidren(andbtn); |
| | | |
| | | var orrow = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealHeight(160), |
| | | Y = androw.Bottom, |
| | | }; |
| | | frameLayout.AddChidren(orrow); |
| | |
| | | TextID = MyInternationalizationString.anycondition, |
| | | //Text = "满足任一条件时", |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | X = Application.GetRealHeight(50) |
| | | }; |
| | | orrow.AddChidren(orbtn); |
| | | |
| | |
| | | { |
| | | TextID = MyInternationalizationString.cancel, |
| | | TextSize = 16, |
| | | Y = orrow.Bottom, |
| | | Height = Application.GetRealHeight(180), |
| | | Y = orrow.Bottom + Application.GetRealHeight(30), |
| | | Height = Application.GetRealHeight(160), |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor, |
| | | }; |
| | | frameLayout.AddChidren(cancelbtn); |
| | | cancelbtn.MouseUpEventHandler += (sender4, e4) => |
| | |
| | | addLogicPage.Show(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |