| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202210281"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202211041"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
| | | <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> |
| | | <!-- 定位权限--> |
| | | <!-- 定位权限 --> |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| | | <!-- 拍照权限 --> |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", |
| | | X = Application.GetRealWidth(337-37), |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetMinRealAverage(28+37), |
| | | Height = Application.GetMinRealAverage(28+19), |
| | | Text = "组合调光", |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | IsMoreLines = true |
| | | //UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", |
| | | }; |
| | | |
| | | contentView.AddChidren(btnSetting); |
| | |
| | | etAccount.Text = "tf@smarttech.com.ua"; |
| | | etAccount.Text = "13288623489"; |
| | | etAccount.Text = "455740454@qq.com"; |
| | | etAccount.Text = "13799777637"; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | | if(etAccount.Text == "455740454@qq.com") |
| | | if(etAccount.Text == "13799777637") |
| | | { |
| | | etPassword.Text = "a123456"; |
| | | etPassword.Text = "xiamen1990"; |
| | | } |
| | | //etPassword.Text = "Hdl85521566"; |
| | | btnLogin.IsSelected = true; |
| | |
| | | }; |
| | | FunctionList.List.Functions.Add(lightRgbw1); |
| | | |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统总控", |
| | | // spk = SPK.AcstParent, |
| | | // collect = true, |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.mode.ToString(),curValue = AcstParent_Attr_ModeValueEnum.cool.ToString(),state = AcstParent_Attr_ModeValueEnum.cool.ToString(), |
| | | // value = new List<string> |
| | | // { |
| | | // AcstParent_Attr_ModeValueEnum.cool.ToString(), |
| | | // AcstParent_Attr_ModeValueEnum.dry.ToString(), |
| | | // AcstParent_Attr_ModeValueEnum.fan.ToString(), |
| | | // AcstParent_Attr_ModeValueEnum.heat.ToString(), |
| | | // AcstParent_Attr_ModeValueEnum.humidity.ToString(), |
| | | // AcstParent_Attr_ModeValueEnum.heat_humidity.ToString(), |
| | | // } |
| | | // }, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.scene.ToString(), curValue = AcstParent_Attr_SceneValueEnum.at_home.ToString(), state = AcstParent_Attr_SceneValueEnum.at_home.ToString(), |
| | | // value = new List<string>() |
| | | // { |
| | | // AcstParent_Attr_SceneValueEnum.at_home.ToString(), |
| | | // AcstParent_Attr_SceneValueEnum.leave_home.ToString(), |
| | | // AcstParent_Attr_SceneValueEnum.sleep.ToString(), |
| | | // } |
| | | // }, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.day_electricity.ToString(),curValue = "99",state = "99"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.month_electricity.ToString(),curValue = "999",state = "999"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.total_electricity.ToString(),curValue = "9999",state = "9999"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.active_power.ToString(),curValue = "9999",state = "9999"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.co2.ToString(),curValue = "266",state = "266"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.tvoc.ToString(),curValue = "666",state = "666"}, |
| | | // new FunctionAttributes(){ key = AcstParent_AttrEnum.pm25.ToString(),curValue = "36",state = "36"}, |
| | | //} |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统总控", |
| | | spk = SPK.AcstParent, |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.mode.ToString(),curValue = AcstParent_Attr_ModeValueEnum.cool.ToString(),state = AcstParent_Attr_ModeValueEnum.cool.ToString(), |
| | | value = new List<string> |
| | | { |
| | | AcstParent_Attr_ModeValueEnum.cool.ToString(), |
| | | AcstParent_Attr_ModeValueEnum.dry.ToString(), |
| | | AcstParent_Attr_ModeValueEnum.fan.ToString(), |
| | | AcstParent_Attr_ModeValueEnum.heat.ToString(), |
| | | AcstParent_Attr_ModeValueEnum.humidity.ToString(), |
| | | AcstParent_Attr_ModeValueEnum.heat_humidity.ToString(), |
| | | } |
| | | }, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.scene.ToString(), curValue = AcstParent_Attr_SceneValueEnum.at_home.ToString(), state = AcstParent_Attr_SceneValueEnum.at_home.ToString(), |
| | | value = new List<string>() |
| | | { |
| | | AcstParent_Attr_SceneValueEnum.at_home.ToString(), |
| | | AcstParent_Attr_SceneValueEnum.leave_home.ToString(), |
| | | AcstParent_Attr_SceneValueEnum.sleep.ToString(), |
| | | } |
| | | }, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.day_electricity.ToString(),curValue = "99",state = "99"}, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.month_electricity.ToString(),curValue = "999",state = "999"}, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.total_electricity.ToString(),curValue = "9999",state = "9999"}, |
| | | new FunctionAttributes(){ key = AcstParent_AttrEnum.active_power.ToString(),curValue = "9999",state = "9999"}, |
| | | //new FunctionAttributes(){ key = AcstParent_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | //new FunctionAttributes(){ key = AcstParent_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //new FunctionAttributes(){ key = AcstParent_AttrEnum.co2.ToString(),curValue = "266",state = "266"}, |
| | | //new FunctionAttributes(){ key = AcstParent_AttrEnum.tvoc.ToString(),curValue = "666",state = "666"}, |
| | | //new FunctionAttributes(){ key = AcstParent_AttrEnum.pm25.ToString(),curValue = "36",state = "36"}, |
| | | } |
| | | }); |
| | | |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统子控-1", |
| | | // spk = SPK.AcstSub, |
| | | // sid = "0000001", |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //} |
| | | //}); |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统子控-2", |
| | | // spk = SPK.AcstSub, |
| | | // sid = "0000002", |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //} |
| | | //}); |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统子控-3", |
| | | // spk = SPK.AcstSub, |
| | | // sid = "0000003", |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //} |
| | | //}); |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统子控-4", |
| | | // spk = SPK.AcstSub, |
| | | // sid = "0000004", |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //} |
| | | //}); |
| | | //FunctionList.List.Functions.Add(new Function |
| | | //{ |
| | | // name = "测试-空调科技系统子控-5", |
| | | // spk = SPK.AcstSub, |
| | | // sid = "0000005", |
| | | // attributes = new List<FunctionAttributes>() |
| | | //{ |
| | | // new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | // new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | //} |
| | | //}); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统子控-1", |
| | | spk = SPK.AcstSub, |
| | | sid = "0000001", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | } |
| | | }); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统子控-2", |
| | | spk = SPK.AcstSub, |
| | | sid = "0000002", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | } |
| | | }); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统子控-3", |
| | | spk = SPK.AcstSub, |
| | | sid = "0000003", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | } |
| | | }); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统子控-4", |
| | | spk = SPK.AcstSub, |
| | | sid = "0000004", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | } |
| | | }); |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统子控-5", |
| | | spk = SPK.AcstSub, |
| | | sid = "0000005", |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.set_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, |
| | | new FunctionAttributes(){ key = AcstSub_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | |
| | | ShowFunctionRow(functionList); |
| | | |
| | | LoadDialog_ChangeFloor(); |
| | | |
| | | |
| | | #region 加载组合调光场景 |
| | | if (titleId == StringId.Lights) |
| | | { |
| | | foreach (var lightScene in FunctionList.List.scenes) |
| | | { |
| | | if (lightScene.sceneType == SceneType.LightScene) |
| | | if (lightScene != null) |
| | | { |
| | | functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) }); |
| | | var sceneRow = new SceneControlZone(lightScene); |
| | | functionListView.AddChidren(sceneRow); |
| | | sceneRow.LoadView(); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | foreach (var scene in listScene) |
| | | { |
| | | if(scene.sceneType == SceneType.LightScene) |
| | | { |
| | | continue; |
| | | } |
| | | System.Threading.Thread.Sleep(10); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | }); |
| | | var sendString = scanString.Replace("source://bind/", ""); |
| | | MainPage.Log($"绑定source屏:{sendString}"); |
| | | //绑定source屏 |
| | | var pack = new HttpServerRequest().BindSourcePanel(sendString); |
| | | //绑定source屏 |
| | | var pack = new HttpServerRequest().BindSourcePanel(sendString); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var title = Language.StringByID(StringId.Tip); |
| | |
| | | { |
| | | Width = Application.GetRealWidth(100 * energyCount), |
| | | Gravity = Gravity.Center, |
| | | Visible = false, |
| | | Visible = sensorCount == 0 |
| | | }; |
| | | if (energyCount > 0) |
| | | { |
| | |
| | | { |
| | | text = "Power"; |
| | | } |
| | | |
| | | sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state, "KW", text, 100); |
| | | } |
| | | if (dayObj != null) |
| | |
| | | { |
| | | text = "Power of today"; |
| | | } |
| | | sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state, "KW", text, 100); |
| | | sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state, "KWh", text, 100); |
| | | } |
| | | if (monthObj != null) |
| | | { |
| | |
| | | bottomView.AddChidren(btnModeControl); |
| | | btnModeControl.MouseUpEventHandler = (sender3, e3) => |
| | | { |
| | | if(function.trait_on_off.state == "off") |
| | | { |
| | | return; |
| | | } |
| | | //if(function.trait_on_off.state == "off") |
| | | //{ |
| | | // return; |
| | | //} |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var dialogView = new FrameLayout(); |
| | |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(100), |
| | | TextID = StringId.SelectScene, |
| | | TextID = StringId.SelectMode, |
| | | TextSize = 16, |
| | | TextColor = CSS.CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | |
| | | heatView.AddChidren(heatIconButton); |
| | | #endregion |
| | | } |
| | | if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.humidity.ToString())) |
| | | { |
| | | |
| | | #region 除湿 |
| | | var dehumiView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(2), |
| | | Width = Application.GetRealWidth(144), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | dialogContentView.AddChidren(dehumiView); |
| | | dehumiView.AddChidren(new Button |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = 1, |
| | | BackgroundColor = CSS.CSS_Color.DividingLineColor, |
| | | }); |
| | | IconButton dehumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeDeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon.png", |
| | | Language.StringByID(StringId.Humidity), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.dry.ToString()); |
| | | dehumiIconButton.Click(() => |
| | | { |
| | | btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon2.png"; |
| | | dialog.Close(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("mode", AcstParent_Attr_ModeValueEnum.dry.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }); |
| | | dehumiView.AddChidren(dehumiIconButton); |
| | | #endregion |
| | | } |
| | | |
| | | if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.fan.ToString())) |
| | | { |
| | |
| | | #endregion |
| | | } |
| | | |
| | | if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.dry.ToString())) |
| | | { |
| | | #region 除湿 |
| | | var dehumiView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(2), |
| | | Width = Application.GetRealWidth(144), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | dialogContentView.AddChidren(dehumiView); |
| | | dehumiView.AddChidren(new Button |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = 1, |
| | | BackgroundColor = CSS.CSS_Color.DividingLineColor, |
| | | }); |
| | | IconButton dehumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeDeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon.png", |
| | | Language.StringByID(StringId.Dry), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.dry.ToString()); |
| | | dehumiIconButton.Click(() => |
| | | { |
| | | btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeDeHumiIcon2.png"; |
| | | dialog.Close(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add("mode", AcstParent_Attr_ModeValueEnum.dry.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }); |
| | | dehumiView.AddChidren(dehumiIconButton); |
| | | #endregion |
| | | } |
| | | if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.heat_humidity.ToString())) |
| | | { |
| | | |
| | |
| | | |
| | | if (function.GetAttribute(AcstParent_AttrEnum.mode.ToString()).value.Contains(AcstParent_Attr_ModeValueEnum.humidity.ToString())) |
| | | { |
| | | |
| | | #region 加湿 |
| | | var humiView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | btnWorkSceneControl.MouseUpEventHandler = (sender2, e2) => |
| | | { |
| | | if (function.trait_on_off.state == "off") |
| | | { |
| | | return; |
| | | } |
| | | //if (function.trait_on_off.state == "off") |
| | | //{ |
| | | // return; |
| | | //} |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var dialogView = new FrameLayout(); |
| | |
| | | Text = text, |
| | | }; |
| | | contentView.AddChidren(btnText); |
| | | |
| | | |
| | | if (btnValue.Text.Length > 7) |
| | | { |
| | | btnValue.TextSize = 16; |
| | | } |
| | | else if (btnValue.Text.Length > 9) |
| | | { |
| | | btnValue.TextSize = 12; |
| | | } |
| | | |
| | | } |
| | | |
| | | public void UpdateValue(string value) |
| | | { |
| | | if (value.Contains(".")) |
| | | { |
| | | value = value.Remove(value.IndexOf('.'), value.Length - value.IndexOf('.')); |
| | | } |
| | | if (btnValue.Text.Length > 8) |
| | | { |
| | | btnValue.TextSize = 16; |
| | | }else if (btnValue.Text.Length > 10) |
| | | { |
| | | btnValue.TextSize = 12; |
| | | } |
| | | btnValue.Text = value + unitString; |
| | | } |
| | | } |
| | |
| | | string curQueryType = "hour"; |
| | | string queryTime; |
| | | Function function; |
| | | public AcstSubHistoryPage(Function temp) |
| | | string colorString; |
| | | public AcstSubHistoryPage(Function temp,string colorStr) |
| | | { |
| | | function = temp; |
| | | bodyView = this; |
| | | colorString = colorStr; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | Y = Application.GetRealHeight(222), |
| | | Height = Application.GetRealHeight(34), |
| | | Text = "最近24小时的平均室内温度", |
| | | TextID = StringId.Temp, |
| | | TextSize = 10, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | { |
| | | Y = Application.GetRealHeight(222), |
| | | Height = Application.GetRealHeight(34), |
| | | Text = "最近24小时的平均室内湿度", |
| | | TextID = StringId.Humidity, |
| | | TextSize = 10, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | } |
| | | tempEchartOption.InitXdataText(vs); |
| | | } |
| | | tempEchartOption.InitYdataText("", revertData, "#FF80AEFF"); |
| | | tempEchartOption.InitYdataTextLinearGradient("(°C)", revertData, colorString); |
| | | |
| | | tempEchartOption.xTitle = Language.StringByID(StringId.timeMode); |
| | | var opString = tempEchartOption.InitOption(); |
| | |
| | | } |
| | | humiEchartsOption.InitXdataText(vs); |
| | | } |
| | | humiEchartsOption.InitYdataText("", revertData, "#FF80AEFF"); |
| | | humiEchartsOption.InitYdataTextLinearGradient("(%)", revertData, colorString); |
| | | } |
| | | } |
| | | humiEchartsOption.xTitle = Language.StringByID(StringId.timeMode); |
| | |
| | | Function function; |
| | | |
| | | uint curColor; |
| | | string colorString; |
| | | |
| | | string imageFolder = "blue"; |
| | | |
| | |
| | | { |
| | | bodyView.btnPowerControl.IsSelected = true; |
| | | bodyView.tempBar.ProgressBarColor = bodyView.curColor; |
| | | bodyView.tempBar.IsOffline = false; |
| | | //bodyView.tempBar.IsClickable = function.trait_on_off.curValue.ToString() == "off", |
| | | //bodyView.tempBar.IsOffline = false; |
| | | |
| | | } |
| | | else |
| | | { |
| | | bodyView.btnPowerControl.IsSelected = false; |
| | | bodyView.tempBar.ProgressBarColor = CSS_Color.DividingLineColor; |
| | | bodyView.tempBar.IsOffline = true; |
| | | //bodyView.tempBar.IsOffline = true; |
| | | } |
| | | }); |
| | | |
| | |
| | | switch (imageFolder) |
| | | { |
| | | case "blue": |
| | | curColor = CSS.CSS_Color.MainColor; |
| | | curColor = CSS_Color.MainColor; |
| | | colorString = "#4484F4"; |
| | | break; |
| | | case "orange": |
| | | curColor = 0xFFFFB848; |
| | | colorString = "#FFB848"; |
| | | break; |
| | | case "purple": |
| | | curColor = 0xFF9175F3; |
| | | colorString = "#9175F3"; |
| | | break; |
| | | } |
| | | bodyView = this; |
| | |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | var page = new AcstSubHistoryPage(function); |
| | | var page = new AcstSubHistoryPage(function, colorString); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | |
| | | btnSetTempValues = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | X = Application.GetRealWidth((375 - 77 -30)/2), |
| | | Y = Application.GetRealHeight(260), |
| | | Width = Application.GetRealWidth(77), |
| | | Height = Application.GetRealHeight(90), |
| | |
| | | SeekBarPadding = Application.GetRealWidth(20), |
| | | IsProgressTextShow = false, |
| | | ProgressChangeDelayTime = 0, |
| | | //IsClickable = function.trait_on_off.curValue.ToString() == "off", |
| | | //Enable = function.trait_on_off.curValue.ToString() == "off", |
| | | //IsOffline = function.trait_on_off.curValue.ToString() == "off", |
| | | //IsOffline = true,// function.trait_on_off.curValue.ToString() == "off", |
| | | }; |
| | | contentView.AddChidren(tempBar); |
| | | tempBar.OnProgressChangedEvent = (sender, e) => { |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | contentView.AddChidren(btnMaxValuesText); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | public string InitYdataText(string name, List<EnvironmentalSensorHistor> yData, string color) |
| | | { |
| | | //组装Value |
| | | yTitle = name; |
| | | string valueText = string.Empty; |
| | | var YvalueTextItem = @"{name:'{0}', |
| | | data:[{1}], |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 组装y轴文本 |
| | | /// </summary> |
| | | /// <param name="yData"></param> |
| | | public string InitYdataTextLinearGradient(string name, List<EnvironmentalSensorHistor> yData, string color) |
| | | { |
| | | //组装Value |
| | | yTitle = name; |
| | | string valueText = string.Empty; |
| | | //string rColor = color.Substring(1, 2); |
| | | //string gColor = color.Substring(3, 2); |
| | | //string bColor = color.Substring(5, 2); |
| | | var YvalueTextItem = @"{name:'{0}', |
| | | data:[{1}], |
| | | type:'line', |
| | | smooth:0.6, |
| | | symbol:'none', |
| | | color:'{2}CC', |
| | | areaStyle: { |
| | | opacity: 0.8, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { |
| | | offset: 0, |
| | | color: '{2}AA' |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: '{2}66' |
| | | } |
| | | ]) |
| | | },} |
| | | "; |
| | | YvalueTextItem = YvalueTextItem.Replace("{0}", name); |
| | | |
| | | foreach (var data in yData) |
| | | { |
| | | valueText += "'" + data.fieldValue + "',"; |
| | | } |
| | | YvalueTextItem = YvalueTextItem.Replace("{1}", valueText); |
| | | YvalueTextItem = YvalueTextItem.Replace("{2}", color); |
| | | //YvalueTextItem = YvalueTextItem.Replace("{111}", rColor); |
| | | //YvalueTextItem = YvalueTextItem.Replace("{222}", gColor); |
| | | //YvalueTextItem = YvalueTextItem.Replace("{333}", bColor); |
| | | |
| | | if (YvalueText == "") |
| | | { |
| | | YvalueText = YvalueTextItem; |
| | | } |
| | | else |
| | | { |
| | | YvalueText += "," + YvalueTextItem; |
| | | } |
| | | |
| | | return YvalueTextItem; |
| | | } |
| | | |
| | | |
| | | #if __IOS__ |
| | | public string optionString = @"{ |
| | | tooltip: { |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.Complete |
| | | Text = "执行" |
| | | }; |
| | | bottomView.AddChidren(btnComplete); |
| | | |
| | |
| | | |
| | | |
| | | btnComplete.MouseUpEventHandler = (sender, e) => { |
| | | this.Close(); |
| | | //this.Close(); |
| | | |
| | | var waitPage = new Loading(); |
| | | MainPage.BaseView.AddChidren(waitPage); |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | new PublicAssmebly().TipMsgAutoClose("组合控制已执行", true); |
| | | if (waitPage != null) |
| | | { |
| | | backAction(null); |
| | | //backAction(null); |
| | | waitPage.RemoveFromParent(); |
| | | } |
| | | }); |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |