| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.5.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409051"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.6.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409101"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,我的文件等--> |
| | |
| | | AppDomain.CurrentDomain.UnhandledException += (sender, e) => { |
| | | if(e.ExceptionObject is Exception exception) |
| | | { |
| | | MainPage.Log("error","未处理的异常:" + exception.Message); |
| | | MainPage.Log("error", "未处理的异常:" + exception.Message + "\r\nStackTrace: " + exception.StackTrace); |
| | | } |
| | | }; |
| | | |
| | | TaskScheduler.UnobservedTaskException += (sender, e) => { |
| | | if (e.Exception is Exception exception) |
| | | { |
| | | MainPage.Log("error", "未处理的异常:" + exception.Message); |
| | | MainPage.Log("error", "未处理的异常:" + exception.Message + "\r\nStackTrace: " + exception.StackTrace); |
| | | } |
| | | }; |
| | | #endregion |
| | |
| | | <key>CFBundleName</key> |
| | | <string>On Pro</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>2.5.0</string> |
| | | <string>2.6.0</string> |
| | | <key>CFBundleURLTypes</key> |
| | | <array> |
| | | <dict> |
| | |
| | | </dict> |
| | | </array> |
| | | <key>CFBundleVersion</key> |
| | | <string>2.5.0</string> |
| | | <string>2.6.0</string> |
| | | <key>LSApplicationQueriesSchemes</key> |
| | | <array> |
| | | <string>weixinULAPI</string> |
| | |
| | | AcstParentPage.UpdateAcstSubInfo(localFunction); |
| | | WaterHeaterJinmaoPage.UpdateStatus(); |
| | | break; |
| | | case SPK.InverterJinmao: |
| | | InverterJinmaoPage.UpdateStatus(localFunction); |
| | | break; |
| | | case SPK.AirSwitch: |
| | | AirSwitchPage.UpdataState(localFunction); |
| | | if (localFunction.GetAttribute(FunctionAttributeKey.Power) != null)//如果是带电量的空开也要更新能源界面 |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string APP_KEY = "HDL-HOME-APP"; |
| | | public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string APP_KEY = "HDL-HOME-APP"; |
| | | //public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; |
| | | |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | //public const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | | //const string APP_KEY = "CPEVRLRT"; |
| | |
| | | /// 设备spk |
| | | /// </summary> |
| | | public string spk = ""; |
| | | /// <summary> |
| | | /// 扩展信息 |
| | | /// 字符串 |
| | | /// </summary> |
| | | public string extend = ""; |
| | | |
| | | private string _SpkCategory = string.Empty; |
| | | /// <summary> |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"功能数据初始化失败:{ex.Message}"); |
| | | MainPage.Log("Error",$"功能数据初始化失败:{ex.StackTrace}"); |
| | | } |
| | | } |
| | | return rooms; |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "2.5.0"; |
| | | public static string VersionString = "2.6.0"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); |
| | | _RoomNotSupportFunctionList.Add(SPK.OtherCommon); |
| | | _RoomNotSupportFunctionList.Add(SPK.SensorLight); |
| | | _RoomNotSupportFunctionList.Add(SPK.AcstParent); |
| | | _RoomNotSupportFunctionList.Add(SPK.AcstSub); |
| | | _RoomNotSupportFunctionList.Add(SPK.WaterHeaterJinmao); |
| | | _RoomNotSupportFunctionList.Add(SPK.InverterJinmao); |
| | | _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList()); |
| | | //_RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList()); |
| | | } |
| | |
| | | //etAccount.Text = "18402017839"; |
| | | //etAccount.Text = "18620993214"; |
| | | //etAccount.Text = "13414984501";//吴晓聪 |
| | | |
| | | etAccount.Text = "13580507523"; |
| | | etAccount.Text = "18475593023"; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | etPassword.Text = "hdl1985."; |
| | | } |
| | | else if (etAccount.Text == "13414984501") |
| | | else if (etAccount.Text == "18475593023") |
| | | { |
| | | etPassword.Text = "a123456"; |
| | | } |
| | |
| | | { |
| | | etPassword.Text = "aa123456"; |
| | | } |
| | | else if (etAccount.Text == "dcai.assist@gmail.com") |
| | | else if (etAccount.Text == "13580507523") |
| | | { |
| | | etPassword.Text = "GraniteTileS57"; |
| | | etPassword.Text = "a123456"; |
| | | } |
| | | //etPassword.Text = "Hdl85521566"; |
| | | btnLogin.IsSelected = true; |
| | | }; |
| | | #endif |
| | |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-金茂光伏储能", |
| | | extend = "jinmaot1rue", |
| | | spk = SPK.InverterJinmao, |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity_today.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity_month.ToString(),value = new List<string>(){ "0" },curValue ="200",state = "200"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity.ToString(),value = new List<string>(){ "0" },curValue ="1000",state = "1000"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.coal.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.co2.ToString(),value = new List<string>(){ "0" },curValue ="1000",state = "1000"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.trees.ToString(),value = new List<string>(){ "0" },curValue ="10",state = "10"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.coal.ToString(),value = new List<string>(){ "0" },curValue ="1021210",state = "1021210"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.co2.ToString(),value = new List<string>(){ "0" },curValue ="1031300",state = "1031300"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.trees.ToString(),value = new List<string>(){ "0" },curValue ="121310",state = "121310"}, |
| | | } |
| | | }); |
| | | |
| | |
| | | { |
| | | name = "测试-空调科技系统总控", |
| | | spk = SPK.AcstParent, |
| | | extend = "jinmaotrue", |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.co2.ToString(),curValue = "52",state = "52" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.energy_electricity.ToString(),curValue = "100",state = "100" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.co2.ToString(),curValue = "522222",state = "522222" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.energy_electricity.ToString(),curValue = "144400",state = "144400" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.flow.ToString(),curValue = "2",state = "2" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.mode.ToString(),curValue = "economic",state = "economic" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.mode_free.ToString(),curValue = "true",state = "true" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.recycl_volume.ToString(),curValue = "10",state = "10" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.set_temp.ToString(),curValue = "25",state = "25" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.temp.ToString(),curValue = "23",state = "23" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.trees.ToString(),curValue = "8",state = "8" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.trees.ToString(),curValue = "11228",state = "11228" }, |
| | | new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.volume.ToString(),curValue = "100",state = "100" }, |
| | | |
| | | }, |
| | |
| | | { |
| | | X = Application.GetRealWidth(11), |
| | | Y = Application.GetRealWidth(10), |
| | | TextID = StringId.Acst, |
| | | Text = function.name, |
| | | //TextID = StringId.Acst, |
| | | IsBold = true, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | Height = Application.GetRealHeight(37), |
| | | }; |
| | | view.AddChidren(btnLogo); |
| | | |
| | | try |
| | | { |
| | | if (function.extend.Contains("jinmao") && function.extend.Contains("true")) |
| | | { |
| | | btnLogo.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | btnLogo.Visible = false; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂logo显示处理异常:{ex.Message}"); |
| | | } |
| | | |
| | | Button btnFunctionViewBg; |
| | | btnFunctionViewBg = new Button() |
| | |
| | | } |
| | | else if (function.spk == SPK.InverterJinmao) |
| | | { |
| | | btnName.TextID = StringId.NewEnergy; |
| | | //btnName.TextID = StringId.NewEnergy; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new InverterJinmaoPage(); |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Security.Cryptography; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | |
| | | if (item == ShowFunction.Acst) |
| | | { |
| | | btnName.TextID = StringId.Acst; |
| | | try |
| | | { |
| | | var acstFunction = FunctionList.List.GetAcstParentList()[0]; |
| | | btnName.Text = acstFunction.name; |
| | | if (acstFunction.extend.Contains("jinmao") && acstFunction.extend.Contains("true")) |
| | | { |
| | | btnJMLogo.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | btnJMLogo.Visible = false; |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"加载金茂科技系统主控名称异常:{ex.Message}"); |
| | | } |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstParentPage(); |
| | |
| | | else if (item == ShowFunction.InverterJinmao) |
| | | { |
| | | btnName.TextID = StringId.NewEnergy; |
| | | try |
| | | { |
| | | var jinmaoInverterFunction = FunctionList.List.GetInverterJinmaoList()[0]; |
| | | btnName.Text = jinmaoInverterFunction.name; |
| | | if (jinmaoInverterFunction.extend.Contains("jinmao") && jinmaoInverterFunction.extend.Contains("true")) |
| | | { |
| | | btnJMLogo.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | btnJMLogo.Visible = false; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"加载金茂储能名称异常:{ex.Message}"); |
| | | } |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new InverterJinmaoPage(); |
| | |
| | | { |
| | | continue; |
| | | } |
| | | #if DEBUG |
| | | //throw new ArgumentNullException(); |
| | | #endif |
| | | |
| | | functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) }); |
| | | |
| | |
| | | { |
| | | X = Application.GetRealWidth(18 + 7), |
| | | Y = Application.GetRealHeight(11), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(40), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = 0xFF1b3053, |
| | |
| | | contentView.AddChidren(btnSetTempValues); |
| | | #if __IOS__ |
| | | bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(5); |
| | | #endif |
| | | |
| | | |
| | |
| | | |
| | | echartOption1 = new EchartsOption_Histogram(); |
| | | echartOption1.xTitle = "时间"; |
| | | echartOption1.yTitle = "电量(kw)"; |
| | | echartOption1.yTitle = "电量(kwh)"; |
| | | //echartOption.InitXdataText(new List<string>() |
| | | //{ |
| | | // "21","22","23","24","25","26","26","27","28","29", |
| | |
| | | |
| | | echartOption2 = new EchartsOption_Histogram(); |
| | | echartOption2.xTitle = "时间"; |
| | | echartOption2.yTitle = "电量(kw)"; |
| | | echartOption2.yTitle = "电量(kwh)"; |
| | | //echartOption2.InitXdataText(new List<string>() |
| | | //{ |
| | | // "21","22","23","24","25","26","26","27","28","29", |
| | |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var ddd = echartOption2.InitOption(); |
| | | infoView2_EchartsView.ShowWithOption(echartOption2.InitOption()); |
| | | }); |
| | | } |
| | |
| | | var pvElecQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1); |
| | | if (queryType1 == QueryType.day_hour) |
| | | { |
| | | if (pvElecQueryDate.Year == 2023 && pvElecQueryDate.Month == 1 && pvElecQueryDate.Day == 1) |
| | | if (pvElecQueryDate.Year <= 2023 && pvElecQueryDate.Month == 1 && pvElecQueryDate.Day == 1) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | else if (queryType1 == QueryType.custom_month) |
| | | { |
| | | if (pvElecQueryDate.Year == 2023 && pvElecQueryDate.Month == 1) |
| | | if (pvElecQueryDate.Year <= 2023 && pvElecQueryDate.Month == 1) |
| | | { |
| | | return; |
| | | } |
| | | pvElecQueryDate = pvElecQueryDate.AddMonths(-1); |
| | | queryTime_Day1 = pvElecQueryDate.Day; |
| | | infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (queryType1 == QueryType.custom_year) |
| | | { |
| | | if (pvElecQueryDate.Year == 2023) |
| | | if (pvElecQueryDate.Year <= 2023) |
| | | { |
| | | return; |
| | | } |
| | |
| | | }; |
| | | infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var tempQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1); |
| | | var pvElecQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1); |
| | | if (queryType1 == QueryType.day_hour) |
| | | { |
| | | if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month && tempQueryDate.Day == DateTime.Now.Day) |
| | | if (pvElecQueryDate.Year == DateTime.Now.Year && pvElecQueryDate.Month == DateTime.Now.Month && pvElecQueryDate.Day == DateTime.Now.Day) |
| | | { |
| | | return; |
| | | } |
| | | tempQueryDate = tempQueryDate.AddDays(1); |
| | | infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM-dd"); |
| | | pvElecQueryDate = pvElecQueryDate.AddDays(1); |
| | | infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM-dd"); |
| | | } |
| | | else if (queryType1 == QueryType.custom_month) |
| | | { |
| | | if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month) |
| | | if (pvElecQueryDate.Year == DateTime.Now.Year && pvElecQueryDate.Month == DateTime.Now.Month) |
| | | { |
| | | return; |
| | | } |
| | | tempQueryDate = tempQueryDate.AddMonths(1); |
| | | infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM"); |
| | | pvElecQueryDate = pvElecQueryDate.AddMonths(1); |
| | | queryTime_Day1 = pvElecQueryDate.Day; |
| | | infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (queryType1 == QueryType.custom_year) |
| | | { |
| | | if (tempQueryDate.Year == 2023) |
| | | if (pvElecQueryDate.Year >= DateTime.Now.Year) |
| | | { |
| | | return; |
| | | } |
| | | if (tempQueryDate.Year == DateTime.Now.Year) |
| | | { |
| | | return; |
| | | pvElecQueryDate = pvElecQueryDate.AddYears(1); |
| | | infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy"); |
| | | } |
| | | tempQueryDate = tempQueryDate.AddYears(1); |
| | | infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy"); |
| | | } |
| | | queryTime_Year1 = tempQueryDate.Year; |
| | | queryTime_Month1 = tempQueryDate.Month; |
| | | queryTime_Day1 = tempQueryDate.Day; |
| | | queryTime_Year1 = pvElecQueryDate.Year; |
| | | queryTime_Month1 = pvElecQueryDate.Month; |
| | | queryTime_Day1 = pvElecQueryDate.Day; |
| | | getPvElectricityHistory(); |
| | | }; |
| | | |
| | |
| | | infoView1_Date_Month.IsSelected = false; |
| | | infoView1_Date_Year.IsSelected = false; |
| | | queryType1 = QueryType.day_hour; |
| | | if (DateTime.Now.Date < new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1)) |
| | | { |
| | | queryTime_Year1 = DateTime.Now.Year; |
| | | queryTime_Month1 = DateTime.Now.Month; |
| | | queryTime_Day1 = DateTime.Now.Day; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM-dd"); |
| | | getPvElectricityHistory(); |
| | | }; |
| | |
| | | infoView1_Date_Month.IsSelected = true; |
| | | infoView1_Date_Year.IsSelected = false; |
| | | queryType1 = QueryType.custom_month; |
| | | if (DateTime.Now.Date < new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1)) |
| | | { |
| | | queryTime_Year1 = DateTime.Now.Year; |
| | | queryTime_Month1 = DateTime.Now.Month; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM"); |
| | | getPvElectricityHistory(); |
| | | }; |
| | |
| | | var waterQueryDate = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2); |
| | | if (queryType2 == QueryType.day_hour) |
| | | { |
| | | if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 1) |
| | | if (waterQueryDate.Year <= 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 1) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | else if (queryType2 == QueryType.custom_month) |
| | | { |
| | | if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1) |
| | | if (waterQueryDate.Year <= 2023 && waterQueryDate.Month == 1) |
| | | { |
| | | return; |
| | | } |
| | | waterQueryDate = waterQueryDate.AddMonths(-1); |
| | | queryTime_Day2 = waterQueryDate.Day; |
| | | infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (queryType2 == QueryType.custom_year) |
| | | { |
| | | if (waterQueryDate.Year == 2023) |
| | | if (waterQueryDate.Year <= 2023) |
| | | { |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | waterQueryDate = waterQueryDate.AddMonths(1); |
| | | queryTime_Day2 = waterQueryDate.Day; |
| | | infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (queryType2 == QueryType.custom_year) |
| | | { |
| | | if (waterQueryDate.Year == 2023) |
| | | { |
| | | return; |
| | | } |
| | | if (waterQueryDate.Year == DateTime.Now.Year) |
| | | if (waterQueryDate.Year >= DateTime.Now.Year) |
| | | { |
| | | return; |
| | | } |
| | |
| | | infoView2_Date_Month.IsSelected = false; |
| | | infoView2_Date_Year.IsSelected = false; |
| | | queryType2 = QueryType.day_hour; |
| | | if (DateTime.Now.Date < new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2)) |
| | | { |
| | | queryTime_Year2 = DateTime.Now.Year; |
| | | queryTime_Month2 = DateTime.Now.Month; |
| | | queryTime_Day2 = DateTime.Now.Day; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM-dd"); |
| | | getLoadElectricityHistory(); |
| | | }; |
| | |
| | | infoView2_Date_Month.IsSelected = true; |
| | | infoView2_Date_Year.IsSelected = false; |
| | | queryType2 = QueryType.custom_month; |
| | | if (DateTime.Now.Date < new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2)) |
| | | { |
| | | queryTime_Year2 = DateTime.Now.Year; |
| | | queryTime_Month2 = DateTime.Now.Month; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM"); |
| | | getLoadElectricityHistory(); |
| | | }; |
| | |
| | | }; |
| | | topView.AddChidren(btnConfrim); |
| | | |
| | | var btnToday = new Button() |
| | | { |
| | | X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Visible = false, |
| | | Enable = false, |
| | | Text = "今日", |
| | | }; |
| | | topView.AddChidren(btnToday); |
| | | |
| | | UIPickerView uIPickerView = new UIPickerView() |
| | | { |
| | | Y = Application.GetRealHeight(40), |
| | |
| | | }; |
| | | uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => |
| | | { |
| | | if (int1 < 0) |
| | | { |
| | | int1 = 1; |
| | | } |
| | | if (pickerItems_Year[int1] != item1.ToString()) |
| | | { |
| | | int.TryParse(pickerItems_Year[int1], out item1); |
| | |
| | | } |
| | | if (pickerItems_Month != null) |
| | | { |
| | | if (int2 > pickerItems_Month.Count) |
| | | if (int2 >= pickerItems_Month.Count || int2 < 0) |
| | | { |
| | | int2 = 0; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString())); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂历史数据控件异常:{ex.Message}"); |
| | | } |
| | | } |
| | | } |
| | | if (pickerItems_Day != null) |
| | | { |
| | | if (int3 >= pickerItems_Day.Count) |
| | | if (int3 >= pickerItems_Day.Count || int3 < 0) |
| | | { |
| | | int3 = 0; |
| | | } |
| | |
| | | { |
| | | queryTime_Month1 = item2; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM"); |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, 1).ToString("yyyy-MM"); |
| | | if (queryType1 == QueryType.day_hour) |
| | | { |
| | | if (item3 != queryTime_Day1) |
| | |
| | | getPvElectricityHistory(); |
| | | }; |
| | | |
| | | |
| | | if (queryType1 == QueryType.day_hour) |
| | | { |
| | | try |
| | | { |
| | | btnToday.Visible = btnToday.Enable = true; |
| | | btnToday.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | pickerItems_Year = new List<string>(); |
| | | pickerItems_Year.Add("2023"); |
| | | while (DateTime.Now.Year > 2022 + pickerItems_Year.Count) |
| | | { |
| | | pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString()); |
| | | } |
| | | |
| | | if (queryType1 == QueryType.custom_month || queryType1 == QueryType.day_hour) |
| | | { |
| | | pickerItems_Month = new List<string>(); |
| | | if (queryTime_Year1 == DateTime.Now.Year) |
| | | { |
| | | int addMonth = 0; |
| | | while (DateTime.Now.Month > addMonth) |
| | | { |
| | | addMonth++; |
| | | pickerItems_Month.Add(addMonth.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i < 13; i++) |
| | | { |
| | | pickerItems_Month.Add(i.ToString()); |
| | | } |
| | | } |
| | | if (queryType1 == QueryType.day_hour) |
| | | { |
| | | pickerItems_Day = new List<string>(); |
| | | if (queryTime_Month1 == DateTime.Now.Month) |
| | | { |
| | | int addDay = 0; |
| | | while (DateTime.Now.Day > addDay) |
| | | { |
| | | addDay++; |
| | | pickerItems_Day.Add(addDay.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year1, queryTime_Month1); i++) |
| | | { |
| | | pickerItems_Day.Add(i.ToString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | item3 = queryTime_Day1 = DateTime.Now.Day; |
| | | item2 = queryTime_Month1 = DateTime.Now.Month; |
| | | item1 = queryTime_Year1 = DateTime.Now.Year; |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year1.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month1.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(queryTime_Day1.ToString())); |
| | | }; |
| | | } |
| | | catch { } |
| | | } |
| | | } |
| | | |
| | | public void SetWaterQureyDateDialog() |
| | |
| | | }; |
| | | uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => |
| | | { |
| | | if (int1 < 0) |
| | | { |
| | | int1 = 0; |
| | | } |
| | | if (pickerItems_Year[int1] != item1.ToString()) |
| | | { |
| | | int.TryParse(pickerItems_Year[int1], out item1); |
| | |
| | | } |
| | | if (pickerItems_Month != null) |
| | | { |
| | | if (int2 > pickerItems_Month.Count) |
| | | if (int2 > pickerItems_Month.Count || int2 < 0) |
| | | { |
| | | int2 = 0; |
| | | } |
| | |
| | | } |
| | | if (pickerItems_Day != null) |
| | | { |
| | | if (int3 >= pickerItems_Day.Count) |
| | | if (int3 >= pickerItems_Day.Count || int3 < 0) |
| | | { |
| | | int3 = 0; |
| | | } |
| | |
| | | { |
| | | queryTime_Month2 = item2; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM"); |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, 1).ToString("yyyy-MM"); |
| | | if (queryType2 == QueryType.day_hour) |
| | | { |
| | | if (item3 != queryTime_Day2) |
| | |
| | | getLoadElectricityHistory(); |
| | | }; |
| | | |
| | | var btnToday = new Button() |
| | | { |
| | | X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Visible = false, |
| | | Enable = false, |
| | | Text = "今日", |
| | | }; |
| | | topView.AddChidren(btnToday); |
| | | |
| | | |
| | | if (queryType2 == QueryType.day_hour) |
| | | { |
| | | try |
| | | { |
| | | btnToday.Visible = btnToday.Enable = true; |
| | | btnToday.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | pickerItems_Year = new List<string>(); |
| | | pickerItems_Year.Add("2023"); |
| | | while (DateTime.Now.Year > 2022 + pickerItems_Year.Count) |
| | | { |
| | | pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString()); |
| | | } |
| | | |
| | | if (queryType2 == QueryType.custom_month || queryType2 == QueryType.day_hour) |
| | | { |
| | | pickerItems_Month = new List<string>(); |
| | | if (queryTime_Year2 == DateTime.Now.Year) |
| | | { |
| | | int addMonth = 0; |
| | | while (DateTime.Now.Month > addMonth) |
| | | { |
| | | addMonth++; |
| | | pickerItems_Month.Add(addMonth.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i < 13; i++) |
| | | { |
| | | pickerItems_Month.Add(i.ToString()); |
| | | } |
| | | } |
| | | if (queryType2 == QueryType.day_hour) |
| | | { |
| | | pickerItems_Day = new List<string>(); |
| | | if (queryTime_Month2 == DateTime.Now.Month) |
| | | { |
| | | int addDay = 0; |
| | | while (DateTime.Now.Day > addDay) |
| | | { |
| | | addDay++; |
| | | pickerItems_Day.Add(addDay.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year2, queryTime_Month2); i++) |
| | | { |
| | | pickerItems_Day.Add(i.ToString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | item3 = queryTime_Day2 = DateTime.Now.Day; |
| | | item2 = queryTime_Month2 = DateTime.Now.Month; |
| | | item1 = queryTime_Year2 = DateTime.Now.Year; |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year2.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month2.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(queryTime_Day2.ToString())); |
| | | }; |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | { |
| | | public class InverterJinmaoPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | static InverterJinmaoPage bodyView; |
| | | Function function; |
| | | /// <summary> |
| | | /// 今日发电量数据按钮 |
| | |
| | | /// <summary> |
| | | /// 光伏运行状态图标按钮 |
| | | /// </summary> |
| | | Button pvRunStatus_IconButtonp; |
| | | Button pvRunStatus_IconButton; |
| | | /// <summary> |
| | | /// 光伏运行状态文本按钮 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 光伏状态今日用电量数据按钮 |
| | | /// </summary> |
| | | Button loadElec_TodayTextButton; |
| | | Button powerUsage_TodayValuesButton; |
| | | /// <summary> |
| | | /// 光伏状态本月用电量数据按钮 |
| | | /// </summary> |
| | |
| | | |
| | | #if __IOS__ |
| | | pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft; |
| | | pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(6); |
| | | pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft; |
| | | pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37); |
| | |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kw", |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right; |
| | | pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right - Application.GetRealWidth(2); |
| | | electricityGenerationView.AddChidren(pvGenerate_todayUintButton); |
| | | |
| | | pvGenerate_TotalValuesButton = new Button() |
| | |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kw", |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | |
| | | }; |
| | | pvEleGenerationInfoView.AddChidren(pvRunStatusInfoView); |
| | | |
| | | pvRunStatus_IconButtonp = new Button() |
| | | pvRunStatus_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png", |
| | | }; |
| | | pvRunStatusInfoView.AddChidren(pvRunStatus_IconButtonp); |
| | | pvRunStatusInfoView.AddChidren(pvRunStatus_IconButton); |
| | | |
| | | pvRunStatus_TextButton = new Button() |
| | | { |
| | |
| | | try |
| | | { |
| | | int index = 1; |
| | | float pvPower = 0.00f; |
| | | while (index < 361) |
| | | { |
| | | if (function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()) == "0") |
| | | float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()), out pvPower); |
| | | if (pvPower > 0.00f) |
| | | { |
| | | continue; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | powerGenerationBg.SetRotation(1f * index++); |
| | |
| | | if (index == 361) |
| | | { |
| | | index = 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Y = Application.GetRealWidth(78), |
| | | //Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = "实时发电功率 (kwh)", |
| | | Text = "实时发电功率 (kw)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "今日发电量 (kw)", |
| | | Text = "今日发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本月发电量 (kw)", |
| | | Text = "本月发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本年发电量 (kw)", |
| | | Text = "本年发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | try |
| | | { |
| | | var revertObj = new HttpServerRequest().GetSensorHistory("custom_year", |
| | | function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString()); |
| | | function.deviceId, InverterJinmao_AttrEnum.pv_electricity.ToString(), DateTime.Now.Year.ToString()); |
| | | if (revertObj != null) |
| | | { |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | |
| | | try |
| | | { |
| | | int index = 1; |
| | | float loadPower = 0.00f; |
| | | while (index < 361) |
| | | { |
| | | if (function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()) == "0") |
| | | float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()), out loadPower); |
| | | if (loadPower > 0.00f) |
| | | { |
| | | continue; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | powerUsageBg.SetRotation(1f * index++); |
| | |
| | | if (index == 361) |
| | | { |
| | | index = 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Y = Application.GetRealWidth(78), |
| | | //Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = "实时用电功率 (kwh)", |
| | | Text = "实时用电功率 (kw)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | powerUsageView.AddChidren(powerUsage_TextButton); |
| | | |
| | | |
| | | var powerUsage_TodayValuesButton = new Button() |
| | | powerUsage_TodayValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(191), |
| | |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton); |
| | | |
| | | loadElec_TodayTextButton = new Button() |
| | | var loadElec_TodayTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "今日用电量 (kw)", |
| | | Text = "今日用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本月用电量 (kw)", |
| | | Text = "本月用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本年用电量 (kw)", |
| | | Text = "本年用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_YearTextButton); |
| | | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var revertObj = new HttpServerRequest().GetSensorHistory("custom_year", |
| | | function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString()); |
| | | if (revertObj != null) |
| | | { |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString()); |
| | | double totalValues = 0.0; |
| | | double values = 0.0; |
| | | foreach (var data in revertData) |
| | | { |
| | | double.TryParse(data.fieldValue, out values); |
| | | totalValues += values; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | powerUsage_YearValuesButton.Text = totalValues.ToString(); |
| | | while (true) |
| | | { |
| | | if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth()) |
| | | { |
| | | powerUsage_YearValuesButton.TextSize--; |
| | | } |
| | | else |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", "读取金茂本年发电量数据异常:" + ex.Message); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8) |
| | |
| | | Y = Application.GetRealWidth(76), |
| | | Height = Application.GetRealWidth(17), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "实时充电功率(kwh)", |
| | | Text = "实时充电功率(kw)", |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | |
| | | esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeTextButton); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info1_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton); |
| | | |
| | | var socialContribution_Info1_TipButton = new Button() |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton); |
| | | |
| | | var socialContribution_Info2_TipButton = new Button() |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton); |
| | | |
| | | var socialContribution_Info3_TipButton = new Button() |
| | |
| | | /// 更新界面数据 |
| | | /// </summary> |
| | | /// <param name="temp"></param> |
| | | public void UpdateStatus(Function temp) |
| | | public static void UpdateStatus(Function temp) |
| | | { |
| | | if (bodyView == null) |
| | | { |
| | |
| | | try |
| | | { |
| | | /// 更新今日发电量 |
| | | upatePvGenerateTodayValues(); |
| | | bodyView.upatePvGenerateTodayValues(); |
| | | /// 更新累计发电量 |
| | | upatePvGenerateTotalValues(); |
| | | bodyView.upatePvGenerateTotalValues(); |
| | | /// 更新今日用电量 |
| | | upatePvLoadTodayValues(); |
| | | bodyView.upatePvLoadTodayValues(); |
| | | /// 更新累计用电量 |
| | | upatePvLoadTotalValues(); |
| | | bodyView.upatePvLoadTotalValues(); |
| | | /// 更新光伏运行状态 |
| | | upatePvRunStatus(); |
| | | bodyView.upatePvRunStatus(); |
| | | /// 更新光伏发电功率 |
| | | updatePvPower(); |
| | | bodyView.updatePvPower(); |
| | | /// 更新光伏本月发电量 |
| | | upatePvGenerateMonthValues(); |
| | | bodyView.upatePvGenerateMonthValues(); |
| | | /// 更新光伏用电功率 |
| | | updateLoadElec(); |
| | | bodyView.updateLoadElec(); |
| | | ///更新光伏状态本月用电量 |
| | | updateLoadElecMonthValues(); |
| | | bodyView.updateLoadElecMonthValues(); |
| | | //更新储能运行状态 |
| | | updateEsRunStates(); |
| | | bodyView.updateEsRunStates(); |
| | | //更新储能电池百分比 |
| | | updateEsBatterySoc(); |
| | | bodyView.updateEsBatterySoc(); |
| | | //更新储能实时充电状态 |
| | | updateEsCharge(); |
| | | bodyView.updateEsCharge(); |
| | | //更新储能实时放电状态 |
| | | updateEsDischarge(); |
| | | updateSocialContribution1(); |
| | | updateSocialContribution2(); |
| | | updateSocialContribution3(); |
| | | bodyView.updateEsDischarge(); |
| | | bodyView.updateSocialContribution1(); |
| | | bodyView.updateSocialContribution2(); |
| | | bodyView.updateSocialContribution3(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂光伏更新异常:{ex.Message}"); |
| | | MainPage.Log("Error", $"金茂光伏更新异常:{ex.StackTrace}"); |
| | | } |
| | | }); |
| | | } |
| | |
| | | /// </summary> |
| | | private void upatePvGenerateTotalValues() |
| | | { |
| | | pvGenerate_TodayValuesButton.Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString()); |
| | | pvGenerate_TotalValuesButton.Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString()); |
| | | } |
| | | /// <summary> |
| | | /// 更新今日用电量 |
| | | /// </summary> |
| | | private void upatePvLoadTodayValues() |
| | | { |
| | | pvLoad_TodayValuesButton.Text = loadElec_TodayTextButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString()); |
| | | pvLoad_TodayValuesButton.Text = powerUsage_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString()); |
| | | } |
| | | /// <summary> |
| | | /// 更新本月用电量 |
| | |
| | | { |
| | | case "run": |
| | | pvRunStatusInfoView.BackgroundColor = 0x154484F4; |
| | | pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png"; |
| | | pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png"; |
| | | pvRunStatus_TextButton.Text = "运行"; |
| | | pvRunStatus_TextButton.TextColor = 0xFF4484F4; |
| | | break; |
| | | case "fault": |
| | | pvRunStatusInfoView.BackgroundColor = 0x15FF4747; |
| | | pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconFault.png"; |
| | | pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconFault.png"; |
| | | pvRunStatus_TextButton.Text = "故障"; |
| | | pvRunStatus_TextButton.TextColor = 0xFFFF4747; |
| | | break; |
| | | case "standby": |
| | | pvRunStatusInfoView.BackgroundColor = 0x15798394; |
| | | pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png"; |
| | | pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png"; |
| | | pvRunStatus_TextButton.Text = "待机"; |
| | | pvRunStatus_TextButton.TextColor = 0xFF798394; |
| | | break; |
| | |
| | | /// </summary> |
| | | private void updateEsRunStates() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null) |
| | | { |
| | | switch (function.GetAttrState(InverterJinmao_AttrEnum.ess_status.ToString())) |
| | | { |
| | | case "charge": |
| | | esStatus_InfoView.BackgroundColor = 0x1500C22D; |
| | | esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D; |
| | | esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D; |
| | | esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconCharg.png"; |
| | | esRunStatus_Info_TextButton.Text = "充电"; |
| | | esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg.png"; |
| | |
| | | break; |
| | | case "discharge": |
| | | esStatus_InfoView.BackgroundColor = 0x15FC9C04; |
| | | esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04; |
| | | esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04; |
| | | esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconDischarge.png"; |
| | | esRunStatus_Info_TextButton.Text = "放电"; |
| | | esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconDischarg.png"; |
| | |
| | | break; |
| | | case "shutdown": |
| | | esStatus_InfoView.BackgroundColor = 0x15798394; |
| | | esRunStatus_BatteryValuesButton.TextColor = 0xFF798394; |
| | | esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFF798394; |
| | | esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconShutdown.png"; |
| | | esRunStatus_Info_TextButton.Text = "停机"; |
| | | esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconShutdown.png"; |
| | |
| | | break; |
| | | case "fault": |
| | | esStatus_InfoView.BackgroundColor = 0x15FF4747; |
| | | esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747; |
| | | esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747; |
| | | esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconFault.png"; |
| | | esRunStatus_Info_TextButton.Text = "故障"; |
| | | esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconFault.png"; |
| | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 更新储能电池百分比状态 |
| | | /// </summary> |
| | | private void updateEsBatterySoc() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null) |
| | | { |
| | | esRunStatus_BatteryValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.battery_soc.ToString()) + "%"; |
| | | if(esRunStatus_BatteryIconButton.Text == "100%") |
| | |
| | | esRunStatus_BatteryIconButton.IsSelected = true; |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 更新储能实时充电状态 |
| | | /// </summary> |
| | | private void updateEsCharge() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null) |
| | | { |
| | | esRunStatus_ChargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_charge_power.ToString()); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 更新储能实时放电状态 |
| | | /// </summary> |
| | | private void updateEsDischarge() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null) |
| | | { |
| | | esRunStatus_DischargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_discharg_power.ToString()); |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 更新社会贡献1数据UI |
| | | /// </summary> |
| | | private void updateSocialContribution1() |
| | | { |
| | | socialContribution_Info1_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.coal.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info1_ValuesButton.TextSize = socialContribution_Info1_ValuesButton.TextSize - 4; |
| | | socialContribution_Info1_ValuesButton.TextSize = 14; |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25); |
| | | } |
| | | |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | | } |
| | | /// <summary> |
| | | /// 更新社会贡2献数据UI |
| | | /// </summary> |
| | | private void updateSocialContribution2() |
| | | { |
| | | socialContribution_Info2_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.co2.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString()); |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info2_UintButton.Width > Application.GetRealWidth(61)) |
| | | if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info2_UintButton.TextSize = socialContribution_Info2_UintButton.TextSize - 4; |
| | | socialContribution_Info2_ValuesButton.TextSize = 14; |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | } |
| | | |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void updateSocialContribution3() |
| | | { |
| | | |
| | | socialContribution_Info3_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.trees.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString()); |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info3_ValuesButton.TextSize = socialContribution_Info3_ValuesButton.TextSize - 4; |
| | | socialContribution_Info3_ValuesButton.TextSize = 14; |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | socialContribution_Info3_UintButton.Height = Application.GetRealWidth(25); |
| | | } |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | | } |
| | | } |
| | | } |
| | |
| | | initContentView(); |
| | | initBottomView(); |
| | | initControlEvent(); |
| | | Control.Ins.SendReadCommand(function); |
| | | |
| | | UpdateStatus(); |
| | | |
| | | Control.Ins.SendReadCommand(function); |
| | | } |
| | | /// <summary> |
| | | /// 加载内容区域 |
| | |
| | | setTempView.AddChidren(setTemp_Temp_MaxValuesTextButton); |
| | | #endregion |
| | | |
| | | |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.flow.ToString()) != null) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(12), |
| | |
| | | flowView.AddChidren(flow_ElectricDriveValuesButton); |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton); |
| | | |
| | | var socialContribution_Info2_TipButton = new Button() |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton); |
| | | |
| | | var socialContribution_Info3_TipButton = new Button() |
| | |
| | | setTemp_ValuesButton.Width = setTemp_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | setTemp_ValuesButton.Gravity = Gravity.CenterHorizontal; |
| | | |
| | | #if __IOS__ |
| | | setTemp_UintButton.X = setTemp_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | setTemp_UintButton.X = setTemp_ValuesButton.Right + Application.GetRealWidth(4); |
| | | #endif |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var dic = new Dictionary<string, string>(); |
| | |
| | | //免费热水 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | bodyView.updateFreeMode(); |
| | | bodyView.updateTemp(); |
| | | bodyView.updateModeUI(); |
| | |
| | | bodyView.updateSocialContribution2(); |
| | | bodyView.updateSocialContribution3(); |
| | | bodyView.updatePowerButton(); |
| | | }catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂热水控件更新异常:{ex.Message}"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | btnTempValues.TextSize = 28; |
| | | } |
| | | btnTempValues.Gravity = Gravity.CenterHorizontal; |
| | | |
| | | #if __IOS__ |
| | | btnTempValuesUint.X = btnTempValues.Right - Application.GetRealWidth(4); |
| | | #else |
| | | btnTempValuesUint.X = btnTempValues.Right ; |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | #endif |
| | | setTemp_ValuesButton.Gravity = Gravity.CenterHorizontal; |
| | | |
| | | #if __IOS__ |
| | | setTemp_UintButton.X = setTemp_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | setTemp_UintButton.X = setTemp_ValuesButton.Right + Application.GetRealWidth(4); |
| | | |
| | | #endif |
| | | |
| | | double dd = 35; |
| | | double.TryParse(function.GetAttrState(WaterHeaterJinmao_AttrEnum.set_temp.ToString(), "0"), out dd); |
| | |
| | | /// </summary> |
| | | private void updateFlow() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.flow.ToString()) != null) |
| | | { |
| | | flow_ValuesButton.Text = "热水流量:" + function.GetAttrState(WaterHeaterJinmao_AttrEnum.flow.ToString()) + "L/min"; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void updateVolume() |
| | | { |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) == null) |
| | | { |
| | | return; |
| | | } |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.recycl_volume.ToString()) == null) |
| | | { |
| | | return; |
| | | } |
| | | volumeString = function.GetAttrState(WaterHeaterJinmao_AttrEnum.volume.ToString()); |
| | | recyclVolumeString = function.GetAttrState(WaterHeaterJinmao_AttrEnum.recycl_volume.ToString()); |
| | | volume = 0; |
| | |
| | | private void updateSocialContribution1() |
| | | { |
| | | socialContribution_Info1_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info1_ValuesButton.TextSize = 14; |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25); |
| | | } |
| | | #if __IOS__ |
| | | socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right ; |
| | | socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | |
| | | private void updateSocialContribution2() |
| | | { |
| | | socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info2_ValuesButton.TextSize = 14; |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_Info2_UintButton.Y = socialContribution_Info2_UintButton.Y - Application.GetRealWidth(4); |
| | | } |
| | | #if __IOS__ |
| | | socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right; |
| | | socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | |
| | | /// </summary> |
| | | private void updateSocialContribution3() |
| | | { |
| | | |
| | | socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString()); |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61)) |
| | | { |
| | | socialContribution_Info3_ValuesButton.TextSize = 14; |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | //socialContribution_Info3_UintButton.Height = Application.GetRealWidth(23); |
| | | } |
| | | #if __IOS__ |
| | | socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right; |
| | | socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6); |
| | | socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4); |
| | | #else |
| | | socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2); |
| | | #endif |
| | |
| | | Height = Application.GetRealWidth(16) |
| | | }); |
| | | |
| | | |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) != null) |
| | | { |
| | | #region 用水量 |
| | | |
| | | infoView2 = new FrameLayout() |
| | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) == null) |
| | | { |
| | | return; |
| | | } |
| | | var loadPage = new Loading() |
| | | { |
| | | LodingBackgroundColor = 0x88888888, |
| | |
| | | { |
| | | SetTempQureyDateDialog(); |
| | | }; |
| | | infoView1_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => { |
| | | infoView1_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var tempQueryDate = new DateTime(tempQueryTime_Year,tempQueryTime_Month,tempQueryTime_Day); |
| | | if (tempQueryType == QueryType.day_hour) |
| | | { |
| | |
| | | return; |
| | | } |
| | | tempQueryDate = tempQueryDate.AddMonths(-1); |
| | | tempQueryTime_Day = tempQueryDate.Day; |
| | | infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if(tempQueryType == QueryType.custom_year) |
| | | { |
| | | if (tempQueryDate.Year == 2023) |
| | | if (tempQueryDate.Year <= 2023) |
| | | { |
| | | return; |
| | | } |
| | |
| | | tempQueryTime_Day = tempQueryDate.Day; |
| | | getTempHistory(); |
| | | }; |
| | | infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => { |
| | | infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var tempQueryDate = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day); |
| | | if (tempQueryType == QueryType.day_hour) |
| | | { |
| | | if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month && tempQueryDate.Day == DateTime.Now.Day) |
| | | if (tempQueryDate.Year >= DateTime.Now.Year && tempQueryDate.Month >= DateTime.Now.Month && tempQueryDate.Day >= DateTime.Now.Day) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | else if (tempQueryType == QueryType.custom_month) |
| | | { |
| | | if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month ) |
| | | if (tempQueryDate.Year >= DateTime.Now.Year && tempQueryDate.Month >= DateTime.Now.Month) |
| | | { |
| | | return; |
| | | } |
| | | tempQueryDate = tempQueryDate.AddMonths(1); |
| | | tempQueryTime_Day = tempQueryDate.Day; |
| | | infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (tempQueryType == QueryType.custom_year) |
| | | { |
| | | if (tempQueryDate.Year == DateTime.Now.Year) |
| | | if (tempQueryDate.Year >= DateTime.Now.Year) |
| | | { |
| | | return; |
| | | } |
| | |
| | | getTempHistory(); |
| | | }; |
| | | |
| | | infoView1_Date_Day.MouseUpEventHandler = (sender, e) => { |
| | | infoView1_Date_Day.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (infoView1_Date_Day.IsSelected) |
| | | { |
| | | return; |
| | |
| | | infoView1_Date_Month.IsSelected = false; |
| | | infoView1_Date_Year.IsSelected = false; |
| | | tempQueryType = QueryType.day_hour; |
| | | if (DateTime.Now.Date < new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day)) |
| | | { |
| | | tempQueryTime_Year = DateTime.Now.Year; |
| | | tempQueryTime_Month = DateTime.Now.Month; |
| | | tempQueryTime_Day = DateTime.Now.Day; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM-dd"); |
| | | getTempHistory(); |
| | | }; |
| | | infoView1_Date_Month.MouseUpEventHandler = (sender, e) => { |
| | | infoView1_Date_Month.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (infoView1_Date_Month.IsSelected) |
| | | { |
| | | return; |
| | |
| | | infoView1_Date_Month.IsSelected = true; |
| | | infoView1_Date_Year.IsSelected = false; |
| | | tempQueryType = QueryType.custom_month; |
| | | if (DateTime.Now.Date < new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day)) |
| | | { |
| | | tempQueryTime_Year = DateTime.Now.Year; |
| | | tempQueryTime_Month = DateTime.Now.Month; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM"); |
| | | getTempHistory(); |
| | | }; |
| | | infoView1_Date_Year.MouseUpEventHandler = (sender, e) => { |
| | | infoView1_Date_Year.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (infoView1_Date_Year.IsSelected) |
| | | { |
| | | return; |
| | |
| | | getTempHistory(); |
| | | }; |
| | | //-----------用水 |
| | | if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) != null) |
| | | { |
| | | |
| | | infoView2_DateInfo_DateTextButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | SetWaterQureyDateDialog(); |
| | | }; |
| | | infoView2_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => { |
| | | infoView2_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var waterQueryDate = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day); |
| | | if (waterQueryType == QueryType.day_hour) |
| | | { |
| | |
| | | return; |
| | | } |
| | | waterQueryDate = waterQueryDate.AddMonths(-1); |
| | | waterQueryTime_Day = waterQueryDate.Day; |
| | | infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (waterQueryType == QueryType.custom_year) |
| | | { |
| | | if (waterQueryDate.Year == 2023) |
| | | if (waterQueryDate.Year <= 2023) |
| | | { |
| | | return; |
| | | } |
| | |
| | | waterQueryTime_Day = waterQueryDate.Day; |
| | | getWaterHistory(); |
| | | }; |
| | | infoView2_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => { |
| | | infoView2_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var waterQueryDate = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day); |
| | | if (waterQueryType == QueryType.day_hour) |
| | | { |
| | | if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 2) |
| | | if (waterQueryDate.Year >= DateTime.Now.Year && waterQueryDate.Month >= DateTime.Now.Month && waterQueryDate.Day >= DateTime.Now.Day) |
| | | { |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | waterQueryDate = waterQueryDate.AddMonths(1); |
| | | waterQueryTime_Day = waterQueryDate.Day; |
| | | infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM"); |
| | | } |
| | | else if (waterQueryType == QueryType.custom_year) |
| | | { |
| | | if (waterQueryDate.Year == 2023) |
| | | if (waterQueryDate.Year >= DateTime.Now.Year) |
| | | { |
| | | return; |
| | | } |
| | |
| | | waterQueryTime_Day = waterQueryDate.Day; |
| | | getWaterHistory(); |
| | | }; |
| | | infoView2_Date_Day.MouseDownEventHandler = (sender, e) => { |
| | | infoView2_Date_Day.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | if (infoView2_Date_Day.IsSelected) |
| | | { |
| | | return; |
| | |
| | | infoView2_Date_Month.IsSelected = false; |
| | | infoView2_Date_Year.IsSelected = false; |
| | | waterQueryType = QueryType.day_hour; |
| | | if (DateTime.Now.Date < new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day)) |
| | | { |
| | | waterQueryTime_Year = DateTime.Now.Year; |
| | | waterQueryTime_Month = DateTime.Now.Month; |
| | | waterQueryTime_Day = DateTime.Now.Day; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM-dd"); |
| | | getWaterHistory(); |
| | | }; |
| | | infoView2_Date_Month.MouseDownEventHandler = (sender, e) => { |
| | | infoView2_Date_Month.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | if (infoView2_Date_Month.IsSelected) |
| | | { |
| | | return; |
| | |
| | | infoView2_Date_Month.IsSelected = true; |
| | | infoView2_Date_Year.IsSelected = false; |
| | | waterQueryType = QueryType.custom_month; |
| | | if (DateTime.Now.Date < new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day)) |
| | | { |
| | | waterQueryTime_Year = DateTime.Now.Year; |
| | | waterQueryTime_Month = DateTime.Now.Month; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM"); |
| | | getWaterHistory(); |
| | | }; |
| | | infoView2_Date_Year.MouseDownEventHandler = (sender, e) => { |
| | | infoView2_Date_Year.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | if (infoView2_Date_Year.IsSelected) |
| | | { |
| | | return; |
| | |
| | | infoView2_DateInfo_DateTextButton.Text = waterQueryTime_Year.ToString(); |
| | | getWaterHistory(); |
| | | }; |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }; |
| | | topView.AddChidren(btnConfrim); |
| | | |
| | | var btnToday = new Button() |
| | | { |
| | | X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Visible = false, |
| | | Enable = false, |
| | | Text= "今日", |
| | | }; |
| | | topView.AddChidren(btnToday); |
| | | |
| | | UIPickerView uIPickerView = new UIPickerView() |
| | | { |
| | | Y = Application.GetRealHeight(40), |
| | |
| | | }; |
| | | uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => |
| | | { |
| | | if (int1 < 0) |
| | | { |
| | | int1 = 1; |
| | | } |
| | | if (pickerItems_Year[int1] != item1.ToString()) |
| | | { |
| | | int.TryParse(pickerItems_Year[int1], out item1); |
| | |
| | | } |
| | | if (pickerItems_Month != null) |
| | | { |
| | | if (int2 > pickerItems_Month.Count) |
| | | if (int2 >= pickerItems_Month.Count || int2 < 0) |
| | | { |
| | | int2 = 0; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString())); |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂历史数据控件异常:{ex.Message}"); |
| | | } |
| | | } |
| | | } |
| | | if (pickerItems_Day != null) |
| | | { |
| | | if (int3 >= pickerItems_Day.Count) |
| | | if (int3 >= pickerItems_Day.Count || int3 < 0) |
| | | { |
| | | int3 = 0; |
| | | } |
| | |
| | | { |
| | | tempQueryTime_Month = item2; |
| | | } |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM"); |
| | | infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, 1).ToString("yyyy-MM"); |
| | | if (tempQueryType == QueryType.day_hour) |
| | | { |
| | | if (item3 != tempQueryTime_Day) |
| | |
| | | getTempHistory(); |
| | | }; |
| | | |
| | | |
| | | if (tempQueryType == QueryType.day_hour) |
| | | { |
| | | try |
| | | { |
| | | btnToday.Visible = btnToday.Enable = true; |
| | | btnToday.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | pickerItems_Year = new List<string>(); |
| | | pickerItems_Year.Add("2023"); |
| | | while (DateTime.Now.Year > 2022 + pickerItems_Year.Count) |
| | | { |
| | | pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString()); |
| | | } |
| | | |
| | | if (tempQueryType == QueryType.custom_month || tempQueryType == QueryType.day_hour) |
| | | { |
| | | pickerItems_Month = new List<string>(); |
| | | if (tempQueryTime_Year == DateTime.Now.Year) |
| | | { |
| | | int addMonth = 0; |
| | | while (DateTime.Now.Month > addMonth) |
| | | { |
| | | addMonth++; |
| | | pickerItems_Month.Add(addMonth.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i < 13; i++) |
| | | { |
| | | pickerItems_Month.Add(i.ToString()); |
| | | } |
| | | } |
| | | if (tempQueryType == QueryType.day_hour) |
| | | { |
| | | pickerItems_Day = new List<string>(); |
| | | if (tempQueryTime_Month == DateTime.Now.Month) |
| | | { |
| | | int addDay = 0; |
| | | while (DateTime.Now.Day > addDay) |
| | | { |
| | | addDay++; |
| | | pickerItems_Day.Add(addDay.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i <= DateTime.DaysInMonth(tempQueryTime_Year, tempQueryTime_Month); i++) |
| | | { |
| | | pickerItems_Day.Add(i.ToString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | item3 = tempQueryTime_Day = DateTime.Now.Day; |
| | | item2 = tempQueryTime_Month = DateTime.Now.Month; |
| | | item1 = tempQueryTime_Year = DateTime.Now.Year; |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(tempQueryTime_Year.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(tempQueryTime_Month.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(tempQueryTime_Day.ToString())); |
| | | }; |
| | | } |
| | | catch { } |
| | | } |
| | | } |
| | | |
| | | public void SetWaterQureyDateDialog() |
| | |
| | | }; |
| | | uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => |
| | | { |
| | | if (int1 < 0) |
| | | { |
| | | int1 = 0; |
| | | } |
| | | if (pickerItems_Year[int1] != item1.ToString()) |
| | | { |
| | | int.TryParse(pickerItems_Year[int1], out item1); |
| | |
| | | } |
| | | if (pickerItems_Month != null) |
| | | { |
| | | if (int2 > pickerItems_Month.Count) |
| | | if (int2 > pickerItems_Month.Count || int2 < 0) |
| | | { |
| | | int2 = 0; |
| | | } |
| | |
| | | } |
| | | if (pickerItems_Day != null) |
| | | { |
| | | if (int3 >= pickerItems_Day.Count) |
| | | if (int3 >= pickerItems_Day.Count || int3 < 0) |
| | | { |
| | | int3 = 0; |
| | | } |
| | |
| | | { |
| | | waterQueryTime_Month = item2; |
| | | } |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM"); |
| | | infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, 1).ToString("yyyy-MM"); |
| | | if (waterQueryType == QueryType.day_hour) |
| | | { |
| | | if (item3 != waterQueryTime_Day) |
| | |
| | | } |
| | | getWaterHistory(); |
| | | }; |
| | | |
| | | var btnToday = new Button() |
| | | { |
| | | X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Visible = false, |
| | | Enable = false, |
| | | Text = "今日", |
| | | }; |
| | | topView.AddChidren(btnToday); |
| | | |
| | | |
| | | if (waterQueryType == QueryType.day_hour) |
| | | { |
| | | try |
| | | { |
| | | btnToday.Visible = btnToday.Enable = true; |
| | | btnToday.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | pickerItems_Year = new List<string>(); |
| | | pickerItems_Year.Add("2023"); |
| | | while (DateTime.Now.Year > 2022 + pickerItems_Year.Count) |
| | | { |
| | | pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString()); |
| | | } |
| | | |
| | | if (waterQueryType == QueryType.custom_month || waterQueryType == QueryType.day_hour) |
| | | { |
| | | pickerItems_Month = new List<string>(); |
| | | if (waterQueryTime_Year == DateTime.Now.Year) |
| | | { |
| | | int addMonth = 0; |
| | | while (DateTime.Now.Month > addMonth) |
| | | { |
| | | addMonth++; |
| | | pickerItems_Month.Add(addMonth.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i < 13; i++) |
| | | { |
| | | pickerItems_Month.Add(i.ToString()); |
| | | } |
| | | } |
| | | if (waterQueryType == QueryType.day_hour) |
| | | { |
| | | pickerItems_Day = new List<string>(); |
| | | if (waterQueryTime_Month == DateTime.Now.Month) |
| | | { |
| | | int addDay = 0; |
| | | while (DateTime.Now.Day > addDay) |
| | | { |
| | | addDay++; |
| | | pickerItems_Day.Add(addDay.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (var i = 1; i <= DateTime.DaysInMonth(waterQueryTime_Year, waterQueryTime_Month); i++) |
| | | { |
| | | pickerItems_Day.Add(i.ToString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | item3 = waterQueryTime_Day = DateTime.Now.Day; |
| | | item2 = waterQueryTime_Month = DateTime.Now.Month; |
| | | item1 = waterQueryTime_Year = DateTime.Now.Year; |
| | | uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day); |
| | | uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(waterQueryTime_Year.ToString()), |
| | | pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(waterQueryTime_Month.ToString()), |
| | | pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(waterQueryTime_Day.ToString())); |
| | | }; |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | custom_year, |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | #if __ANDROID__ |
| | | public string optionString = @"{ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | crossStyle: { |
| | | color: '#999' |
| | | } |
| | | } |
| | | }, |
| | | grid: { |
| | | top: '10%', |
| | | left: '15%', |
| | |
| | | #else |
| | | |
| | | public string optionString = @"{ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | crossStyle: { |
| | | color: '#999' |
| | | } |
| | | } |
| | | }, |
| | | grid: { |
| | | top: '10%', |
| | | left: '10%', |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP"; |
| | | const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //const string APP_KEY = "HDL-HOME-APP"; |
| | | //const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; |
| | | |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | //public const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | | //const string APP_KEY = "CPEVRLRT"; |