| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=中国用户选择 |
| | | 704=非中国用户选择 |
| | | 705=请选择服务器 |
| | | 706=新能源 |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | | |
| | | 2532=Visitor Invitation Record |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | <?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="202407022"> |
| | | <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="202408091"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,我的文件等--> |
| | |
| | | <Folder Include="Resources\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\GroupControl\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Acst\Inverter\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <InterfaceDefinition Include="LaunchScreen.storyboard" /> |
| | |
| | | <BundleResource Include="Resources\ic_esvideo_on_takephoto_unselect.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_select.png" /> |
| | | <BundleResource Include="Resources\ic_esvideo_on_unlock_unselect.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\grey\PowerOffIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\ModeFree_False.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\TempBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\Mode_Economic_On.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\Mode_QuickHeat.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoBg_1.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoBg_2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoBg_3.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoIcon_1.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoIcon_2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\SocialContributionInfoIcon_3.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\NextIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\WaterHeater\PreIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\ElectricityConsumptionBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\ElectricityGenerationBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\ElectricityConsumptionIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\ElectricityGenerationIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\BatteryIconCharg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\BatteryIconDischarg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\BatteryIconFault.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\BatteryIconShutdown.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\EsIconCharg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\EsIconDischarge.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\EsIconFault.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\EsIconShutdown.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\PvBgDischarge.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\PvBgRun.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\PvIconFault.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\PvIconRun.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\PvIconStandby.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\SocialContributionInfoBg_Coal.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\SocialContributionInfoIcon_Coal.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\EnergyStorageStatusBg.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=中国用户选择 |
| | | 704=非中国用户选择 |
| | | 705=请选择服务器 |
| | | 706=新能源 |
| | | |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | | |
| | | 2532=Visitor Invitation Record |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | 703=Chinese users choose |
| | | 704=Non Chinese users choose |
| | | 705=Please select a server |
| | | 706=NewEnergy |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 新能源 |
| | | /// </summary> |
| | | public const int NewEnergy = 706; |
| | | /// <summary> |
| | | /// 请选择服务器 |
| | | /// </summary> |
| | |
| | | AcstParentPage.UpdateAcstSubInfo(localFunction); |
| | | AcstSubPage.UpdateStatus(localFunction); |
| | | break; |
| | | case SPK.WaterHeaterJinmao: |
| | | AcstParentPage.UpdateAcstSubInfo(localFunction); |
| | | |
| | | break; |
| | | case SPK.AirSwitch: |
| | | AirSwitchPage.UpdataState(localFunction); |
| | | if (localFunction.GetAttribute(FunctionAttributeKey.Power) != null)//如果是带电量的空开也要更新能源界面 |
| | |
| | | ShowFunction.FreshAir,ShowFunction.DoorLock, |
| | | ShowFunction.Panel, |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst,ShowFunction.InverterJinmao, |
| | | ShowFunction.MechanicalArm , |
| | | ShowFunction.SecurityMonitoring, |
| | | ShowFunction.VideoDoorLock, |
| | |
| | | /// 影音中控 |
| | | /// </summary> |
| | | Aks = 0x28, |
| | | /// <summary> |
| | | /// 金茂仿佛储能 |
| | | /// </summary> |
| | | InverterJinmao=0x29, |
| | | |
| | | |
| | | } |
| | |
| | | /// 子控 |
| | | /// </summary> |
| | | public const string AcstSub = "acst.sub"; |
| | | /// <summary> |
| | | /// 热水器 |
| | | /// 金茂 |
| | | /// </summary> |
| | | public const string WaterHeaterJinmao = "electrical.water_heater.jinmao"; |
| | | /// <summary> |
| | | /// 逆变器/新能源 |
| | | /// 金茂 |
| | | /// </summary> |
| | | public const string InverterJinmao = "energy.inverter.jinmao"; |
| | | |
| | | /// <summary> |
| | | /// 门锁 |
New file |
| | |
| | | using System; |
| | | namespace HDL_ON.Entity |
| | | { |
| | | /// <summary> |
| | | /// 金茂逆变器 |
| | | /// </summary> |
| | | public class InverterJinmao |
| | | { |
| | | public InverterJinmao() |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | public enum InverterJinmao_AttrEnum |
| | | { |
| | | /// <summary> |
| | | /// 发电功率 |
| | | /// </summary> |
| | | pv_power, |
| | | /// <summary> |
| | | /// 今日发电量 |
| | | /// </summary> |
| | | pv_electricity_today, |
| | | /// <summary> |
| | | /// 本月发电量 |
| | | /// </summary> |
| | | pv_electricity_month, |
| | | /// <summary> |
| | | /// 总发电量 |
| | | /// </summary> |
| | | pv_electricity, |
| | | /// <summary> |
| | | /// 光伏运行状态 |
| | | /// </summary> |
| | | system_status, |
| | | /// <summary> |
| | | /// 储能状态 |
| | | /// </summary> |
| | | ess_status, |
| | | /// <summary> |
| | | /// 储能充电功率 |
| | | /// </summary> |
| | | ess_charge_power, |
| | | /// <summary> |
| | | /// 储能放电功率 |
| | | /// </summary> |
| | | ess_discharg_power, |
| | | /// <summary> |
| | | /// 当前电池容量 |
| | | /// </summary> |
| | | battery_soc, |
| | | /// <summary> |
| | | /// 用电功率 |
| | | /// </summary> |
| | | load_active_power, |
| | | /// <summary> |
| | | /// 今日用电量 |
| | | /// </summary> |
| | | load_electricity_today, |
| | | /// <summary> |
| | | /// 本月用电量 |
| | | /// </summary> |
| | | load_electricity_month, |
| | | /// <summary> |
| | | /// 总用电量 |
| | | /// </summary> |
| | | load_electricity, |
| | | /// <summary> |
| | | /// 节约标准煤 |
| | | /// </summary> |
| | | coal, |
| | | /// <summary> |
| | | /// //CO2减排 |
| | | /// </summary> |
| | | co2, |
| | | /// <summary> |
| | | /// 等效植树量 |
| | | /// </summary> |
| | | trees, |
| | | } |
| | | /// <summary> |
| | | /// 光伏运行状态 |
| | | /// </summary> |
| | | public enum InverterJinmao_Attr_SystemStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// 运行: |
| | | /// </summary> |
| | | run, |
| | | /// <summary> |
| | | /// 故障: |
| | | /// </summary> |
| | | fault, |
| | | /// <summary> |
| | | /// 待机: |
| | | /// </summary> |
| | | standby |
| | | } |
| | | /// <summary> |
| | | /// 储能状态 |
| | | /// </summary> |
| | | public enum InverterJinmao_Attr_EssStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// 充电: |
| | | /// </summary> |
| | | charge, |
| | | /// <summary> |
| | | /// 放电: |
| | | /// </summary> |
| | | discharge, |
| | | /// <summary> |
| | | /// 停机: |
| | | /// </summary> |
| | | shutdown, |
| | | /// <summary> |
| | | /// 故障: |
| | | /// </summary> |
| | | fault |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | namespace HDL_ON.Entity |
| | | { |
| | | /// <summary> |
| | | /// 金茂热水器 |
| | | /// </summary> |
| | | public class WaterHeaterJinmao |
| | | { |
| | | public WaterHeaterJinmao() |
| | | { |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public enum WaterHeaterJinmao_AttrEnum |
| | | { |
| | | /// <summary> |
| | | /// 开关 WR string on/off |
| | | /// </summary> |
| | | on_off, |
| | | /// <summary> |
| | | /// 热水温度 °C R float %d |
| | | /// </summary> |
| | | temp, |
| | | /// <summary> |
| | | /// 热水温度设置 °C WR float %d 35-60 |
| | | /// </summary> |
| | | set_temp, |
| | | /// <summary> |
| | | /// 热水模式设置 WR string 节能:economic 速热:quick_heat |
| | | /// </summary> |
| | | mode, |
| | | /// <summary> |
| | | /// 免费热水状态 R boolean true/false |
| | | /// </summary> |
| | | mode_free, |
| | | /// <summary> |
| | | /// 热水流量 L/min R float %d |
| | | /// </summary> |
| | | flow, |
| | | /// <summary> |
| | | /// 热回收热水量 t R float %d |
| | | /// </summary> |
| | | recycl_volume, |
| | | /// <summary> |
| | | /// 总热水量 t R float %d |
| | | /// </summary> |
| | | volume, |
| | | /// <summary> |
| | | /// 热回收节电量 kwh R float %d |
| | | /// </summary> |
| | | energy_electricity, |
| | | /// <summary> |
| | | /// CO2减排量 R float %d |
| | | /// </summary> |
| | | co2, |
| | | /// <summary> |
| | | /// 等效植树量 R float %d |
| | | /// </summary> |
| | | trees, |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 热水模式设置 |
| | | /// </summary> |
| | | public enum WaterHeaterJinmao_Attr_ModeEnum |
| | | { |
| | | economic,//节能 |
| | | quick_heat,//速热 |
| | | } |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | public List<Function> GetAcstParentList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.AcstParent);//.OrderByDescending(o=>o.controlCounter).ToList() |
| | | return Functions.FindAll((obj) => obj.spk == SPK.AcstParent); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public List<Function> GetAcstSubList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.AcstSub); |
| | | } |
| | | /// <summary> |
| | | /// 绿建科技系统 |
| | | /// 热水器列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetWaterHeaterJinmaoList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.WaterHeaterJinmao); |
| | | } |
| | | /// <summary> |
| | | /// 金茂光伏储能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetInverterJinmaoList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.InverterJinmao); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public List<Function> GetElectricals() |
| | | { |
| | | var spkList = SPK.ElectricalSpkList(); |
| | | var spkList = SPK.ElectricalSpkList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 红外宝列表 |
| | | /// </summary> |
| | |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.IrModule); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 音乐列表 |
| | |
| | | { |
| | | get |
| | | { |
| | | if(_OtherBrandFunction == null) |
| | | if (_OtherBrandFunction == null) |
| | | { |
| | | _OtherBrandFunction = new List<Function>(); |
| | | var spkList = SPK.GetAll3tySPK(); |
| | |
| | | { |
| | | //检测重复 |
| | | var same = Functions.FindAll((obj) => obj.deviceId == tempFunction.deviceId); |
| | | if(same!= null) |
| | | if (same != null) |
| | | { |
| | | foreach(var sameTemp in same) |
| | | foreach (var sameTemp in same) |
| | | { |
| | | Functions.Remove(sameTemp); |
| | | } |
| | |
| | | { |
| | | } |
| | | else |
| | | { |
| | | { |
| | | switch (brandType) |
| | | { |
| | | case SPK.BrandType.Hdl: |
| | |
| | | /// <summary> |
| | | /// 功能绑定房间 |
| | | /// </summary> |
| | | public string FunctionsBindRooms(List<string> roomIds,List<string> deviceIds) |
| | | public string FunctionsBindRooms(List<string> roomIds, List<string> deviceIds) |
| | | { |
| | | var pm = new HttpServerRequest(); |
| | | var pack = pm.BindDeviceToRoom(deviceIds, roomIds); |
| | | if(pack.Code == StateCode.SUCCESS) |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | |
| | | } |
| | |
| | | /// <summary> |
| | | /// 删除场景 |
| | | /// </summary> |
| | | public void DeleteScene(Scene scene,bool upSevser) |
| | | public void DeleteScene(Scene scene, bool upSevser) |
| | | { |
| | | if (upSevser) |
| | | { |
| | |
| | | { |
| | | Read3tyFunctionStatus(); |
| | | |
| | | if(DriverLayer.Control.Ins.GatewayOnline_Local) |
| | | if (DriverLayer.Control.Ins.GatewayOnline_Local) |
| | | { |
| | | |
| | | //List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl); |
| | |
| | | MainPage.Log($"结束--读取"); |
| | | } |
| | | |
| | | |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | #region 场景相关 |
| | | #region 场景相关 |
| | | /// <summary> |
| | | /// 添加场景 |
| | | /// </summary> |
| | |
| | | } |
| | | return revPack.Code; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 收藏功能 |
| | | |
| | | #region 收藏功能 |
| | | |
| | | /// <summary> |
| | | /// 收藏场景 |
| | | /// </summary> |
| | |
| | | return result; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region |
| | | |
| | | #region |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | } |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneTargetTypeChoosePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogClient.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogInvokeAsync.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\WaterHeaterJinmao.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\WaterHeaterJinmaoPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\WetarHeaterJinmaoHistoryPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_Histogram.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\InverterJinmao.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\InverterJinmaoPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\InverterJinmaoHistroyPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | /// <summary> |
| | | /// 功能控制界面跳转事件 |
| | | /// </summary> |
| | | public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom,Action action |
| | | public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom, Action action |
| | | ) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break; |
| | | case SPK.GroupControl: |
| | | //var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); |
| | | //dialog.ShowDialog(); |
| | | var groupControlPage = new GroupControlPage_V2(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); |
| | | //var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); |
| | | //dialog.ShowDialog(); |
| | | var groupControlPage = new GroupControlPage_V2(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); |
| | | MainPage.BasePageView.AddChidren(groupControlPage); |
| | | groupControlPage.LoadPage(btnCollectionIcon, btnName, btnFromFloor); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | break; |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function ,LastDateTime = DateTime.Now};//当前播放器 |
| | | Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function, LastDateTime = DateTime.Now };//当前播放器 |
| | | var a31PlayMusicPage = new Music.A31PlayMusicPage(); |
| | | MainPage.BasePageView.AddChidren(a31PlayMusicPage); |
| | | a31PlayMusicPage.Show(); |
| | |
| | | new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao)); |
| | | }); |
| | | } |
| | | Application.RunOnMainThread(() =>{ |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | |
| | |
| | | } |
| | | #endif |
| | | break; |
| | | case SPK.VideoDoorLock: { |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | //萤石视频门锁 |
| | | var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom,action); |
| | | var form = new VideoDoorLockPage(function, btnName, btnFromFloor, comerom, action); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | //海信电视 |
| | | var form = new UI2.FuntionControlView.HisenseTV.HisenseTvPage(function, btnName, btnFromFloor,btnCollectionIcon, comerom, action); |
| | | var form = new UI2.FuntionControlView.HisenseTV.HisenseTvPage(function, btnName, btnFromFloor, btnCollectionIcon, comerom, action); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | |
| | | /// <summary> |
| | | /// 父窗体 |
| | | /// </summary> |
| | | FrameLayout baseView; |
| | | public FrameLayout baseView; |
| | | /// <summary> |
| | | /// 父窗体Dialog |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 内容区域 |
| | | /// </summary> |
| | | FrameLayout contentView; |
| | | public FrameLayout contentView; |
| | | |
| | | /// <summary> |
| | | /// 后退按钮 |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Security; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI.UI1Login |
| | |
| | | //AddChidren(bodyView); |
| | | bodyView = this; |
| | | //2020-12-22 增加点击隐藏键盘事件 |
| | | bodyView.MouseDownEventHandler += (sender, e) => { |
| | | bodyView.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | Application.HideSoftInput(); |
| | | }; |
| | | pm = new HttpServerRequest(); |
| | | #if __ANDROID__ |
| | | BaseActivity.HideKeyboardEvent = () => { |
| | | BaseActivity.HideKeyboardEvent = () => |
| | | { |
| | | if (this.Y != 0) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | |
| | | }); |
| | | } |
| | | }; |
| | | BaseActivity.ShowKeyboardEvent = () => { |
| | | BaseActivity.ShowKeyboardEvent = () => |
| | | { |
| | | try |
| | | { |
| | | if (etPassword.Foucs) |
| | | { |
| | | |
| | | |
| | | new Thread(() => |
| | | { |
| | | Thread.Sleep(100); |
| | |
| | | } |
| | | catch { } |
| | | }; |
| | | BaseActivity.SmsAction = (message) => { |
| | | Console.WriteLine($"接收到短信:"+ message); |
| | | BaseActivity.SmsAction = (message) => |
| | | { |
| | | Console.WriteLine($"接收到短信:" + message); |
| | | |
| | | string pattern = @"【HDL】.*(\d{6}).*"; |
| | | |
| | |
| | | { |
| | | string code = match.Groups[1].Value; |
| | | Console.WriteLine("验证码为:" + code); |
| | | if(loginType==0 && logintMode == 1) |
| | | if (loginType == 0 && logintMode == 1) |
| | | { |
| | | etPassword.Text = code; |
| | | } |
| | |
| | | } |
| | | |
| | | #if __ANDROID__ |
| | | BaseActivity.HideKeyboardEvent = () => { |
| | | BaseActivity.HideKeyboardEvent = () => |
| | | { |
| | | |
| | | }; |
| | | BaseActivity.ShowKeyboardEvent = () => { }; |
| | |
| | | //Application.HideSoftInput(); |
| | | } |
| | | |
| | | #region 局部变量 |
| | | #region 局部变量 |
| | | /// <summary> |
| | | /// 登录类型 |
| | | /// 0:手机 |
| | |
| | | /// 短信验证码 |
| | | /// </summary> |
| | | string smsCode = ""; |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 控件列表 |
| | | #region 控件列表 |
| | | /// <summary> |
| | | /// 等待提示 |
| | | /// </summary> |
| | |
| | | /// 服务器请求对象 |
| | | /// </summary> |
| | | HttpServerRequest pm; |
| | | #endregion |
| | | #endregion |
| | | |
| | | string verAccount = ""; |
| | | |
| | |
| | | UnSelectedImagePath = "Public/Logo-bg.png" |
| | | }; |
| | | bodyView.AddChidren(btnIcon_bg); |
| | | btnIcon_bg.MouseDownEventHandler += (sender, e) => { |
| | | btnIcon_bg.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | Application.HideSoftInput(); |
| | | }; |
| | | |
| | |
| | | btnIcon_bg.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | return; |
| | | |
| | | |
| | | }; |
| | | |
| | | bool b = false; |
| | |
| | | etAccount.Text = "13336018868"; |
| | | etAccount.Text = "649362315@qq.com"; |
| | | //etAccount.Text = "18402017839"; |
| | | etAccount.Text = "13616515037"; |
| | | etAccount.Text = "18620993214"; |
| | | |
| | | } |
| | | else |
| | |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | | if(etAccount.Text == "649362315@qq.com") |
| | | if (etAccount.Text == "18620993214") |
| | | { |
| | | etPassword.Text = "aa123456"; |
| | | etPassword.Text = "hdl1985."; |
| | | } |
| | | else if(etAccount.Text == "13580507523") |
| | | else if (etAccount.Text == "13580507523") |
| | | { |
| | | etPassword.Text = "a123456"; |
| | | }else if(etAccount.Text == "13288623489") |
| | | } |
| | | else if (etAccount.Text == "13288623489") |
| | | { |
| | | etPassword.Text = "luoxiaodong"; |
| | | }else if(etAccount.Text == "15014291819") |
| | | } |
| | | else if (etAccount.Text == "15014291819") |
| | | { |
| | | etPassword.Text = "hdl123456"; |
| | | }else if (etAccount.Text == "15262988048") |
| | | } |
| | | else if (etAccount.Text == "15262988048") |
| | | { |
| | | etPassword.Text = "15262988048"; |
| | | } |
| | | else if (etAccount.Text == "649362315@qq.com") |
| | | { |
| | | etPassword.Text = "aa123456"; |
| | | }else if(etAccount.Text == "dcai.assist@gmail.com") |
| | | } |
| | | else if (etAccount.Text == "dcai.assist@gmail.com") |
| | | { |
| | | etPassword.Text = "GraniteTileS57"; |
| | | } |
| | |
| | | |
| | | btnEmailLogin = new Button() |
| | | { |
| | | X = btnPhoneLogin.Right ,//+ Application.GetRealWidth(20), |
| | | X = btnPhoneLogin.Right,//+ Application.GetRealWidth(20), |
| | | Y = Application.GetRealHeight(177), |
| | | Width = Application.GetRealWidth(140), |
| | | Height = Application.GetRealHeight(40), |
| | |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | bodyView.AddChidren(btnEmailLogin); |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 账号填写 |
| | | #region 账号填写 |
| | | accountView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | accountView.AddChidren(btnAccountIcon); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 密码填写 |
| | | #region 密码填写 |
| | | passwordView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | PlaceholderText = Language.StringByID(StringId.PlsEntryPassword), |
| | | SecureTextEntry = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | |
| | | |
| | | }; |
| | | passwordView.AddChidren(etPassword); |
| | | |
| | | #region 密码登录-控件加载 |
| | | #region 密码登录-控件加载 |
| | | btnVisiblePassword = new Button() |
| | | { |
| | | X = Application.GetRealWidth(223), |
| | |
| | | TextSize = 12, |
| | | }; |
| | | passwordView.AddChidren(btnForgetPassword); |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 验证码登录-控件加载 |
| | | #region 验证码登录-控件加载 |
| | | btnGetVerificationCode = new Button() |
| | | { |
| | | X = Application.GetRealWidth(219), |
| | |
| | | IsSelected = false, |
| | | }; |
| | | passwordView.AddChidren(btnGetVerificationCode); |
| | | #endregion |
| | | #endregion |
| | | |
| | | btnPasswordViewBottomLine = new Button() |
| | | { |
| | |
| | | }; |
| | | passwordView.AddChidren(btnPasswordViewBottomLine); |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 注册与快捷登录 |
| | | #region 注册与快捷登录 |
| | | btnRegister = new Button() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | }; |
| | | bodyView.AddChidren(btnSwitchLoginMode); |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | btnLogin = new Button() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | btnDomeLogin.MouseUpEventHandler = (sender, e) => { |
| | | btnDomeLogin.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | MainPage.NoLoginMode = true; |
| | | #if DEBUG |
| | |
| | | //楼层房间列表 |
| | | var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id }; |
| | | floor1.SaveRoomFile(); |
| | | #region 房间一 -- 客厅 |
| | | #region 房间一 -- 客厅 |
| | | //处理房间列表 |
| | | |
| | | var room1 = new Room() |
| | | { |
| | | roomId = "1405771366041378818", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "洗手间" : "Restroom", |
| | | roomName = Language.CurrentLanguage == "Chinese" ? "洗手间" : "Restroom", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "47c98953-6fd4-4379-88b9-4b748963504f", |
| | | roomType = "ROOM", |
| | |
| | | var room3 = new Room() |
| | | { |
| | | roomId = "1405771193802285057", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "餐厅" : "Restaurant", |
| | | roomName = Language.CurrentLanguage == "Chinese" ? "餐厅" : "Restaurant", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "ed7fc784-aace-44b8-97a3-bc3e727e598b", |
| | | roomType = "ROOM", |
| | |
| | | var room4 = new Room() |
| | | { |
| | | roomId = "1405771024583090178", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "客厅" : "Drawing room", |
| | | roomName = Language.CurrentLanguage == "Chinese" ? "客厅" : "Drawing room", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "9191a3a2-026f-4667-a0b1-e3af699e7295", |
| | | roomType = "ROOM", |
| | |
| | | SpatialInfo.CurrentSpatial.RoomList.Add(room4); |
| | | |
| | | |
| | | #region 客厅 |
| | | #region 功能 |
| | | #region 客厅 |
| | | #region 功能 |
| | | var lightRgb1 = new Function() |
| | | { |
| | | sid = "light10000000000", |
| | | deviceId = "light10000000000", |
| | | name = Language.CurrentLanguage == "Chinese"? "客厅氛围灯1": "RGB light 1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "客厅氛围灯1" : "RGB light 1", |
| | | spk = SPK.LightRGB, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | |
| | | deviceId = "light2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "客厅氛围灯2" : "RGB light 2", |
| | | spk = SPK.LightRGB, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | deviceId = "light3", |
| | | name = Language.CurrentLanguage == "Chinese" ? "阅读灯" : "CCT light", |
| | | spk = SPK.LightCCT, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | deviceId = "light5", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开关灯" : "light 2", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | deviceId = "curtain1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开合帘" : "Curtain 1", |
| | | spk = SPK.CurtainTrietex, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | deviceId = "curtain2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "卷帘" : "Curtain 2", |
| | | spk = SPK.CurtainRoller, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | deviceId = "floorheat1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "地暖" : "Floorheat 1", |
| | | spk = SPK.FloorHeatStandard, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | |
| | | |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-金茂光伏储能", |
| | | spk = SPK.InverterJinmao, |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.pv_power.ToString(),value =new List<string>(){ "on","off" }, curValue="28",state = "28" }, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.pv_electricity_today.ToString(),value = new List<string>(){ "0" },curValue ="20",state = "20"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.pv_electricity_month.ToString(),value = new List<string>(){ "0" },curValue ="500",state = "500"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.pv_electricity.ToString(),value = new List<string>(){ "0" },curValue ="2100",state = "2100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.system_status.ToString(),value = new List<string>(){ "0" },curValue = InverterJinmao_Attr_SystemStatusEnum.run.ToString(),state = InverterJinmao_Attr_SystemStatusEnum.run.ToString()}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.ess_status.ToString(),value = new List<string>(){ "0" },curValue = InverterJinmao_Attr_EssStatusEnum.charge.ToString(),state = InverterJinmao_Attr_EssStatusEnum.charge.ToString()}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.ess_charge_power.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.ess_discharg_power.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.battery_soc.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_active_power.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"}, |
| | | 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"}, |
| | | } |
| | | }); |
| | | |
| | | FunctionList.List.Functions.Add(new Function |
| | | { |
| | | name = "测试-空调科技系统总控", |
| | | spk = SPK.AcstParent, |
| | | //collect = true, |
| | | 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> |
| | |
| | | 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 |
| | |
| | | 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 |
| | | { |
| | | 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"}, |
| | | } |
| | | 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.WaterHeaterJinmao, |
| | | sid = "0000000001", |
| | | 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.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 = "5",state = "5" }, |
| | | 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.volume.ToString(),curValue = "88",state = "88" }, |
| | | |
| | | }, |
| | | }); |
| | | |
| | | |
| | |
| | | { |
| | | name = "测试温控器", |
| | | spk = SPK.HvacCac, |
| | | collect = true, |
| | | attributes = new List<FunctionAttributes> |
| | | { |
| | | new FunctionAttributes(){ key = "on_off",curValue = "on",state = "on" }, |
| | |
| | | |
| | | }; |
| | | scene2.SaveSceneFile(); |
| | | #endregion |
| | | #endregion |
| | | #region 餐厅 |
| | | #endregion |
| | | #endregion |
| | | #region 餐厅 |
| | | var lightSwitch3 = new Function() |
| | | { |
| | | sid = "light6", |
| | |
| | | } |
| | | }; |
| | | scene4.SaveSceneFile(); |
| | | #endregion |
| | | #region 卧室 |
| | | #endregion |
| | | #region 卧室 |
| | | var ac = new Function() |
| | | { |
| | | sid = "ac1", |
| | |
| | | // collect = false, |
| | | //}; |
| | | //scene6.SaveSceneFile(); |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | var lightSwitch6 = new Function() |
| | |
| | | }; |
| | | lightSwitch6.SaveFunctionFile(); |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | var fileList = Common.FileUtlis.Files.ReadFiles(); |
| | | foreach(var file in fileList) |
| | | foreach (var file in fileList) |
| | | { |
| | | FunctionList.List.IniFunctionList(file,true); |
| | | FunctionList.List.IniFunctionList(file, true); |
| | | } |
| | | Room.CurrentSpatial.InitRoomListFunctions(); |
| | | |
| | |
| | | account = etAccount.Text.Trim(); |
| | | |
| | | |
| | | #region 隐私政策 |
| | | #region 隐私政策 |
| | | AddServiceAgreementControl(bodyView); |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | #region ■ 服务协议___________________________ |
| | | #region ■ 服务协议___________________________ |
| | | bool isAgreePrivacyPolicy = false; |
| | | /// <summary> |
| | | /// 添加服务协议控件 |
| | |
| | | X = Application.GetRealWidth(22), |
| | | }; |
| | | frameRow.AddChidren(agreeView); |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | agreeView.X = Application.GetRealWidth(52); |
| | | } |
| | |
| | | #if DEBUG |
| | | return true; |
| | | #endif |
| | | if(HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com") |
| | | if (HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com") |
| | | { |
| | | return true; |
| | | } |
| | |
| | | return true; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | AddChidren(bodyView); |
| | | |
| | | //2020-12-22 增加点击隐藏键盘事件 |
| | | bodyView.MouseDownEventHandler += (sender, e) => { |
| | | bodyView.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | Application.HideSoftInput(); |
| | | }; |
| | | |
| | |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | bodyView.AddChidren(btnEmailLogin); |
| | | if(Language.CurrentLanguage!= "Chinese") |
| | | if (Language.CurrentLanguage != "Chinese") |
| | | { |
| | | btnPhoneLogin.Width = Application.GetRealWidth(180); |
| | | btnEmailLogin.Width = Application.GetRealWidth(180); |
| | |
| | | }; |
| | | |
| | | //跳转国家区号选择界面 |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => { |
| | | JLCountrycode.CountryCodeView.Current.Show((countryName, code) => { |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | JLCountrycode.CountryCodeView.Current.Show((countryName, code) => |
| | | { |
| | | if (!string.IsNullOrEmpty(code)) |
| | | { |
| | | phoneZoneCode = code; |
| | |
| | | }; |
| | | VerticalScrolViewMiddle.AddChidren(rowView); |
| | | |
| | | rowView.AddChidren(new Button() { |
| | | Y = Application.GetRealHeight(50-1), |
| | | rowView.AddChidren(new Button() |
| | | { |
| | | Y = Application.GetRealHeight(50 - 1), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | |
| | | namespace HDL_ON.UI |
| | | { |
| | | #if __IOS__ |
| | | public partial class HomePage : VerticalRefreshLayout |
| | | public partial class HomePage : VerticalRefreshLayout |
| | | #else |
| | | public partial class HomePage : VerticalScrolViewLayout |
| | | #endif |
| | |
| | | /// 功能区域集合 |
| | | /// </summary> |
| | | List<FrameLayout> functionViews; |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 区域变量 |
| | | #region 区域变量 |
| | | /// <summary> |
| | | /// 当前显示对控制类型是否是设备功能控制 |
| | | /// 0 功能 |
| | |
| | | /// 2 群控 |
| | | /// </summary> |
| | | int CurShowTypeContent = 0; |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 报警信息 |
| | | #region 报警信息 |
| | | //Button btnMsgBg; |
| | | //Button btnMsgTime; |
| | | //Button btnMsg; |
| | |
| | | topView.AddChidren(environmentalView); |
| | | CheckLinkStatus();//2020-12-22 |
| | | |
| | | #region 环境数据 |
| | | #region 环境数据 |
| | | var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature); |
| | | var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity); |
| | | var enviList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk)); |
| | |
| | | } |
| | | } |
| | | |
| | | var btnEnvirValuesTitle = new Button() { |
| | | var btnEnvirValuesTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | } |
| | | if (tempTotalValues > 0) |
| | | { |
| | | btnIndoorTempValues.Text = "/" + (tempTotalValues/ tempTotalCount).ToString("0.0") + "°"; |
| | | btnIndoorTempValues.Text = "/" + (tempTotalValues / tempTotalCount).ToString("0.0") + "°"; |
| | | } |
| | | } |
| | | btnIndoorTempValues.Width = btnIndoorTempValues.GetTextWidth(); |
| | |
| | | }; |
| | | if (DB_ResidenceData.Instance.GatewayType == 1 && !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | |
| | | |
| | | topView.AddChidren(btnSecurityStatus); |
| | | foreach (var temp in FunctionList.List.securities) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | btnSecurityStatus.MouseUpEventHandler = (sender, e) => { |
| | | btnSecurityStatus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new ArmCenterPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | |
| | | } |
| | | |
| | | |
| | | #region msg |
| | | #region msg |
| | | //FrameLayout msgView; |
| | | //msgView = new FrameLayout() |
| | | //{ |
| | |
| | | UnSelectedImagePath = "Collection/MsgIcon.png", |
| | | SelectedImagePath = "Collection/MsgIconTip.png", |
| | | }; |
| | | if(btnSecurityStatus.Parent == null) |
| | | if (btnSecurityStatus.Parent == null) |
| | | { |
| | | btnMsgIcon.X = Application.GetRealWidth(329); |
| | | } |
| | |
| | | |
| | | LoadEvent_GotoMessageCenterPage(); |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 功能场景切换 |
| | | #region 功能场景切换 |
| | | |
| | | bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 }); |
| | | |
| | |
| | | #endregion |
| | | |
| | | #if DEBUG |
| | | btnResidenceName.MouseUpEventHandler = (envent, ee) => { |
| | | btnResidenceName.MouseUpEventHandler = (envent, ee) => |
| | | { |
| | | MainPage.Log("sss"); |
| | | |
| | | #if __ANDROID__ |
| | |
| | | |
| | | void loadNavView() |
| | | { |
| | | if(changeBaseView == null) |
| | | if (changeBaseView == null) |
| | | { |
| | | changeBaseView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | |
| | | contentView.PageIndex = 2; |
| | | }; |
| | | |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | |
| | | /// </summary> |
| | | void LoadContentView() |
| | | { |
| | | |
| | | |
| | | if (!Common.ApiUtlis.Ins.DownloadDataComplete && !MainPage.NoLoginMode) |
| | | { |
| | | var waitPage = new Loading(); |
| | |
| | | } |
| | | }); |
| | | } |
| | | catch (Exception ex) { |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"刷新主页异常:{ex.Message}"); |
| | | } |
| | | finally { } |
| | |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | functionViews.Add(functionView); |
| | | //绿建人居环境,科技系统 |
| | | if (function.spk == SPK.AcstParent) |
| | | //绿建人居环境,科技系统,金茂光伏储能 |
| | | if (function.spk == SPK.AcstParent || function.spk == SPK.InverterJinmao) |
| | | { |
| | | LoadAcstDiv(functionView, function); |
| | | } |
| | |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | functionViews.Add(functionView); |
| | | var btnbg = new Button() |
| | | { |
| | | UnSelectedImagePath = "Collection/Functionbg.png", |
| | | SelectedImagePath = "Collection/FunctionOnbg.png", |
| | | Tag = function.sid |
| | | }; |
| | | functionView.AddChidren(btnbg); |
| | | LoadDeviceFunctionDiv(functionView, function); |
| | | var btnbg = new Button() |
| | | { |
| | | UnSelectedImagePath = "Collection/Functionbg.png", |
| | | SelectedImagePath = "Collection/FunctionOnbg.png", |
| | | Tag = function.sid |
| | | }; |
| | | functionView.AddChidren(btnbg); |
| | | LoadDeviceFunctionDiv(functionView, function); |
| | | |
| | | index++; |
| | | } |
| | |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView); |
| | | |
| | | LoadSceneFunctionDiv( functionView, scene); |
| | | LoadSceneFunctionDiv(functionView, scene); |
| | | index++; |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | else if(function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) |
| | | else if (function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; |
| | |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseWhiteIcon_Shadow.png", |
| | | }; |
| | | view.AddChidren(btnCurtainClose); |
| | | |
| | | |
| | | |
| | | Button btnCurtainOpen; |
| | | btnCurtainOpen = new Button() |
| | |
| | | view.AddChidren(btnClose); |
| | | |
| | | |
| | | btnClose.MouseDownEventHandler = (sender, e) => { |
| | | btnClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = true; |
| | | }; |
| | | |
| | | btnClose.MouseUpEventHandler = (sender, e) => { |
| | | btnClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = false; |
| | | if (function.spk == SPK.GroupControl) |
| | | { |
| | |
| | | (function as GroupControl).Control(d); |
| | | } |
| | | }; |
| | | btnOpen.MouseDownEventHandler = (sender, e) => { |
| | | btnOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = true; |
| | | }; |
| | | btnOpen.MouseUpEventHandler = (sender, e) => { |
| | | btnOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = false; |
| | | if (function.spk == SPK.GroupControl) |
| | | { |
| | |
| | | LoadEvent_SwitchFunction(function, btnSwitch); |
| | | } |
| | | //取消收藏事件 |
| | | Action cannelCollect = () => { |
| | | Action cannelCollect = () => |
| | | { |
| | | function.collect = false; |
| | | //if (SPK.MusicSpkList().Contains(function.spk))//处理音乐主从关系 |
| | | //{ |
| | |
| | | }; |
| | | |
| | | |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect,()=> { |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect, () => |
| | | { |
| | | this.LoadDeviceFunctionControlZone();//删除设备后重新刷新UI |
| | | }); |
| | | view.MouseUpEventHandler = skipControlPageEvent; |
| | |
| | | btnIcon.MouseUpEventHandler = skipControlPageEvent; |
| | | btnState.MouseUpEventHandler = skipControlPageEvent; |
| | | //不需要更新状态的功能列表 |
| | | if(!SPK.NotStatusSpkList.Contains(function.spk) || function.spk != SPK.IpCam_Imou) |
| | | if (!SPK.NotStatusSpkList.Contains(function.spk) || function.spk != SPK.IpCam_Imou) |
| | | { |
| | | UpdataFunctionStates(function); |
| | | } |
| | |
| | | UnSelectedImagePath = "FunctionIcon/FunctionBg/AcstFunctionBg.png", |
| | | }; |
| | | view.AddChidren(btnFunctionViewBg); |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | if (function.spk == SPK.AcstParent) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | else if (function.spk == SPK.InverterJinmao) |
| | | { |
| | | btnName.TextID = StringId.NewEnergy; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new InverterJinmaoPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | |
| | | |
| | | //Button btnAcstPower = new Button() |
| | |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | //}; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | break; |
| | | case ShowFunction.Acst: |
| | | functionCount = FunctionList.List.GetAcstParentList().Count; |
| | | functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | functionOnCount = 0; |
| | | break; |
| | | case ShowFunction.InverterJinmao: |
| | | functionCount = FunctionList.List.GetInverterJinmaoList().Count; |
| | | functionOnCount = 0; |
| | | break; |
| | | case ShowFunction.VideoDoorLock: |
| | | if (Common.ApiUtlis.Ins.hadInternet) |
| | |
| | | && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring |
| | | && item != ShowFunction.SecurityCenter |
| | | && item != ShowFunction.Acst && item != ShowFunction.IpCam |
| | | && item != ShowFunction.Acst && item != ShowFunction.IpCam && item != ShowFunction.InverterJinmao |
| | | && functionCount != 0) |
| | | { |
| | | btnFunctionCount = new Button() |
| | |
| | | }; |
| | | break; |
| | | case ShowFunction.Acst: |
| | | btnName.TextID = StringId.Acst; |
| | | |
| | | case ShowFunction.InverterJinmao: |
| | | Button btnJMLogo = new Button() |
| | | { |
| | | Y = specialList.Contains(index) ? Application.GetRealWidth(147) : Application.GetRealWidth(104), |
| | |
| | | }; |
| | | functionView.AddChidren(btnJMLogo); |
| | | |
| | | //Button btnAcstPower = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(120), |
| | | // Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117), |
| | | // Width = Application.GetRealWidth(32), |
| | | // Height = Application.GetRealWidth(32), |
| | | // SelectedImagePath = "Public/PowerOpen.png", |
| | | // UnSelectedImagePath = "Public/PowerClose.png", |
| | | // IsSelected = functionOnCount > 0, |
| | | // Tag = item + "_AllControl", |
| | | //}; |
| | | //functionView.AddChidren(btnAcstPower); |
| | | //btnAcstPower.MouseUpEventHandler = (sender, e) => |
| | | //{ |
| | | // btnAcstPower.IsSelected = !btnAcstPower.IsSelected; |
| | | // string onoff = btnAcstPower.IsSelected ? "on" : "off"; |
| | | // Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | // d.Add(FunctionAttributeKey.OnOff, onoff); |
| | | // foreach (var temp in FunctionList.List.GetAcstParentList()) |
| | | // { |
| | | // Control.Ins.SendWriteCommand(temp, d); |
| | | // } |
| | | //}; |
| | | |
| | | |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | if (item == ShowFunction.Acst) |
| | | { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnName.TextID = StringId.Acst; |
| | | |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | else if (item == ShowFunction.InverterJinmao) |
| | | { |
| | | btnName.TextID = StringId.NewEnergy; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new InverterJinmaoPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | break; |
| | | case ShowFunction.VideoDoorLock: |
| | | //萤石视频门锁 |
| | |
| | | && ShowFunction.VideoIntercom != item |
| | | && ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Series != item |
| | | && ShowFunction.Acst != item) |
| | | && ShowFunction.Acst != item && ShowFunction.InverterJinmao != item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = UserInfo.Current.userName// string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName |
| | | Text = UserInfo.Current.userName // string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName |
| | | }; |
| | | personalInfoView.AddChidren(btnUserName); |
| | | if (!string.IsNullOrEmpty( UserInfo.Current.userName) && UserInfo.Current.userName == UserInfo.Current.AccountString) |
| | | if (!string.IsNullOrEmpty(UserInfo.Current.userName) && UserInfo.Current.userName == UserInfo.Current.AccountString) |
| | | { |
| | | btnUserName.Text = Language.StringByID(StringId.UsersWhoNameIsEmpty); |
| | | } |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = UserInfo.Current.AccountString |
| | | Text = UserInfo.Current.AccountString |
| | | }; |
| | | personalInfoView.AddChidren(btnEmail); |
| | | |
| | |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | Radius = (uint)Application.GetMinRealAverage(42), |
| | | ImagePath = UserInfo.Current.headImagePagePath |
| | | ImagePath = UserInfo.Current.headImagePagePath |
| | | }; |
| | | bodyView.AddChidren(userHeadImageView); |
| | | //if ( UserInfo.Current.headImagePageBytes==null) |
| | |
| | | #endregion |
| | | |
| | | //体验模式 |
| | | if(MainPage.NoLoginMode) |
| | | if (MainPage.NoLoginMode) |
| | | { |
| | | Button btnExit = new Button() |
| | | { |
| | |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | if(Language.CurrentLanguage =="Chinese") |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnExit.Text = "退出"; |
| | | } |
| | |
| | | BackgroundImagePath = "PersonalCenter/UserTypebg.png", |
| | | }; |
| | | residenceInfoView.AddChidren(userTypeView); |
| | | if (Language.CurrentLanguage != "Chinese" )//&& !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | if (Language.CurrentLanguage != "Chinese")//&& !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | userTypeView.X = Application.GetRealWidth(200); |
| | | userTypeView.Width = Application.GetRealWidth(180); |
| | |
| | | #endregion |
| | | |
| | | #region Siri |
| | | #if __IOS__ |
| | | #if __IOS__ |
| | | //if (Application.PhoneType >= 12) |
| | | { |
| | | supportViewCellCount++; |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize |
| | | }; |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnSiriText.Text = "Siri快捷方式"; |
| | | }else |
| | | } |
| | | else |
| | | { |
| | | btnSiriText.Text = "Siri Shortcut"; |
| | | } |
| | |
| | | siriView.AddChidren(btnSiriText); |
| | | |
| | | |
| | | btnSiriText.MouseUpEventHandler = (sender, e) => { |
| | | var ddd =new Other.SkipControl(); |
| | | btnSiriText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var ddd = new Other.SkipControl(); |
| | | ddd.SkipSiriView(); |
| | | }; |
| | | |
| | |
| | | }; |
| | | siriView.AddChidren(btnSmartSpeakerViewLine); |
| | | } |
| | | #endif |
| | | #endif |
| | | #endregion |
| | | |
| | | #region 获取支持 |
| | |
| | | /// </summary> |
| | | public void InitView() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.StatisticalChart24Hour)).LoadTopView(); |
| | | var topview = new TopViewDiv(bodyView, Language.StringByID(StringId.StatisticalChart24Hour)); |
| | | topview.maginY = 10; |
| | | topview.LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | var contentView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Y = Application.GetRealHeight(74), |
| | | Height = Application.GetRealHeight(603), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | |
| | | |
| | | #if DEBUG |
| | | |
| | | //List<string> vs = new List<string>() { |
| | | // "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | // }; |
| | | //brokenLine.InitXdataText(vs); |
| | | //brokenLine.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | // new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | //}, "#FF9D54"); |
| | | //brokenLine.yTitle = "(℃)"; |
| | | //brokenLine.xTitle = ""; |
| | | ////if (curQueryType != "hour") |
| | | ////{ |
| | | //// brokenLine.xTitle = Language.StringByID(StringId.Date); |
| | | ////} |
| | | //var opString = brokenLine.InitOption(); |
| | | List<string> vs = new List<string>() { |
| | | "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | }; |
| | | brokenLine.InitXdataText(vs); |
| | | brokenLine.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | }, "#FF9D54"); |
| | | brokenLine.yTitle = "(℃)"; |
| | | brokenLine.xTitle = ""; |
| | | //if (curQueryType != "hour") |
| | | //{ |
| | | // brokenLine.xTitle = Language.StringByID(StringId.Date); |
| | | //} |
| | | var opString = brokenLine.InitOption(); |
| | | |
| | | // myEchartsView_Line.ShowWithOption(opString); |
| | | myEchartsView_Line.ShowWithOptionJsonString(opString); |
| | | |
| | | #endif |
| | | LoadMothed_GetHistoryData(); |
| | | //LoadMothed_GetHistoryData(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | public void InitView() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Data)).LoadTopView(); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Data)) { maginY = 10 }.LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | FrameLayout tempView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Y = Application.GetRealHeight(74), |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | |
| | | TextID = StringId.TemperatureStatistics |
| | | }; |
| | | tempView.AddChidren(btnTempName); |
| | | btnTempName.MouseUpEventHandler = (sender, e) => { |
| | | btnTempName.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new CacWeekHistoryPage(device, "room_temp"); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.InitView(); |
| | |
| | | |
| | | FrameLayout humidityView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64 + 50), |
| | | Y = Application.GetRealHeight(74 + 50), |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | |
| | | TextID = StringId.HumidityStatistics |
| | | }; |
| | | humidityView.AddChidren(btnHumidityName); |
| | | btnHumidityName.MouseUpEventHandler = (sender, e) => { |
| | | btnHumidityName.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new CacWeekHistoryPage(device, "room_humidity"); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.InitView(); |
| | |
| | | { |
| | | if (showType == "room_temp") |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Temp)).LoadTopView(); |
| | | var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.Temp)); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | } |
| | | else |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Humidity)).LoadTopView(); |
| | | var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.Humidity)); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | FrameLayout contentView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(80), |
| | | Y = Application.GetRealHeight(90), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(482), |
| | |
| | | } |
| | | else |
| | | { |
| | | btnUnit.Text = Language.StringByID(StringId.Uint) + "%"; |
| | | btnUnit.Text = Language.StringByID(StringId.Uint) + ":%"; |
| | | } |
| | | dataView.AddChidren(btnUnit); |
| | | |
| | | #if DEBUG |
| | | //dataDic.Add("0201", 49); |
| | | //dataDic.Add("0202", 20); |
| | | //dataDic.Add("0203", 10); |
| | | //dataDic.Add("0204", 49); |
| | | //dataDic.Add("0205", 20); |
| | | //dataDic.Add("0206", 20); |
| | | //dataDic.Add("0207", 48); |
| | | dataDic.Add("0201", 49); |
| | | dataDic.Add("0202", 20); |
| | | dataDic.Add("0203", 10); |
| | | dataDic.Add("0204", 49); |
| | | dataDic.Add("0205", 20); |
| | | dataDic.Add("0206", 20); |
| | | dataDic.Add("0207", 48); |
| | | |
| | | //dataDic.Add("0201", -20); |
| | | //dataDic.Add("0202", -20); |
| | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | |
| | | #if DEBUG |
| | | if (MainPage.NoLoginMode) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | RefrshDataView(dataDic, dataShowView); |
| | | RefreshXtext(); |
| | | }); |
| | | return; |
| | | } |
| | | #endif |
| | | var revertObj = new HttpServerRequest().GetSensorHistory("week", device.deviceId, showType); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | cv.InitView(); |
| | | dataShowView.AddChidren(cv); |
| | | cv.Clicker(); |
| | | |
| | | |
| | | valueIndex++; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | class DataItemView : FrameLayout |
| | |
| | | |
| | | Button btnValue = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(18), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(30), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = 0xFF43425D, |
| | |
| | | } |
| | | Width = Application.GetRealWidth(39); |
| | | Height = Application.GetRealHeight((int)(value * 3 + 30)); |
| | | |
| | | ScrollEnabled = false; |
| | | } |
| | | |
| | | public void InitView() |
| | |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | |
| | | public class VerticalScrolViewLayoutJinmao : VerticalScrolViewLayout |
| | | { |
| | | public VerticalScrolViewLayoutJinmao() |
| | | { |
| | | #if __IOS__ |
| | | try |
| | | { |
| | | //自动偏移取消 |
| | | if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) |
| | | { |
| | | (this.uiView as UIKit.UIScrollView).ContentInsetAdjustmentBehavior = UIKit.UIScrollViewContentInsetAdjustmentBehavior.Never; |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log("error", "金茂iOS 滚动容器偏移值设置异常:" + ex.Message); |
| | | } |
| | | #endif |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绿建科技系统 |
| | |
| | | { |
| | | static AcstParentPage basePage; |
| | | |
| | | VerticalScrolViewLayout contentView; |
| | | VerticalScrolViewLayoutJinmao contentView; |
| | | |
| | | string helloText = "上午好"; |
| | | |
| | |
| | | /// </summary> |
| | | Dictionary<string, AcstSubControlView> subViewList; |
| | | |
| | | |
| | | Button btnWorkSceneControl; |
| | | |
| | | Button btnModeControl; |
| | | Button btnPowerControl; |
| | | |
| | |
| | | this.function = FunctionList.List.GetAcstParentList()[0]; |
| | | this.BackgroundColor = CSS.CSS_Color.BackgroundColor; |
| | | //this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | contentView = new VerticalScrolViewLayout() { |
| | | contentView = new VerticalScrolViewLayoutJinmao() |
| | | { |
| | | Height = Application.GetRealHeight(667 - 56), |
| | | VerticalScrollBarEnabled = false, |
| | | }; |
| | | this.AddChidren(contentView); |
| | | basePage.AddChidren(contentView); |
| | | |
| | | |
| | | subViewList = new Dictionary<string, AcstSubControlView>(); |
| | | } |
| | | /// <summary> |
| | |
| | | switch (temp.GetAttrState("mode")) |
| | | { |
| | | case "cool"://制冷 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeCoolIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeCoolIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeCoolIcon2.png"; |
| | | break; |
| | | case "heat"://制热 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHeatIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHeatIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeHeatIcon2.png"; |
| | | break; |
| | | case "fan"://通风 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeFanIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeFanIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeFanIcon2.png"; |
| | | break; |
| | | case "dry"://除湿 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeDeHumiIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeDeHumiIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeDeHumiIcon2.png"; |
| | | break; |
| | | case "humidity"://加湿 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHumiIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHumiIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeHumiIcon2.png"; |
| | | break; |
| | | case "heat_humidity"://制热加湿 |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHeatHumiIcon2.png"; |
| | | basePage.btnModeControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeHeatHumiIcon2.png"; |
| | | basePage.btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/ModeHeatHumiIcon2.png"; |
| | | break; |
| | | } |
| | | switch (temp.GetAttrState("scene")) |
| | | { |
| | | case "at_home"://在家 |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneAtHome2.png"; |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneAtHome2.png"; |
| | | basePage.btnWorkSceneControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/SceneAtHome2.png"; |
| | | break; |
| | | case "leave_home"://离家 |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneAwayHomeIcon2.png"; |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneAwayHomeIcon2.png"; |
| | | basePage.btnWorkSceneControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/SceneAwayHomeIcon2.png"; |
| | | break; |
| | | case "sleep"://睡眠 |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneSleepIcon2.png"; |
| | | basePage.btnWorkSceneControl.UnSelectedImagePath = "FunctionIcon/Acst/grey/SceneSleepIcon2.png"; |
| | | basePage.btnWorkSceneControl.SelectedImagePath = $"FunctionIcon/Acst/{basePage.imageFolder}/SceneSleepIcon2.png"; |
| | | break; |
| | | } |
| | | basePage.btnModeControl.IsSelected = basePage.btnWorkSceneControl.IsSelected = basePage.btnPowerControl.IsSelected = temp.GetAttrState("on_off") == "on"; |
| | | }); |
| | | }catch (Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("科技系统更新数据失败"); |
| | | MainPage.Log("科技系统更新数据失败:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新子控信息 |
| | |
| | | basePage.subViewList.TryGetValue(temp.sid, out view); |
| | | if (view != null) |
| | | { |
| | | view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%"; |
| | | view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°"; |
| | | view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on"; |
| | | if (temp.spk == SPK.AcstSub) |
| | | { |
| | | view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%"; |
| | | view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°"; |
| | | view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on"; |
| | | } |
| | | else if (temp.spk == SPK.WaterHeaterJinmao) |
| | | { |
| | | view.btnSubTempValues.Text = temp.GetAttrState(WaterHeaterJinmao_AttrEnum.temp.ToString()) + "°"; |
| | | view.btnSubPower.IsSelected = temp.GetAttrState(WaterHeaterJinmao_AttrEnum.on_off.ToString()) == "on"; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex ) { |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"科技系统更新异常1:{ex.Message}"); |
| | | } |
| | | }); |
| | |
| | | Button btnBackClick = new Button(); |
| | | backView.AddChidren(btnBackClick); |
| | | |
| | | btnBackClick.MouseUpEventHandler = (sender, e) => { |
| | | btnBackClick.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | this.RemoveFromParent(); |
| | | }; |
| | | |
| | |
| | | { |
| | | tempValues = tempValues.Remove(tempValues.IndexOf('.'), tempValues.Length - tempValues.IndexOf('.')); |
| | | } |
| | | sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempValues, "°","", Language.StringByID(StringId.Temp)); |
| | | sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempValues, "°", "", Language.StringByID(StringId.Temp)); |
| | | } |
| | | if (humiObj != null) |
| | | { |
| | |
| | | { |
| | | humiValues = humiValues.Remove(humiValues.IndexOf('.'), humiValues.Length - humiValues.IndexOf('.')); |
| | | } |
| | | sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiValues , "%", "", Language.StringByID(StringId.Humidity)); |
| | | sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiValues, "%", "", Language.StringByID(StringId.Humidity)); |
| | | } |
| | | if (pm25Obj != null) |
| | | { |
| | |
| | | |
| | | var subTitleView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54-11), |
| | | Height = Application.GetRealHeight(54 - 11), |
| | | }; |
| | | contentView.AddChidren(subTitleView); |
| | | |
| | |
| | | }; |
| | | subTitleView.AddChidren(btnCollection); |
| | | //收藏 |
| | | btnCollection.MouseUpEventHandler = (sender, e) => { |
| | | btnCollection.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | function.collect = !function.collect; |
| | | btnCollection.IsSelected = function.collect; |
| | | |
| | |
| | | #if DEBUG |
| | | System.Threading.Thread.Sleep(200); |
| | | #endif |
| | | |
| | | foreach (var sub in FunctionList.List.GetAcstSubList()) |
| | | var showList = FunctionList.List.GetAcstSubList(); |
| | | showList.AddRange(FunctionList.List.GetWaterHeaterJinmaoList()); |
| | | foreach (var sub in showList) |
| | | { |
| | | if (subViewList.ContainsKey(sub.sid)) |
| | | { |
| | |
| | | subFunctionListView = new HorizontalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(93), |
| | | ScrollEnabled = false, |
| | | }; |
| | | contentView.AddChidren(subFunctionListView); |
| | | subFunctionListView.AddChidren(new Button { Width = Application.GetRealWidth(9) }); |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | subFunctionCount++; |
| | | subFunctionCount++; |
| | | }); |
| | | |
| | | System.Threading.Thread.Sleep(10); |
| | | } |
| | | } |
| | | catch { } |
| | | finally{ |
| | | |
| | | finally |
| | | { |
| | | |
| | | } |
| | | }).Start(); |
| | | #endregion |
| | |
| | | #region 底部控制栏 |
| | | var bottomView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(667 - 56), |
| | | Height = Application.GetRealHeight(56), |
| | | Y = Application.GetRealHeight(667 - 66), |
| | | Height = Application.GetRealHeight(66+16), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(16), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | this.AddChidren(bottomView); |
| | | |
| | |
| | | |
| | | var dialogView = new FrameLayout(); |
| | | dialog.AddChidren(dialogView); |
| | | dialogView.MouseUpEventHandler = (sender, e) => { |
| | | dialogView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | var dialogContentView = new VerticalScrolViewLayout() { |
| | | var dialogContentView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(34), |
| | | Y = Application.GetRealHeight(291), |
| | | Width = Application.GetRealWidth(148), |
| | |
| | | }; |
| | | dialogView.AddChidren(dialogContentView); |
| | | |
| | | var titleView = new FrameLayout() { |
| | | var titleView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(2), |
| | | Y = Application.GetRealHeight(3), |
| | | Width = Application.GetRealWidth(144), |
| | |
| | | |
| | | btnWorkSceneControl.MouseUpEventHandler = (sender2, e2) => |
| | | { |
| | | //if (function.trait_on_off.state == "off") |
| | | //{ |
| | | // return; |
| | | //} |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | var dialogView = new FrameLayout(); |
| | | dialog.AddChidren(dialogView); |
| | | dialogView.MouseUpEventHandler = (sender, e) => { |
| | | dialogView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | |
| | | public string Tag; |
| | | public string unitString; |
| | | |
| | | public SensorDiyView(HorizontalScrolViewLayout view,uint color,string value,string unitStr, string unitStr2, string text,int setWidth = 60) |
| | | public SensorDiyView(HorizontalScrolViewLayout view, uint color, string value, string unitStr, string unitStr2, string text, int setWidth = 60) |
| | | { |
| | | unitString = unitStr; |
| | | if (string.IsNullOrEmpty(value)) |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFF949AA5, |
| | | TextSize = 12, |
| | | Text = text , |
| | | Text = text, |
| | | }; |
| | | contentView.AddChidren(btnText); |
| | | |
| | | if(!string.IsNullOrEmpty(unitStr2)) |
| | | if (!string.IsNullOrEmpty(unitStr2)) |
| | | { |
| | | btnText.Text += "(" + unitStr2 + ")"; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public void UpdateValue(string value,bool isInt) |
| | | public void UpdateValue(string value, bool isInt) |
| | | { |
| | | if (value.Contains(".") && isInt) |
| | | { |
| | |
| | | public Button btnSubPower; |
| | | public string Tag; |
| | | |
| | | public AcstSubControlView(Function sub, HorizontalScrolViewLayout subFunctionListView,string imageFolder) |
| | | public AcstSubControlView(Function sub, HorizontalScrolViewLayout subFunctionListView, string imageFolder) |
| | | { |
| | | Tag = sub.sid; |
| | | |
| | |
| | | Width = Application.GetRealWidth(35), |
| | | TextColor = 0xFF1b3035, |
| | | TextSize = 10, |
| | | Text = sub.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°C", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | subFunctionView.AddChidren(btnSubTempValues); |
| | | |
| | | Button btnSubHumidityIcon = new Button() |
| | | { |
| | | X = btnSubTempValues.Right + Application.GetRealWidth(5), |
| | | Y = Application.GetRealHeight(47 + 11), |
| | | Width = Application.GetMinRealAverage(11), |
| | | Height = Application.GetMinRealAverage(11), |
| | | UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", |
| | | }; |
| | | subFunctionView.AddChidren(btnSubHumidityIcon); |
| | | |
| | | btnSubHumidityValues = new TextButton() |
| | | { |
| | | X = btnSubHumidityIcon.Right, |
| | | Y = Application.GetRealHeight(45 + 11), |
| | | Height = Application.GetRealHeight(14), |
| | | Width = Application.GetRealWidth(35), |
| | | TextColor = 0xFF1b3053, |
| | | TextSize = 10, |
| | | Text = sub.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | subFunctionView.AddChidren(btnSubHumidityValues); |
| | | |
| | | btnSubPower = new Button() |
| | | { |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | subFunctionView.AddChidren(btnSubPower); |
| | | btnSubPower.MouseUpEventHandler = (sender, e) => { |
| | | btnSubPower.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnSubPower.IsSelected = !btnSubPower.IsSelected; |
| | | string onoff = btnSubPower.IsSelected ? "on" : "off"; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | |
| | | Control.Ins.SendWriteCommand(sub, d); |
| | | }; |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | var page = new AcstSubPage(sub,imageFolder); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(()=> { |
| | | btnRoomInfo.Text = sub.name; |
| | | }); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | if (sub.spk == SPK.AcstSub) |
| | | { |
| | | btnSubTempValues.Text = sub.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°C"; |
| | | Button btnSubHumidityIcon = new Button() |
| | | { |
| | | X = btnSubTempValues.Right + Application.GetRealWidth(5), |
| | | Y = Application.GetRealHeight(47 + 11), |
| | | Width = Application.GetMinRealAverage(11), |
| | | Height = Application.GetMinRealAverage(11), |
| | | UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", |
| | | }; |
| | | subFunctionView.AddChidren(btnSubHumidityIcon); |
| | | |
| | | btnRoomInfo.MouseUpEventHandler = eventHandler; |
| | | btnSubHumidityIcon.MouseUpEventHandler = eventHandler; |
| | | btnSubHumidityValues.MouseUpEventHandler = eventHandler; |
| | | btnSubTempIcon.MouseUpEventHandler = eventHandler; |
| | | btnSubTempValues.MouseUpEventHandler = eventHandler; |
| | | subFunctionView.MouseUpEventHandler = eventHandler; |
| | | btnSubHumidityValues = new TextButton() |
| | | { |
| | | X = btnSubHumidityIcon.Right, |
| | | Y = Application.GetRealHeight(45 + 11), |
| | | Height = Application.GetRealHeight(14), |
| | | Width = Application.GetRealWidth(35), |
| | | TextColor = 0xFF1b3053, |
| | | TextSize = 10, |
| | | Text = sub.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | subFunctionView.AddChidren(btnSubHumidityValues); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstSubPage(sub, imageFolder); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(() => |
| | | { |
| | | btnRoomInfo.Text = sub.name; |
| | | }); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | btnRoomInfo.MouseUpEventHandler = eventHandler; |
| | | btnSubTempIcon.MouseUpEventHandler = eventHandler; |
| | | btnSubTempValues.MouseUpEventHandler = eventHandler; |
| | | subFunctionView.MouseUpEventHandler = eventHandler; |
| | | btnSubHumidityIcon.MouseUpEventHandler = eventHandler; |
| | | btnSubHumidityValues.MouseUpEventHandler = eventHandler; |
| | | } |
| | | else if (sub.spk == SPK.WaterHeaterJinmao) |
| | | { |
| | | btnSubTempValues.Text = sub.GetAttrState(WaterHeaterJinmao_AttrEnum.temp.ToString()) + "°C"; |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new WaterHeaterJinmaoPage(sub); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(() => |
| | | { |
| | | btnRoomInfo.Text = sub.name; |
| | | }); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | btnRoomInfo.MouseUpEventHandler = eventHandler; |
| | | btnSubTempIcon.MouseUpEventHandler = eventHandler; |
| | | btnSubTempValues.MouseUpEventHandler = eventHandler; |
| | | subFunctionView.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | public Button btnText; |
| | | |
| | | public IconButton(string iconPath,string iconPath2,string text,uint color,bool isSelect) |
| | | public IconButton(string iconPath, string iconPath2, string text, uint color, bool isSelect) |
| | | { |
| | | view = this; |
| | | view.Width = Application.GetRealWidth(144); |
| | |
| | | }; |
| | | view.AddChidren(btnText); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public void Click(Action action) |
| | | { |
| | | view.MouseUpEventHandler = (sender, e) => { |
| | | view.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | action(); |
| | | }; |
| | | btnText.MouseUpEventHandler = (sender, e) => { |
| | | btnText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | action(); |
| | | }; |
| | | btnIcon.MouseUpEventHandler = (sender, e) => { |
| | | btnIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | action(); |
| | | }; |
| | | } |
| | |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, function.name).LoadTopView(); |
| | | var topView = new TopViewDiv(bodyView, function.name); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | //var contentView = new FrameLayout() |
| | |
| | | |
| | | #if DEBUG |
| | | |
| | | //List<string> vs = new List<string>() { |
| | | // "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | // }; |
| | | //tempEchartOption.InitXdataText(vs); |
| | | //tempEchartOption.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | // new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | //}, "#FF9D54"); |
| | | //tempEchartOption.yTitle = "温度 (°)"; |
| | | //tempEchartOption.xTitle = ""; |
| | | //var opString = tempEchartOption.InitOption(); |
| | | //tempEchartsView.ShowWithOption(opString); |
| | | List<string> vs = new List<string>() { |
| | | "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | }; |
| | | tempEchartOption.InitXdataText(vs); |
| | | tempEchartOption.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | }, "#FF9D54"); |
| | | tempEchartOption.yTitle = "温度 (°)"; |
| | | tempEchartOption.xTitle = ""; |
| | | var opString = tempEchartOption.InitOption(); |
| | | tempEchartsView.ShowWithOption(opString); |
| | | |
| | | |
| | | |
| | | |
| | | //List<string> vs2 = new List<string>() { |
| | | // "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | // }; |
| | | //humiEchartsOption.InitXdataText(vs2); |
| | | //humiEchartsOption.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | // new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | // new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | //}, "#FF9D54"); |
| | | //humiEchartsOption.yTitle = "湿度 (%)"; |
| | | //humiEchartsOption.xTitle = ""; |
| | | //var opString2 = humiEchartsOption.InitOption(); |
| | | List<string> vs2 = new List<string>() { |
| | | "1","2","3","4","5","6","7","8","9","10","11","12","13","14" |
| | | }; |
| | | humiEchartsOption.InitXdataText(vs2); |
| | | humiEchartsOption.InitYdataText("yData", new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "-41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "-31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "-23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "-11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "-21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" } |
| | | }, "#FF9D54"); |
| | | humiEchartsOption.yTitle = "湿度 (%)"; |
| | | humiEchartsOption.xTitle = ""; |
| | | var opString2 = humiEchartsOption.InitOption(); |
| | | |
| | | //humiEchartsView.ShowWithOption(opString2); |
| | | humiEchartsView.ShowWithOption(opString2); |
| | | |
| | | #endif |
| | | |
| | |
| | | Text = function.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString(),"---"), |
| | | TextAlignment = TextAlignment.TopRight, |
| | | }; |
| | | |
| | | #if __IOS__ |
| | | btnHumiValues.Width = btnTempValues.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | btnHumiValues.Width = btnTempValues.GetTextWidth(); |
| | | #endif |
| | | btnHumiValues.Gravity = Gravity.CenterHorizontal; |
| | | humiValuesView.AddChidren(btnHumiValues); |
| | | var btnHumiValuesUint = new Button() |
New file |
| | |
| | | |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class InverterJinmaoHistroyPage : FrameLayout |
| | | { |
| | | InverterJinmaoHistroyPage bodyView; |
| | | Function device; |
| | | |
| | | |
| | | /// <summary> |
| | | /// echart容器 |
| | | /// </summary> |
| | | MyEchartsViewOn tempEchartsView; |
| | | |
| | | public InverterJinmaoHistroyPage(Function function) |
| | | { |
| | | bodyView = this; |
| | | device = function; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | var topView = new TopViewDiv(bodyView, "能源分析"); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(74 + 16), |
| | | Height = Application.GetRealHeight(Application.DesignHeight - 74), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | #region 发电量 |
| | | var infoView1 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(382), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(infoView1); |
| | | |
| | | #region 时间条件选择 |
| | | var infoView1_DateView = new HorizontalScrolViewLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343 - 34), |
| | | Height = Application.GetRealWidth(26), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(17), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | ScrollEnabled = false, |
| | | }; |
| | | infoView1.AddChidren(infoView1_DateView); |
| | | |
| | | var infoView1_Date_Day = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "日", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = true, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Day); |
| | | |
| | | |
| | | var infoView1_Date_Month = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "月", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Month); |
| | | |
| | | |
| | | var infoView1_Date_Year = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "年", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Year); |
| | | |
| | | var infoView1_DateInfoView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(55), |
| | | }; |
| | | infoView1.AddChidren(infoView1_DateInfoView); |
| | | |
| | | var infoView1_DateInfo_PreIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/PreIcon.png", |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_PreIconButton); |
| | | |
| | | var infoView1_DateInfo_PreClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_PreClickButton); |
| | | |
| | | var infoView1_DateInfo_DateTextButton = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "2024-8-12", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextSize = 16, |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_DateTextButton); |
| | | |
| | | |
| | | var infoView1_DateInfo_NextIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 18 - 6), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/NextIcon.png", |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_NextIconButton); |
| | | |
| | | var infoView1_DateInfo_NextClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_NextClickButton); |
| | | |
| | | #endregion |
| | | |
| | | #region 数据图表 |
| | | MyEchartsViewOn infoView1_EchartsView = new MyEchartsViewOn() |
| | | { |
| | | Y = Application.GetRealWidth(101), |
| | | Height = Application.GetRealWidth(246), |
| | | }; |
| | | infoView1.AddChidren(infoView1_EchartsView); |
| | | |
| | | var echartOption = new EchartsOption_Histogram(); |
| | | echartOption.xTitle = "时间"; |
| | | echartOption.yTitle = "温度(℃)"; |
| | | echartOption.InitXdataText(new List<string>() |
| | | { |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24" |
| | | }); |
| | | echartOption.InitYdataText(new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "15", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "16", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "17", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "18", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "19", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "20", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "21", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "22", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "23", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "24", fieldValue= "21" }, |
| | | }); |
| | | var ddd = echartOption.InitOption(); |
| | | infoView1_EchartsView.ShowWithOption(ddd); |
| | | |
| | | infoView1.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(35), |
| | | Y = Application.GetRealWidth(340), |
| | | Text = "发电量", |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFC0C7D4 |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(16) |
| | | }); |
| | | |
| | | #region 用电量 |
| | | var infoView2 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(382), |
| | | Y = Application.GetRealHeight(16) + infoView1.Bottom, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(infoView2); |
| | | |
| | | #region 时间条件选择 |
| | | var infoView2_DateView = new HorizontalScrolViewLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343 - 34), |
| | | Height = Application.GetRealWidth(26), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(17), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | ScrollEnabled = false, |
| | | }; |
| | | infoView2.AddChidren(infoView2_DateView); |
| | | |
| | | var infoView2_Date_Day = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "日", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = true, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Day); |
| | | |
| | | |
| | | var infoView2_Date_Month = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "月", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Month); |
| | | |
| | | |
| | | var infoView2_Date_Year = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "年", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Year); |
| | | |
| | | var infoView2_DateInfoView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(55), |
| | | }; |
| | | infoView2.AddChidren(infoView2_DateInfoView); |
| | | |
| | | var infoView2_DateInfo_PreIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/PreIcon.png", |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_PreIconButton); |
| | | |
| | | var infoView2_DateInfo_PreClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_PreClickButton); |
| | | |
| | | var infoView2_DateInfo_DateTextButton = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "2024-8-12", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextSize = 16, |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_DateTextButton); |
| | | |
| | | |
| | | var infoView2_DateInfo_NextIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 18 - 6), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/NextIcon.png", |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_NextIconButton); |
| | | |
| | | var infoView2_DateInfo_NextClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_NextClickButton); |
| | | |
| | | #endregion |
| | | |
| | | #region 数据图表 |
| | | MyEchartsViewOn infoView2_EchartsView = new MyEchartsViewOn() |
| | | { |
| | | Y = Application.GetRealWidth(101), |
| | | Height = Application.GetRealWidth(246), |
| | | }; |
| | | infoView2.AddChidren(infoView2_EchartsView); |
| | | |
| | | var echartOption2 = new EchartsOption_Histogram(); |
| | | echartOption2.xTitle = "时间"; |
| | | echartOption2.yTitle = "温度(℃)"; |
| | | echartOption2.InitXdataText(new List<string>() |
| | | { |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24" |
| | | }); |
| | | echartOption2.InitYdataText(new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "15", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "16", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "17", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "18", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "19", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "20", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "21", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "22", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "23", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "24", fieldValue= "21" }, |
| | | }); |
| | | infoView2_EchartsView.ShowWithOption(echartOption2.InitOption()); |
| | | |
| | | infoView2.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(35), |
| | | Y = Application.GetRealWidth(340), |
| | | Text = "用电量", |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFC0C7D4 |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(26) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class InverterJinmaoPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | Function function; |
| | | |
| | | public InverterJinmaoPage() |
| | | { |
| | | bodyView = this; |
| | | try |
| | | { |
| | | function = FunctionList.List.GetInverterJinmaoList()[0]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"{ex.Message}"); |
| | | this.RemoveFromParent(); |
| | | } |
| | | BackgroundColor = CSS_Color.BackgroundColor; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.NewEnergy)) { maginY = 10 }.LoadTopView(); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(74), |
| | | Height = Application.GetRealHeight(Application.DesignHeight - 74), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(16), |
| | | }); |
| | | |
| | | #region 发电量 用电量 |
| | | var electricityQuantityView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(99), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | contentView.AddChidren(electricityQuantityView); |
| | | |
| | | #region 发电量 Electricity generation |
| | | var electricityGenerationView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(181), |
| | | Height = Application.GetRealWidth(99), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/ElectricityGenerationBg.png" |
| | | }; |
| | | electricityQuantityView.AddChidren(electricityGenerationView); |
| | | |
| | | var electricityGeneration_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(14), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/ElectricityGenerationIcon.png" |
| | | }; |
| | | electricityQuantityView.AddChidren(electricityGeneration_IconButton); |
| | | |
| | | var electricityGeneration_TextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(32), |
| | | Y = Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(140), |
| | | Height = Application.GetRealWidth(20), |
| | | Text = "今日发电量", |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | electricityGenerationView.AddChidren(electricityGeneration_TextButton); |
| | | |
| | | var electricityGeneration_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(34), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_today.ToString()), |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityGenerationView.AddChidren(electricityGeneration_ValuesButton); |
| | | |
| | | #if __IOS__ |
| | | electricityGeneration_ValuesButton.TextAlignment = TextAlignment.TopLeft; |
| | | electricityGeneration_ValuesButton.Width = electricityGeneration_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | electricityGeneration_ValuesButton.TextAlignment = TextAlignment.BottomLeft; |
| | | electricityGeneration_ValuesButton.Width = electricityGeneration_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | var electricityGeneration_UintButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(41), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | electricityGeneration_UintButton.X = electricityGeneration_ValuesButton.Right; |
| | | electricityGenerationView.AddChidren(electricityGeneration_UintButton); |
| | | |
| | | var electricityGeneration_TotalValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(69), |
| | | Height = Application.GetRealWidth(18), |
| | | Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString()), |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //IsBold = true, |
| | | }; |
| | | electricityGenerationView.AddChidren(electricityGeneration_TotalValuesButton); |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 用电量 Electricity consumption |
| | | var electricityConsumptionView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(178-16), |
| | | Width = Application.GetRealWidth(181), |
| | | Height = Application.GetRealWidth(99), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/ElectricityConsumptionBg.png" |
| | | }; |
| | | electricityQuantityView.AddChidren(electricityConsumptionView); |
| | | |
| | | var electricityConsumption_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(155), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/ElectricityConsumptionIcon.png" |
| | | }; |
| | | electricityConsumptionView.AddChidren(electricityConsumption_IconButton); |
| | | |
| | | var electricityConsumption_TextButton = new Button() |
| | | { |
| | | //X = Application.GetRealWidth(181 - 32), |
| | | Y = Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(181 - 32), |
| | | Height = Application.GetRealWidth(20), |
| | | Text = "今日用电量", |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | electricityConsumptionView.AddChidren(electricityConsumption_TextButton); |
| | | |
| | | |
| | | var electricityConsumption_UintButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(41), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | }; |
| | | electricityConsumptionView.AddChidren(electricityConsumption_UintButton); |
| | | #if __IOS__ |
| | | electricityConsumption_UintButton.Width = electricityConsumption_UintButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | electricityConsumption_UintButton.Width = electricityConsumption_UintButton.GetTextWidth(); |
| | | #endif |
| | | electricityConsumption_UintButton.X = Application.GetRealWidth(181 - 12) - electricityConsumption_UintButton.Width; |
| | | |
| | | var electricityConsumption_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(81 - 12) - electricityConsumption_UintButton.Width, |
| | | Y = Application.GetRealWidth(34), |
| | | Height = Application.GetRealWidth(53), |
| | | Width = Application.GetRealWidth(100), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString()), |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 18, |
| | | TextAlignment = TextAlignment.TopRight, |
| | | IsBold = true, |
| | | }; |
| | | electricityConsumptionView.AddChidren(electricityConsumption_ValuesButton); |
| | | |
| | | |
| | | var electricityConsumption_TotalValuesButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(69), |
| | | Height = Application.GetRealWidth(18), |
| | | Width = Application.GetRealWidth(181-12), |
| | | Text = "累计用电量:" + function.GetAttrState(InverterJinmao_AttrEnum.load_electricity.ToString()), |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | //IsBold = true, |
| | | }; |
| | | electricityConsumptionView.AddChidren(electricityConsumption_TotalValuesButton); |
| | | |
| | | #endregion |
| | | |
| | | var goHistroyButton = new Button(); |
| | | electricityQuantityView.AddChidren(goHistroyButton); |
| | | goHistroyButton.MouseUpEventHandler = (sender, e) => { |
| | | var page = new InverterJinmaoHistroyPage(function); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | #endregion |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8), |
| | | }); |
| | | #region 光伏运行状态 |
| | | var runStatus_TitleButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(47), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "光伏运行状态", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | }; |
| | | contentView.AddChidren(runStatus_TitleButton); |
| | | |
| | | #region 发电量 electricity generation |
| | | var electricityGenerationStatusView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(253), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(electricityGenerationStatusView); |
| | | |
| | | var electricityGenerationStatus_InfoView = new FrameLayout() |
| | | { |
| | | X = 0 - Application.GetRealWidth(14), |
| | | Y = Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(68 + 14), |
| | | Height = Application.GetRealWidth(28), |
| | | BackgroundColor = 0x154484F4, |
| | | Radius = (uint)Application.GetRealHeight(14), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(electricityGenerationStatus_InfoView); |
| | | |
| | | var runStatus_Info_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png", |
| | | }; |
| | | electricityGenerationStatus_InfoView.AddChidren(runStatus_Info_IconButton); |
| | | |
| | | var runStatus_Info_TextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14 + 4 + 12), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = 0xFF4484F4, |
| | | Text = "运行", |
| | | }; |
| | | electricityGenerationStatus_InfoView.AddChidren(runStatus_Info_TextButton); |
| | | |
| | | var powerGenerationView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(151), |
| | | Height = Application.GetRealWidth(151), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgRun.png" |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGenerationView); |
| | | |
| | | var powerGeneration_ValuesButton = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(32), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | }; |
| | | powerGenerationView.AddChidren(powerGeneration_ValuesButton); |
| | | |
| | | var powerGeneration_TextButton = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(78), |
| | | //Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = "实时发电功率 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | powerGenerationView.AddChidren(powerGeneration_TextButton); |
| | | |
| | | |
| | | var powerGeneration_TodayValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_today.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_TodayValuesButton); |
| | | |
| | | var powerGeneration_TodayTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "今日发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_TodayTextButton); |
| | | |
| | | |
| | | var powerGeneration_MonthValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 105), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_month.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_MonthValuesButton); |
| | | |
| | | var powerGeneration_MonthTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 105), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本月发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_MonthTextButton); |
| | | |
| | | |
| | | var powerGeneration_YearValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 212), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_YearValuesButton); |
| | | |
| | | var powerGeneration_YearTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 212), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "总发电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityGenerationStatusView.AddChidren(powerGeneration_YearTextButton); |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(12), |
| | | }); |
| | | |
| | | #region 用电量状态 electricity usage status |
| | | var electricityUsageStatusView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(253), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(electricityUsageStatusView); |
| | | |
| | | var powerUsageView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(151), |
| | | Height = Application.GetRealWidth(151), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgDischarge.png" |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsageView); |
| | | |
| | | var powerUsage_ValuesButton = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(32), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | }; |
| | | powerUsageView.AddChidren(powerUsage_ValuesButton); |
| | | |
| | | var powerUsage_TextButton = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(78), |
| | | //Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = "实时用电功率 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | powerUsageView.AddChidren(powerUsage_TextButton); |
| | | |
| | | |
| | | var powerUsage_TodayValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton); |
| | | |
| | | var powerUsage_TodayTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "今日用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_TodayTextButton); |
| | | |
| | | |
| | | var powerUsage_MonthValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 105), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_month.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_MonthValuesButton); |
| | | |
| | | var powerUsage_MonthTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 105), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "本月用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_MonthTextButton); |
| | | |
| | | |
| | | var powerUsage_YearValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 212), |
| | | Y = Application.GetRealWidth(191), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(24), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity.ToString()), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_YearValuesButton); |
| | | |
| | | var powerUsage_YearTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 212), |
| | | Y = Application.GetRealWidth(220), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "总用电量 (kwh)", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_YearTextButton); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8) |
| | | }); |
| | | |
| | | #region 储能运行状态 Energy storage |
| | | var esRunStatus_TitleButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(47), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "储能运行状态", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | }; |
| | | contentView.AddChidren(esRunStatus_TitleButton); |
| | | |
| | | #region |
| | | var esStatusView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(194), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(esStatusView); |
| | | |
| | | var esStatus_InfoView = new FrameLayout() |
| | | { |
| | | X = 0 - Application.GetRealWidth(14), |
| | | Y = Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(68 + 14), |
| | | Height = Application.GetRealWidth(28), |
| | | BackgroundColor = 0x1500C22D, |
| | | Radius = (uint)Application.GetRealHeight(14), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | esStatusView.AddChidren(esStatus_InfoView); |
| | | |
| | | var esRunStatus_Info_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconCharg.png", |
| | | }; |
| | | esStatus_InfoView.AddChidren(esRunStatus_Info_IconButton); |
| | | |
| | | var esRunStatus_Info_TextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14 + 4 + 12), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = 0xFF00C22D, |
| | | Text = "充电", |
| | | }; |
| | | esStatus_InfoView.AddChidren(esRunStatus_Info_TextButton); |
| | | |
| | | var esRunStatus_BatteryValuesButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(18), |
| | | Height = Application.GetRealWidth(17), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.battery_soc.ToString()) + "%", |
| | | TextSize = 12, |
| | | TextColor = 0xFF00C22D, |
| | | }; |
| | | #if __IOS__ |
| | | esRunStatus_BatteryValuesButton.Width = esRunStatus_BatteryValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | esRunStatus_BatteryValuesButton.Width = esRunStatus_BatteryValuesButton.GetTextWidth(); |
| | | #endif |
| | | esRunStatus_BatteryValuesButton.X = Application.GetRealWidth(343 - 12) - esRunStatus_BatteryValuesButton.Width; |
| | | esStatusView.AddChidren(esRunStatus_BatteryValuesButton); |
| | | |
| | | var esRunStatus_BatteryIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 12 -20) - esRunStatus_BatteryValuesButton.Width, |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealWidth(20), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg.png", |
| | | }; |
| | | esStatusView.AddChidren(esRunStatus_BatteryIconButton); |
| | | |
| | | var esRunStatus_ValuesInfoView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(263), |
| | | Height = Application.GetRealWidth(134), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(40), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/EnergyStorageStatusBg.png", |
| | | }; |
| | | esStatusView.AddChidren(esRunStatus_ValuesInfoView); |
| | | |
| | | #region 实时充电功率 |
| | | var esRunStatus_ChargeValuesView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(2), |
| | | Width = Application.GetRealWidth(128), |
| | | Height = Application.GetRealWidth(128), |
| | | }; |
| | | esRunStatus_ValuesInfoView.AddChidren(esRunStatus_ChargeValuesView); |
| | | |
| | | var esRunStatus_ChargeValuesButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(32), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_charge_power.ToString()), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | }; |
| | | esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeValuesButton); |
| | | |
| | | var esRunStatus_ChargeTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(1), |
| | | Y = Application.GetRealWidth(76), |
| | | Height = Application.GetRealWidth(17), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "实时充电功率(kwh)", |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeTextButton); |
| | | #endregion |
| | | |
| | | #region 实时放电功率 |
| | | var esRunStatus_DischargeValuesView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(132), |
| | | Width = Application.GetRealWidth(128), |
| | | Height = Application.GetRealWidth(128), |
| | | }; |
| | | esRunStatus_ValuesInfoView.AddChidren(esRunStatus_DischargeValuesView); |
| | | |
| | | var esRunStatus_DischargeValuesButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(32), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_discharg_power.ToString()), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | }; |
| | | esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeValuesButton); |
| | | |
| | | var esRunStatus_DischargeTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(1), |
| | | Y = Application.GetRealWidth(76), |
| | | Height = Application.GetRealWidth(17), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "实时放电功率(kwh)", |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = 12, |
| | | }; |
| | | esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeTextButton); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8) |
| | | }); |
| | | |
| | | #region 社会贡献 Social contribution |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(100), |
| | | X = Application.GetRealWidth(16), |
| | | Text = "社会贡献", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true |
| | | }); |
| | | |
| | | var socialContributionView = new HorizontalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(142), |
| | | ScrollEnabled = false, |
| | | }; |
| | | contentView.AddChidren(socialContributionView); |
| | | |
| | | #region 节约标准煤 |
| | | var socialContribution_InfoView_1 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/SocialContributionInfoBg_Coal.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_1); |
| | | |
| | | var socialContribution_Info1_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/Inverter/SocialContributionInfoIcon_Coal.png" |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton); |
| | | |
| | | var socialContribution_Info1_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.coal.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton); |
| | | |
| | | var socialContribution_Info1_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "吨", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton); |
| | | |
| | | var socialContribution_Info1_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "节约标准煤", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_TipButton); |
| | | #endregion |
| | | |
| | | socialContributionView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region CO2减排量 |
| | | var socialContribution_InfoView_2 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_2.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_2); |
| | | |
| | | var socialContribution_Info2_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_2.png" |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton); |
| | | |
| | | var socialContribution_Info2_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.co2.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton); |
| | | |
| | | var socialContribution_Info2_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "吨", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton); |
| | | |
| | | var socialContribution_Info2_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "CO2减排量", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_TipButton); |
| | | #endregion |
| | | |
| | | socialContributionView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region 等效植树量 |
| | | var socialContribution_InfoView_3 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_3.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_3); |
| | | |
| | | var socialContribution_Info3_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_3.png" |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton); |
| | | |
| | | var socialContribution_Info3_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.trees.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton); |
| | | |
| | | var socialContribution_Info3_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "棵", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton); |
| | | |
| | | var socialContribution_Info3_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "等效植树量", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_TipButton); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class WaterHeaterJinmaoPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | VerticalScrolViewLayout contentView; |
| | | FrameLayout bottomView; |
| | | Function function; |
| | | |
| | | public WaterHeaterJinmaoPage(Function deviceFunction) |
| | | { |
| | | bodyView = this; |
| | | function = deviceFunction; |
| | | } |
| | | |
| | | public void LoadPage(Action action) |
| | | { |
| | | |
| | | var topView = new TopViewDiv(bodyView, function.name); |
| | | topView.LoadTopView_FunctionTop(function, action); |
| | | |
| | | |
| | | contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = topView.contentView.Height, |
| | | Height = Application.GetRealHeight(Application.DesignHeight - 94 - 5) - topView.contentView.Height, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | bottomView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(Application.DesignHeight - 94), |
| | | Height = Application.GetRealHeight(94 + 16), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(16), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | bodyView.AddChidren(bottomView); |
| | | |
| | | initContentView(); |
| | | initBottomView(); |
| | | Control.Ins.SendReadCommand(function); |
| | | } |
| | | /// <summary> |
| | | /// 加载内容区域 |
| | | /// </summary> |
| | | private void initContentView() |
| | | { |
| | | contentView.AddChidren(new Button() { Height = Application.GetRealHeight(16) }); |
| | | |
| | | #region 热水器状态 |
| | | var infoView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(181), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(infoView); |
| | | |
| | | var infoView_ModeFreeView = new FrameLayout() |
| | | { |
| | | X = 0 - Application.GetRealWidth(14), |
| | | Y = Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(68 + 14), |
| | | Height = Application.GetRealWidth(28), |
| | | BackgroundColor = 0x15FC9C04, |
| | | Radius = (uint)Application.GetRealHeight(14), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | infoView.AddChidren(infoView_ModeFreeView); |
| | | |
| | | var infoView_ModeFree_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/ModeFree_False.png", |
| | | }; |
| | | infoView_ModeFreeView.AddChidren(infoView_ModeFree_IconButton); |
| | | |
| | | var infoView_ModeFree_TextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 14 + 8 + 12), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = 0xFFFC9C04, |
| | | Text = "用电", |
| | | }; |
| | | infoView_ModeFreeView.AddChidren(infoView_ModeFree_TextButton); |
| | | |
| | | var infoView_Temp_View = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(133), |
| | | Height = Application.GetRealWidth(133), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/TempBg.png" |
| | | }; |
| | | infoView.AddChidren(infoView_Temp_View); |
| | | |
| | | var btnTempValues = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(34), |
| | | Gravity = Gravity.CenterVertical, |
| | | Height = Application.GetRealWidth(43), |
| | | IsBold = true, |
| | | TextSize = 32, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.TopCenter, |
| | | Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.temp.ToString(), "---"), |
| | | }; |
| | | #if __IOS__ |
| | | btnTempValues.Width = btnTempValues.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | btnTempValues.Width = btnTempValues.GetTextWidth(); |
| | | #endif |
| | | btnTempValues.Gravity = Gravity.CenterHorizontal; |
| | | infoView_Temp_View.AddChidren(btnTempValues); |
| | | var btnTempValuesUint = new Button() |
| | | { |
| | | X = btnTempValues.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(40), |
| | | Height = Application.GetRealWidth(66), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | Width = Application.GetRealWidth(30), |
| | | TextSize = 10, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "°C" |
| | | }; |
| | | infoView_Temp_View.AddChidren(btnTempValuesUint); |
| | | |
| | | var infoView_Temp_Text = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(80), |
| | | Height = Application.GetRealWidth(23), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | Text = "热水温度" |
| | | }; |
| | | infoView_Temp_View.AddChidren(infoView_Temp_Text); |
| | | |
| | | var infoView_HistoryButton = new Button(); |
| | | infoView_Temp_View.AddChidren(infoView_HistoryButton); |
| | | infoView_HistoryButton.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new WetarHeaterJinmaoHistoryPage(function); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 热水器模式 |
| | | var modeView = new HorizontalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(76), |
| | | ScrollEnabled = false, |
| | | }; |
| | | contentView.AddChidren(modeView); |
| | | |
| | | modeView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(16), |
| | | }); |
| | | |
| | | var mode_EconomicView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(165), |
| | | Height = Application.GetRealWidth(52), |
| | | Gravity = Gravity.CenterVertical, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0xFF00C22D, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | BackgroundColor = 0xFFEBFAEE |
| | | }; |
| | | modeView.AddChidren(mode_EconomicView); |
| | | |
| | | var mode_Economic_IconButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealWidth(20), |
| | | X = Application.GetRealWidth(53), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/Mode_Economic_On.png" |
| | | }; |
| | | mode_EconomicView.AddChidren(mode_Economic_IconButton); |
| | | |
| | | var mode_Economic_TextButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(80), |
| | | X = Application.GetRealWidth(73 + 8), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "节能", |
| | | }; |
| | | mode_EconomicView.AddChidren(mode_Economic_TextButton); |
| | | |
| | | modeView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(13), |
| | | }); |
| | | |
| | | //速热 |
| | | var mode_QuickHeatView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(165), |
| | | Height = Application.GetRealWidth(52), |
| | | Gravity = Gravity.CenterVertical, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x0000C22D, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | modeView.AddChidren(mode_QuickHeatView); |
| | | |
| | | var mode_QuickHeat_IconButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealWidth(20), |
| | | X = Application.GetRealWidth(53), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/Mode_QuickHeat.png" |
| | | }; |
| | | mode_QuickHeatView.AddChidren(mode_QuickHeat_IconButton); |
| | | |
| | | var mode_QuickHeat_TextButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(80), |
| | | X = Application.GetRealWidth(81), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.TextualColor, |
| | | Text = "速热" |
| | | }; |
| | | mode_QuickHeatView.AddChidren(mode_QuickHeat_TextButton); |
| | | #endregion |
| | | |
| | | #region 设置温度 |
| | | var setTempView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(168), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(setTempView); |
| | | |
| | | var setTemp_TextButtont = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(23), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | Text = "温度设置", |
| | | }; |
| | | setTempView.AddChidren(setTemp_TextButtont); |
| | | |
| | | var setTemp_Temp_ValuesTextButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(34), |
| | | Gravity = Gravity.CenterVertical, |
| | | Height = Application.GetRealWidth(43), |
| | | IsBold = true, |
| | | TextSize = 32, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.TopCenter, |
| | | Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.set_temp.ToString(), "---"), |
| | | }; |
| | | #if __IOS__ |
| | | setTemp_Temp_ValuesTextButton.Width = setTemp_Temp_ValuesTextButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | setTemp_Temp_ValuesTextButton.Width = setTemp_Temp_ValuesTextButton.GetTextWidth(); |
| | | #endif |
| | | setTemp_Temp_ValuesTextButton.Gravity = Gravity.CenterHorizontal; |
| | | setTempView.AddChidren(setTemp_Temp_ValuesTextButton); |
| | | var setTemp_Temp_ValuesUintButton = new Button() |
| | | { |
| | | X = setTemp_Temp_ValuesTextButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(40), |
| | | Height = Application.GetRealWidth(66), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | Width = Application.GetRealWidth(30), |
| | | TextSize = 10, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "°C" |
| | | }; |
| | | setTempView.AddChidren(setTemp_Temp_ValuesUintButton); |
| | | |
| | | |
| | | int setTempValue = 0; |
| | | string setTempStr = "--"; |
| | | double dd = 0; |
| | | double.TryParse(function.GetAttrState(WaterHeaterJinmao_AttrEnum.set_temp.ToString(), "--"), out dd); |
| | | setTempValue = Convert.ToInt32(dd); |
| | | var setTemp_Temp_Bar = new DiyImageSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(126 - 72), |
| | | Width = Application.GetRealWidth(Application.DesignWidth - 32), |
| | | Height = Application.GetRealHeight(72), |
| | | SeekBarViewHeight = Application.GetRealHeight(14), |
| | | ThumbImagePath = "FunctionIcon/Acst/ThumbImage.png", |
| | | ThumbImageHeight = Application.GetRealHeight(51), |
| | | ProgressBarColor = function.trait_on_off.curValue.ToString() == "on" ? 0xFFFFB848 : CSS_Color.DividingLineColor, |
| | | MaxValue = 25, |
| | | Progress = setTempValue - 35, |
| | | SeekBarPadding = Application.GetRealWidth(20), |
| | | IsProgressTextShow = false, |
| | | ProgressChangeDelayTime = 0, |
| | | }; |
| | | setTempView.AddChidren(setTemp_Temp_Bar); |
| | | |
| | | var setTemp_Temp_MinValuesTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(130), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(26), |
| | | Text = "35°C", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = 0xFF7C8590, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | setTempView.AddChidren(setTemp_Temp_MinValuesTextButton); |
| | | |
| | | var setTemp_Temp_MaxValuesTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 116), |
| | | Y = Application.GetRealWidth(130), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(26), |
| | | Text = "60°C", |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = 0xFF7C8590, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | setTempView.AddChidren(setTemp_Temp_MaxValuesTextButton); |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(12), |
| | | }); |
| | | |
| | | #region flow 热水流量 |
| | | var flowView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(186), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(flowView); |
| | | |
| | | var flow_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(14), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealWidth(25), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "热水流量:0.3L/min", |
| | | IsBold = true, |
| | | }; |
| | | flowView.AddChidren(flow_ValuesButton); |
| | | |
| | | var flow_HotWaterVolumeTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(55), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(20), |
| | | Text = "热水量", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | flowView.AddChidren(flow_HotWaterVolumeTextButton); |
| | | |
| | | var flow_HotWaterVolumeValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 116), |
| | | Y = Application.GetRealWidth(55), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(26), |
| | | Text = "24t", |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | flowView.AddChidren(flow_HotWaterVolumeValuesButton); |
| | | |
| | | var flow_ValuesBar = new DiyImageSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(79), |
| | | Width = Application.GetRealWidth(Application.DesignWidth - 64), |
| | | Height = Application.GetRealHeight(8), |
| | | SeekBarViewHeight = Application.GetRealHeight(8), |
| | | ThumbImageHeight = Application.GetRealHeight(0), |
| | | ProgressBarColor = 0xFF42D163, |
| | | SeekBarBackgroundColor = 0xFFFFB848, |
| | | MaxValue = 100, |
| | | Progress = 80, |
| | | SeekBarPadding = Application.GetRealWidth(0), |
| | | IsProgressTextShow = false, |
| | | ProgressChangeDelayTime = 0, |
| | | Enable = false, |
| | | IsClickable = false, |
| | | }; |
| | | flowView.AddChidren(flow_ValuesBar); |
| | | |
| | | var flow_HeatRecoveryCapacitytTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(103), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(20), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = 0xFF00C22D, |
| | | Text = "热回收量" |
| | | }; |
| | | flowView.AddChidren(flow_HeatRecoveryCapacitytTextButton); |
| | | |
| | | var flow_HeatRecoveryCapacitytProgressButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(125), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(22), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = 0xFF00C22D, |
| | | Text = "80%" |
| | | }; |
| | | flowView.AddChidren(flow_HeatRecoveryCapacitytProgressButton); |
| | | |
| | | var flow_HeatRecoveryCapacitytValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealWidth(148), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(22), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "19.2t" |
| | | }; |
| | | flowView.AddChidren(flow_HeatRecoveryCapacitytValuesButton); |
| | | |
| | | |
| | | |
| | | var flow_ElectricDirectDriveQuantityTextButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 116), |
| | | Y = Application.GetRealWidth(103), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(20), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = 14, |
| | | TextColor = 0xFFFC9C04, |
| | | Text = "电直驱量" |
| | | }; |
| | | flowView.AddChidren(flow_ElectricDirectDriveQuantityTextButton); |
| | | |
| | | var flow_ElectricDirectDriveQuantityProgressButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 116), |
| | | Y = Application.GetRealWidth(125), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(22), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = 14, |
| | | TextColor = 0xFFFC9C04, |
| | | Text = "20%" |
| | | }; |
| | | flowView.AddChidren(flow_ElectricDirectDriveQuantityProgressButton); |
| | | |
| | | var flow_ElectricDirectDriveQuantityValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 116), |
| | | Y = Application.GetRealWidth(148), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(22), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = 14, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "4.8t" |
| | | }; |
| | | flowView.AddChidren(flow_ElectricDirectDriveQuantityValuesButton); |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8) |
| | | }); |
| | | |
| | | #region 社会贡献 Social contribution |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(100), |
| | | X = Application.GetRealWidth(16), |
| | | Text = "社会贡献", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 16, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true |
| | | }); |
| | | |
| | | var socialContributionView = new HorizontalScrolViewLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(142), |
| | | ScrollEnabled = false, |
| | | }; |
| | | contentView.AddChidren(socialContributionView); |
| | | |
| | | #region 热回收节电量 |
| | | var socialContribution_InfoView_1 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_1.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_1); |
| | | |
| | | var socialContribution_Info1_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_1.png" |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton); |
| | | |
| | | var socialContribution_Info1_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.recycl_volume.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton); |
| | | |
| | | var socialContribution_Info1_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "kwh", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton); |
| | | |
| | | var socialContribution_Info1_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "热回收节电量", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_TipButton); |
| | | #endregion |
| | | |
| | | socialContributionView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region CO2减排量 |
| | | var socialContribution_InfoView_2 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_2.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_2); |
| | | |
| | | var socialContribution_Info2_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_2.png" |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton); |
| | | |
| | | var socialContribution_Info2_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton); |
| | | |
| | | var socialContribution_Info2_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "吨", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton); |
| | | |
| | | var socialContribution_Info2_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "CO2减排量", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_TipButton); |
| | | #endregion |
| | | |
| | | socialContributionView.AddChidren(new Button() |
| | | { |
| | | Width = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region 等效植树量 |
| | | var socialContribution_InfoView_3 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(109), |
| | | Height = Application.GetRealWidth(130), |
| | | BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_3.png" |
| | | }; |
| | | socialContributionView.AddChidren(socialContribution_InfoView_3); |
| | | |
| | | var socialContribution_Info3_IconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_3.png" |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton); |
| | | |
| | | var socialContribution_Info3_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | #else |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth(); |
| | | #endif |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton); |
| | | |
| | | var socialContribution_Info3_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | Text = "棵", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton); |
| | | |
| | | var socialContribution_Info3_TipButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(98), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "等效植树量", |
| | | TextSize = 12, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_TipButton); |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | |
| | | private void initBottomView() |
| | | { |
| | | var btnPowerControl = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(50), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(16), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/grey/PowerOffIcon.png", |
| | | SelectedImagePath = $"FunctionIcon/Acst/blue/PowerIcon.png", |
| | | IsSelected = function.trait_on_off.curValue.ToString() == "on" |
| | | }; |
| | | bottomView.AddChidren(btnPowerControl); |
| | | |
| | | btnPowerControl.MouseUpEventHandler = (sender, e) => { |
| | | btnPowerControl.IsSelected = !btnPowerControl.IsSelected; |
| | | |
| | | new System.Threading.Thread(() => { |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, btnPowerControl.IsSelected ? "on" : "off"); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | public void UpdateStatus(Function temp) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class WetarHeaterJinmaoHistoryPage : FrameLayout |
| | | { |
| | | WetarHeaterJinmaoHistoryPage bodyView; |
| | | Function device; |
| | | |
| | | /// <summary> |
| | | /// echart容器 |
| | | /// </summary> |
| | | MyEchartsViewOn tempEchartsView; |
| | | |
| | | public WetarHeaterJinmaoHistoryPage(Function function) |
| | | { |
| | | bodyView = this; |
| | | device = function; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | var topView = new TopViewDiv(bodyView, device.name); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(74+16), |
| | | Height = Application.GetRealHeight(Application.DesignHeight - 74), |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | #region 温度值 |
| | | var infoView1 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(382), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(infoView1); |
| | | |
| | | #region 时间条件选择 |
| | | var infoView1_DateView = new HorizontalScrolViewLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343 - 34), |
| | | Height = Application.GetRealWidth(26), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(17), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | ScrollEnabled = false, |
| | | }; |
| | | infoView1.AddChidren(infoView1_DateView); |
| | | |
| | | var infoView1_Date_Day = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "日", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = true, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Day); |
| | | |
| | | |
| | | var infoView1_Date_Month = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "月", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Month); |
| | | |
| | | |
| | | var infoView1_Date_Year = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "年", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView1_DateView.AddChidren(infoView1_Date_Year); |
| | | |
| | | var infoView1_DateInfoView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(55), |
| | | }; |
| | | infoView1.AddChidren(infoView1_DateInfoView); |
| | | |
| | | var infoView1_DateInfo_PreIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/PreIcon.png", |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_PreIconButton); |
| | | |
| | | var infoView1_DateInfo_PreClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_PreClickButton); |
| | | |
| | | var infoView1_DateInfo_DateTextButton = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "2024-8-12", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextSize = 16, |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_DateTextButton); |
| | | |
| | | |
| | | var infoView1_DateInfo_NextIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 18 - 6), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/NextIcon.png", |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_NextIconButton); |
| | | |
| | | var infoView1_DateInfo_NextClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView1_DateInfoView.AddChidren(infoView1_DateInfo_NextClickButton); |
| | | |
| | | #endregion |
| | | |
| | | #region 数据图表 |
| | | MyEchartsViewOn infoView1_EchartsView = new MyEchartsViewOn() |
| | | { |
| | | Y = Application.GetRealWidth(101), |
| | | Height = Application.GetRealWidth(246), |
| | | }; |
| | | infoView1.AddChidren(infoView1_EchartsView); |
| | | |
| | | var echartOption = new EchartsOption_Histogram(); |
| | | echartOption.xTitle = "时间"; |
| | | echartOption.yTitle = "温度(℃)"; |
| | | echartOption.InitXdataText(new List<string>() |
| | | { |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24" |
| | | }); |
| | | echartOption.InitYdataText(new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "15", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "16", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "17", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "18", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "19", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "20", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "21", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "22", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "23", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "24", fieldValue= "21" }, |
| | | }); |
| | | var ddd = echartOption.InitOption(); |
| | | infoView1_EchartsView.ShowWithOption(ddd); |
| | | |
| | | infoView1.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(35), |
| | | Y = Application.GetRealWidth(340), |
| | | Text = "温度值", |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFC0C7D4 |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(16) |
| | | }); |
| | | |
| | | #region 用水量 |
| | | var infoView2 = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(382), |
| | | Y = Application.GetRealHeight(16) + infoView1.Bottom, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | }; |
| | | contentView.AddChidren(infoView2); |
| | | |
| | | #region 时间条件选择 |
| | | var infoView2_DateView = new HorizontalScrolViewLayout() |
| | | { |
| | | Width = Application.GetRealWidth(343 - 34), |
| | | Height = Application.GetRealWidth(26), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(17), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 0, |
| | | ScrollEnabled = false, |
| | | }; |
| | | infoView2.AddChidren(infoView2_DateView); |
| | | |
| | | var infoView2_Date_Day = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "日", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = true, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Day); |
| | | |
| | | |
| | | var infoView2_Date_Month = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "月", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Month); |
| | | |
| | | |
| | | var infoView2_Date_Year = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(103), |
| | | Height = Application.GetRealWidth(26), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | SelectedBackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(13), |
| | | BorderColor = CSS_Color.BackgroundColor, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | Text = "年", |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsSelected = false, |
| | | }; |
| | | infoView2_DateView.AddChidren(infoView2_Date_Year); |
| | | |
| | | var infoView2_DateInfoView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Height = Application.GetRealWidth(55), |
| | | }; |
| | | infoView2.AddChidren(infoView2_DateInfoView); |
| | | |
| | | var infoView2_DateInfo_PreIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/PreIcon.png", |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_PreIconButton); |
| | | |
| | | var infoView2_DateInfo_PreClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_PreClickButton); |
| | | |
| | | var infoView2_DateInfo_DateTextButton = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "2024-8-12", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextSize = 16, |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_DateTextButton); |
| | | |
| | | |
| | | var infoView2_DateInfo_NextIconButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343 - 18 - 6), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(10), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/NextIcon.png", |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_NextIconButton); |
| | | |
| | | var infoView2_DateInfo_NextClickButton = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(32 + 6), |
| | | }; |
| | | infoView2_DateInfoView.AddChidren(infoView2_DateInfo_NextClickButton); |
| | | |
| | | #endregion |
| | | |
| | | #region 数据图表 |
| | | MyEchartsViewOn infoView2_EchartsView = new MyEchartsViewOn() |
| | | { |
| | | Y = Application.GetRealWidth(101), |
| | | Height = Application.GetRealWidth(246), |
| | | }; |
| | | infoView2.AddChidren(infoView2_EchartsView); |
| | | |
| | | var echartOption2 = new EchartsOption_Histogram(); |
| | | echartOption2.xTitle = "时间"; |
| | | echartOption2.yTitle = "温度(℃)"; |
| | | echartOption2.InitXdataText(new List<string>() |
| | | { |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24","25","26","26","27","28","29", |
| | | "21","22","23","24" |
| | | }); |
| | | echartOption2.InitYdataText(new List<EnvironmentalSensorHistor>() { |
| | | new EnvironmentalSensorHistor{ fieldName = "1", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "2", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "3", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "4", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "5", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "6", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "7", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "8", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "9", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "10", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "11", fieldValue= "24" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "12", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "13", fieldValue= "32" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "14", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "15", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "16", fieldValue= "22" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "17", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "18", fieldValue= "21" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "19", fieldValue= "41" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "20", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "21", fieldValue= "31" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "22", fieldValue= "23" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "23", fieldValue= "11" }, |
| | | new EnvironmentalSensorHistor{ fieldName = "24", fieldValue= "21" }, |
| | | }); |
| | | infoView2_EchartsView.ShowWithOption(echartOption2.InitOption()); |
| | | |
| | | infoView2.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(35), |
| | | Y = Application.GetRealWidth(340), |
| | | Text = "用水量", |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFC0C7D4 |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(26) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | return; |
| | | if (updateTemp.spk == bodyView.function.spk && updateTemp.sid == bodyView.function.sid) |
| | | { |
| | | try |
| | | try |
| | | { |
| | | if (!bodyView.onCurtainAnimation) |
| | | var percent = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)); |
| | | bodyView.curtainSeekBar.Progress = percent; |
| | | bodyView.btnProgress.Text = percent + "%"; |
| | | |
| | | var e = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Angle)); |
| | | bodyView.angleBar.Progress = e; |
| | | float angle = e - 90; |
| | | bodyView.btnAngle.Text = (e - 0) + "°"; |
| | | foreach (var btn in bodyView.buttons) |
| | | { |
| | | var percent = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)); |
| | | bodyView.CurtainAnimation(percent); |
| | | bodyView.btnProgress.Text = percent + "%"; |
| | | |
| | | var e = Convert.ToInt32( updateTemp.GetAttrState(FunctionAttributeKey.Angle)); |
| | | bodyView.angleBar.Progress = e; |
| | | float angle = e - 90; |
| | | bodyView.btnAngle.Text = (e - 0) + "°"; |
| | | foreach (var btn in bodyView.buttons) |
| | | { |
| | | btn.SetRotation(angle); |
| | | } |
| | | |
| | | |
| | | btn.SetRotation(angle); |
| | | } |
| | | } |
| | | catch { } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class EchartsOption_Histogram |
| | | { |
| | | /// <summary> |
| | | /// x轴数据 |
| | | /// </summary> |
| | | private string XvalueText = ""; |
| | | |
| | | /// <summary> |
| | | /// Y轴数据 |
| | | /// </summary> |
| | | private string YvalueText = ""; |
| | | /// <summary> |
| | | /// x轴标题 |
| | | /// </summary> |
| | | public string xTitle = ""; |
| | | /// <summary> |
| | | /// y轴标题 |
| | | /// </summary> |
| | | public string yTitle = ""; |
| | | |
| | | public EchartsOption_Histogram() |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 组装Option数据 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string InitOption() |
| | | { |
| | | //组装Value |
| | | var newstring = optionString.Replace("{xData}", XvalueText); |
| | | newstring = newstring.Replace("{yData}", YvalueText); |
| | | newstring = newstring.Replace("{xName}", xTitle); |
| | | newstring = newstring.Replace("{yName}", yTitle); |
| | | newstring = newstring.Replace(",,", ","); |
| | | return newstring; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 组装x轴文本 |
| | | /// </summary> |
| | | /// <param name="xData"></param> |
| | | public void InitXdataText(List<string> xData) |
| | | { |
| | | XvalueText = ""; |
| | | foreach (var data in xData) |
| | | { |
| | | XvalueText += "'" + data + "',"; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 组装y轴文本 |
| | | /// </summary> |
| | | /// <param name="yData"></param> |
| | | public string InitYdataText(List<EnvironmentalSensorHistor> yData) |
| | | { |
| | | YvalueText = ""; |
| | | foreach (var data in yData) |
| | | { |
| | | YvalueText += "'" + data.fieldValue + "',"; |
| | | } |
| | | |
| | | return YvalueText; |
| | | } |
| | | |
| | | |
| | | public string optionString = @"{ |
| | | grid: { |
| | | top: '10%', |
| | | left: '10%', |
| | | right: '10%', |
| | | bottom: '10%', |
| | | }, |
| | | xAxis: { |
| | | data: [{xData}], |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | name:'{xName}', |
| | | nameTextStyle:{ |
| | | color:'#7C8590', |
| | | fontSize:24 |
| | | }, |
| | | axisLabel: { |
| | | color: '#7C8590', |
| | | fontSize:20 |
| | | } |
| | | }, |
| | | yAxis: { |
| | | name:'{yName}', |
| | | nameGap:35, |
| | | nameTextStyle:{ |
| | | color:'#030D1C', |
| | | fontSize:24 |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | color: '#7C8590', |
| | | fontSize:20 |
| | | } |
| | | }, |
| | | dataZoom: [ |
| | | { |
| | | type: 'inside' |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | showBackground: false, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: '#6AB7F9' }, |
| | | { offset: 0.5, color: '#5AA6FF' }, |
| | | { offset: 1, color: '#6B97F9' } |
| | | ]) |
| | | }, |
| | | data: [{yData}] |
| | | } |
| | | ] |
| | | }"; |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |