| | |
| | | /// </summary> |
| | | public void GetCityWeatherInfo(string lon, string lat) |
| | | { |
| | | if (lon == "0" || lat == "0") |
| | | return; |
| | | MainPage.cityInfo.lon = lon; |
| | | MainPage.cityInfo.lat = lat; |
| | | |
| | |
| | | public string packageUrl;//": "http://hdl-hz-test.oss-cn-hangzhou.aliyuncs.com/20/2022/11/51b8b0b2-0ebc-4632-a3b5-0be1e5d104e4.apk", |
| | | public string remark; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AppVersionRes |
| | | { |
| | | /// <summary> |
| | | /// 应用市场名称 |
| | | /// </summary> |
| | | public string appMarket; |
| | | /// <summary> |
| | | /// app名称 |
| | | /// </summary> |
| | | public string appName; |
| | | /// <summary> |
| | | /// ios下载地址 |
| | | /// </summary> |
| | | public string iosUrl; |
| | | /// <summary> |
| | | /// 安卓下载地址 |
| | | /// </summary> |
| | | public string androidUrl; |
| | | /// <summary> |
| | | /// 是否是强制更新 |
| | | /// </summary> |
| | | public bool isEnforce; |
| | | /// <summary> |
| | | /// 发布系统,IOS、Android |
| | | /// </summary> |
| | | public string releaseSystem; |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | public string remark; |
| | | /// <summary> |
| | | /// 更新说明json,多语言有客户端解析 |
| | | /// </summary> |
| | | public string updateDescription; |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public string version; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新说明json,多语言有客户端解析 |
| | | /// </summary> |
| | |
| | | new FunctionAttributes() { key = "mode",value =new List<string>(){ "day", "night", "away", "normal", "timer" }, curValue="day",state = "day" }, |
| | | new FunctionAttributes() { key = "set_temp",value =new List<string>(){ "" }, curValue="26",state = "26" ,max = 35,min = 5 }, |
| | | new FunctionAttributes() { key = "room_temp",value =new List<string>(){ "" }, curValue="26",state = "26" }, |
| | | new FunctionAttributes() { key = "temperature_type", value = new List<string>() { "°F", "°C" }, curValue = "°F", state = "°F" }, |
| | | }, |
| | | }; |
| | | fh.SaveFunctionFile(); |
| | |
| | | new FunctionAttributes() { key = "set_temp",step = "0.5", value = new List<string>() { "16", "30"}, curValue = "16", state = "16",max = 30,min = 16 }, |
| | | new FunctionAttributes() { key = "room_temp", value = new List<string>() { }, curValue = "20", state = "20" }, |
| | | new FunctionAttributes() { key = "swing", value = new List<string>() {"up_down", "left_right", "stop" }, curValue = "20", state = "20" }, |
| | | new FunctionAttributes() { key = "temperature_type", value = new List<string>() { "°F", "°C" }, curValue = "°F", state = "°F" }, |
| | | } |
| | | }; |
| | | ac2.SaveFunctionFile(); |
| | |
| | | /// </summary> |
| | | void OpenUrl() |
| | | { |
| | | if (!string.IsNullOrEmpty(newAppVersion)) |
| | | if (!string.IsNullOrEmpty(newAppVersion)&& newAppVersion.Contains("http")) |
| | | { |
| | | HDLUtils.OpenUrl(newAppVersionUrl); |
| | | } |
| | |
| | | var newVersion = versionResult.version; |
| | | if (newVersion.CompareTo(MainPage.VersionString) > 0) |
| | | { |
| | | newAppVersionUrl = versionResult.androidUrl; |
| | | newAppVersionUrl = versionResult.packageUrl; |
| | | return newVersion; |
| | | } |
| | | return ""; |
| | |
| | | /// 检测新版本 |
| | | /// </summary> |
| | | /// <returns>The https app version async.</returns> |
| | | private AppVersionRes CheckAppVersion() |
| | | private AppVersionResNew CheckAppVersion() |
| | | { |
| | | try |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionRes>(result.Data.ToString()); |
| | | var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<AppVersionResNew>(result.Data.ToString()); |
| | | return responeData; |
| | | } |
| | | return null; |
| | |
| | | var temp = (int)Convert.ToDouble(setTempTemp); |
| | | if (temp <= 0) |
| | | { |
| | | //默认值改成16,2022年06月10日10:03:19 成甫要求的 |
| | | //默认值改成16 |
| | | temp = 16; |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | } |
| | |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "°C", |
| | | Text = acFunction.GetTempUnitString(device), |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnTempUint); |
| | | |
| | |
| | | Y = btnTemp.Bottom, |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(30), |
| | | Text = Language.StringByID(StringId.Indoor) + " 20°C", |
| | | Text = Language.StringByID(StringId.Indoor) + " 20" + acFunction.GetTempUnitString(device), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.TopCenter, |
| | |
| | | { |
| | | //device = FunctionList.List.Functions.Find((obj) => obj.sid == device.sid); |
| | | |
| | | btnIndoorTemp.Text = Language.StringByID(StringId.Indoor) + " " + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; |
| | | btnIndoorTemp.Text = Language.StringByID(StringId.Indoor) + " " |
| | | + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) |
| | | + acFunction.GetTempUnitString(device); |
| | | btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); |
| | | btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing)); |
| | | btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); |
| | |
| | | Text = "°C", |
| | | }; |
| | | controlView.AddChidren(btnTempUint); |
| | | if (function.GetAttribute(FunctionAttributeKey.TempType) != null) |
| | | { |
| | | btnTempUint.Text = function.GetAttrState(FunctionAttributeKey.TempType); |
| | | } |
| | | |
| | | btnIndoorTemp = new Button() |
| | | { |