| | |
| | | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control_Udp.cs"> |
| | | <Files> |
| | | <File FileName="HDL-ON_iOS/Info.plist" /> |
| | | <File FileName="HDL_ON/UI/MainPage.cs" Line="19" Column="44" /> |
| | | <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="1864" Column="28" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="303" Column="15" /> |
| | | <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="195" Column="50" /> |
| | | <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="95" Column="58" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="758" Column="53" /> |
| | | <File FileName="../../../../Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets" Line="1912" Column="3" /> |
| | | <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PirView.cs" Line="141" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="152" Column="50" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs" Line="312" Column="14" /> |
| | | <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="87" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="735" Column="62" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="95" Column="57" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="896" Column="84" /> |
| | | <File FileName="../../Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688852687634638/Cache/File/2021-03/DeviceTemperatureHistoryForm(1).cs" Line="1015" Column="25" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Pie.cs" Line="44" Column="25" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="842" Column="33" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="HDL_APP_Project" expanded="True"> |
| | | <Node name="HDL_ON" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="DAL" expanded="True"> |
| | | <Node name="DriverLayer" expanded="True" /> |
| | | <Node name="DriverLayer" expanded="True"> |
| | | <Node name="Control_Udp.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True"> |
| | | <Node name="ResponseEntity" expanded="True" /> |
| | | <Node name="Enumerative" expanded="True" /> |
| | | <Node name="Function" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI1-Login" expanded="True" /> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="2-Classification" expanded="True"> |
| | | <Node name="ClassificationPageBLL.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="4-PersonalCenter" expanded="True"> |
| | | <Node name="PirDevice" expanded="True"> |
| | | <Node name="View" expanded="True" /> |
| | | </Node> |
| | | <Node name="2-Classification" expanded="True" /> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Energy" expanded="True" /> |
| | | <Node name="EnvironmentalScience" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_Android" expanded="True"> |
| | | <Node name="Properties" expanded="True" /> |
| | | <Node name="Assets" expanded="True" /> |
| | | <Node name="Resources" expanded="True" /> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True" /> |
| | | <Node name="HDL-ON_iOS" expanded="True"> |
| | | <Node name="Resources" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </State> |
| | | </Pad> |
| | |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore /> |
| | | <BreakpointStore> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2202" column="1" /> |
| | | </BreakpointStore> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <MultiItemStartupConfigurations /> |
| | | </Properties> |
| | |
| | | 437=Device List |
| | | 438=humidity:{0}% air:{1} wind:{2} |
| | | |
| | | |
| | | 1000=Indoor Humidity |
| | | 1001=V-chip |
| | | 1002=Anion |
| | |
| | | 436=已添加功能 |
| | | 437=设备列表 |
| | | 438=湿度:{0}% 空气:{1} 风速:{2}级 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | | 1001=童锁 |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.1.202103252</string> |
| | | <string>1.1.202103261</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>202103252</string> |
| | | <string>202103261</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | 437=Device List |
| | | 438=humidity:{0}% air:{1} wind:{2} |
| | | |
| | | |
| | | |
| | | 1000=Indoor Humidity |
| | | 1001=V-chip |
| | | 1002=Anion |
| | |
| | | 436=已添加功能 |
| | | 437=设备列表 |
| | | 438=湿度:{0}% 空气:{1} 风速:{2}级 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | | 1001=童锁 |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | //public const int EnergyMonitoring = 439; |
| | | public const int EnvirSensorValueTip = 438; |
| | | public const int DeviceList = 437; |
| | | public const int AddedDevice = 436; |
| | |
| | | } |
| | | break; |
| | | case FunctionCategory.AirFresh: |
| | | |
| | | switch(function.spk) |
| | | { |
| | | case SPK.AirFreshJinmao: |
| | | //1 新风编号 1~200 |
| | | //2 类型 第三方类型 0:金茂新风 |
| | | //3 开关 0 - 关机,1 - 开机 |
| | | //4 运行模式 1 - 通风,2 - 加湿 |
| | | byte airFreshMode = 1; |
| | | if (function.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | airFreshMode = 2; |
| | | } |
| | | //5 节能舒适选择 1 - 舒适,2 - 节能 |
| | | byte airFreshEnergy = 1; |
| | | if( function.GetAttrState(FunctionAttributeKey.Energy)=="true") |
| | | { |
| | | airFreshEnergy = 2; |
| | | } |
| | | //6 风速档位 0 - 自动,1 - 1档,2 - 2档,3 - 3档 |
| | | byte airFreshFan = 0; |
| | | switch(function.GetAttrState(FunctionAttributeKey.FanSpeed)) |
| | | { |
| | | case "auto": |
| | | airFreshFan = 0; |
| | | break; |
| | | case "level_1": |
| | | airFreshFan = 1; |
| | | break; |
| | | case "level_2": |
| | | airFreshFan = 2; |
| | | break; |
| | | case "level_3": |
| | | airFreshFan = 3; |
| | | break; |
| | | } |
| | | //7 湿度设定 % |
| | | //8 室内温度值 ℃ |
| | | //9 室内湿度值 ℃ |
| | | //10 过滤网剩余 % |
| | | //11 过滤网使用超时 1 超时 0 无 |
| | | ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] { |
| | | function.bus.LoopId,0, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0 , |
| | | airFreshMode,airFreshEnergy, |
| | | airFreshFan, |
| | | Convert.ToByte( function.GetAttrState(FunctionAttributeKey.Humidity)), |
| | | 0,0,0,0 |
| | | //Convert.ToByte( function.GetAttrState(FunctionAttributeKey.IndoorTemp)), |
| | | //Convert.ToByte( function.GetAttrState(FunctionAttributeKey.IndoorHumidity)), |
| | | //Convert.ToByte( function.GetAttrState(FunctionAttributeKey.FilterRemain)), |
| | | //function.GetAttrState(FunctionAttributeKey.FilterTimeout) =="true"?1:0, |
| | | }); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | #region 发送命令立即更新UI |
| | |
| | | } |
| | | ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, sensorType, function.bus.LoopId }); |
| | | break; |
| | | case FunctionCategory.AirFresh: |
| | | switch(function.spk) |
| | | { |
| | | case SPK.AirFreshJinmao: |
| | | ControlBytesSend(Command.FreshAirRead_JinMao, subnetId, deviceId, new byte[] { function.bus.LoopId }); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | if (tempFunction == null) |
| | | { |
| | | MainPage.Log("null"); |
| | | |
| | | FileUtlis.Files.DeleteFile(filePath); |
| | | return; |
| | | } |
| | |
| | | }
|
| | | }
|
| | | } |
| | | MainPage.Log("add"); |
| | | Functions.Add(tempFunction); |
| | | } |
| | | if (filePath.StartsWith("SceneData_")) |
| | |
| | | using System; |
| | | using Android.Content; |
| | | //using System; |
| | | //#if __IOS__ |
| | | //using Shared.IOS.ESVideoOnSDK; |
| | | //using UIKit; |
| | | //using Foundation; |
| | | //#else |
| | | |
| | | namespace HDL_ON.FengLinVideo |
| | | { |
| | | public class ESOnVideo |
| | | { |
| | | /// <summary> |
| | | /// 丰林可视对讲 |
| | | /// </summary> |
| | | private static ESOnVideo m_Current = null; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public static ESOnVideo Current |
| | | { |
| | | get |
| | | { |
| | | if (m_Current == null) |
| | | { |
| | | m_Current = new ESOnVideo(); |
| | | } |
| | | return m_Current; |
| | | } |
| | | } |
| | | //using Android.Content; |
| | | |
| | | public void InitESVideoSDK() |
| | | { |
| | | //ESVideo. |
| | | } |
| | | //#endif |
| | | //namespace HDL_ON.FengLinVideo |
| | | //{ |
| | | // public class ESOnVideo |
| | | // { |
| | | // /// <summary> |
| | | // /// 丰林可视对讲 |
| | | // /// </summary> |
| | | // private static ESOnVideo m_Current = null; |
| | | // /// <summary> |
| | | // /// |
| | | // /// </summary> |
| | | // public static ESOnVideo Current |
| | | // { |
| | | // get |
| | | // { |
| | | // if (m_Current == null) |
| | | // { |
| | | // m_Current = new ESOnVideo(); |
| | | // } |
| | | // return m_Current; |
| | | // } |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 监控页面 |
| | | /// </summary> |
| | | /// <param name="mESVideoInfo"></param> |
| | | public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) |
| | | { |
| | | // public void InitESVideoSDK() |
| | | // { |
| | | // //ESVideo. |
| | | // } |
| | | |
| | | Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); |
| | | intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); |
| | | intent.PutExtra("uuid", mESVideoInfo.uuid); |
| | | intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); |
| | | intent.PutExtra("cmtID", mESVideoInfo.cmtID); |
| | | intent.PutExtra("roomno", mESVideoInfo.roomno); |
| | | intent.PutExtra("unitno", mESVideoInfo.unitno); |
| | | intent.PutExtra("HomeID", mESVideoInfo.HomeID); |
| | | intent.PutExtra("callId", mESVideoInfo.callId); |
| | | intent.PutExtra("Type", 0); |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | // /// <summary> |
| | | // /// 监控页面 |
| | | // /// </summary> |
| | | // /// <param name="mESVideoInfo"></param> |
| | | // public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) |
| | | // { |
| | | |
| | | } |
| | | // Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); |
| | | // intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); |
| | | // intent.PutExtra("uuid", mESVideoInfo.uuid); |
| | | // intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); |
| | | // intent.PutExtra("cmtID", mESVideoInfo.cmtID); |
| | | // intent.PutExtra("roomno", mESVideoInfo.roomno); |
| | | // intent.PutExtra("unitno", mESVideoInfo.unitno); |
| | | // intent.PutExtra("HomeID", mESVideoInfo.HomeID); |
| | | // intent.PutExtra("callId", mESVideoInfo.callId); |
| | | // intent.PutExtra("Type", 0); |
| | | // Shared.Application.Activity.StartActivity(intent); |
| | | |
| | | /// <summary> |
| | | /// 被呼叫页面 |
| | | /// </summary> |
| | | /// <param name="mESVideoInfo"></param> |
| | | public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo) |
| | | { |
| | | // } |
| | | |
| | | Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); |
| | | intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); |
| | | intent.PutExtra("uuid", mESVideoInfo.uuid); |
| | | intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); |
| | | intent.PutExtra("cmtID", mESVideoInfo.cmtID); |
| | | intent.PutExtra("roomno", mESVideoInfo.roomno); |
| | | intent.PutExtra("unitno", mESVideoInfo.unitno); |
| | | intent.PutExtra("HomeID", mESVideoInfo.HomeID); |
| | | intent.PutExtra("callId", mESVideoInfo.callId); |
| | | intent.PutExtra("Type", 1); |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | | // /// <summary> |
| | | // /// 被呼叫页面 |
| | | // /// </summary> |
| | | // /// <param name="mESVideoInfo"></param> |
| | | // public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo) |
| | | // { |
| | | |
| | | /// <summary> |
| | | /// 测试方法 |
| | | /// </summary> |
| | | /// <param name="isMonitor"></param> |
| | | public void Test(bool isMonitor = true) |
| | | { |
| | | ESVideoInfo eSVideoInfo = new ESVideoInfo() |
| | | { |
| | | DeviceName = "室外机88", |
| | | ESVideoUUID = "JJY000019VPLLF", |
| | | }; |
| | | if (isMonitor) |
| | | { |
| | | ShowESVideoMonitor(eSVideoInfo); |
| | | } |
| | | else |
| | | { |
| | | ShowESvideoVideoIntercom(eSVideoInfo); |
| | | } |
| | | // Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); |
| | | // intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); |
| | | // intent.PutExtra("uuid", mESVideoInfo.uuid); |
| | | // intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); |
| | | // intent.PutExtra("cmtID", mESVideoInfo.cmtID); |
| | | // intent.PutExtra("roomno", mESVideoInfo.roomno); |
| | | // intent.PutExtra("unitno", mESVideoInfo.unitno); |
| | | // intent.PutExtra("HomeID", mESVideoInfo.HomeID); |
| | | // intent.PutExtra("callId", mESVideoInfo.callId); |
| | | // intent.PutExtra("Type", 1); |
| | | // Shared.Application.Activity.StartActivity(intent); |
| | | // } |
| | | |
| | | } |
| | | } |
| | | // /// <summary> |
| | | // /// 测试方法 |
| | | // /// </summary> |
| | | // /// <param name="isMonitor"></param> |
| | | // public void Test(bool isMonitor = true) |
| | | // { |
| | | // ESVideoInfo eSVideoInfo = new ESVideoInfo() |
| | | // { |
| | | // DeviceName = "室外机88", |
| | | // ESVideoUUID = "JJY000019VPLLF", |
| | | // }; |
| | | // if (isMonitor) |
| | | // { |
| | | // ShowESVideoMonitor(eSVideoInfo); |
| | | // } |
| | | // else |
| | | // { |
| | | // ShowESvideoVideoIntercom(eSVideoInfo); |
| | | // } |
| | | |
| | | public class ESVideoInfo |
| | | { |
| | | /// <summary> |
| | | /// 室外机的UUID |
| | | /// 例:JJY000007FSEYX |
| | | /// </summary> |
| | | public string ESVideoUUID = string.Empty; |
| | | /// <summary> |
| | | /// 室外机的名称 |
| | | /// 例:室外机 |
| | | /// </summary> |
| | | public string DeviceName = string.Empty; |
| | | /// <summary> |
| | | /// 丰林请求的唯一id |
| | | /// </summary> |
| | | public string uuid; |
| | | /// <summary> |
| | | /// 丰林社区id |
| | | /// </summary> |
| | | public string cmtID; |
| | | /// <summary> |
| | | /// 丰林房间号 |
| | | /// </summary> |
| | | public string roomno; |
| | | /// <summary> |
| | | /// 丰林楼栋号 |
| | | /// </summary> |
| | | public string unitno; |
| | | /// <summary> |
| | | /// 丰林住宅Id |
| | | /// </summary> |
| | | public string HomeID; |
| | | /// <summary> |
| | | /// 呼叫记录Id |
| | | /// </summary> |
| | | public string callId; |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | // public class ESVideoInfo |
| | | // { |
| | | // /// <summary> |
| | | // /// 室外机的UUID |
| | | // /// 例:JJY000007FSEYX |
| | | // /// </summary> |
| | | // public string ESVideoUUID = string.Empty; |
| | | // /// <summary> |
| | | // /// 室外机的名称 |
| | | // /// 例:室外机 |
| | | // /// </summary> |
| | | // public string DeviceName = string.Empty; |
| | | // /// <summary> |
| | | // /// 丰林请求的唯一id |
| | | // /// </summary> |
| | | // public string uuid; |
| | | // /// <summary> |
| | | // /// 丰林社区id |
| | | // /// </summary> |
| | | // public string cmtID; |
| | | // /// <summary> |
| | | // /// 丰林房间号 |
| | | // /// </summary> |
| | | // public string roomno; |
| | | // /// <summary> |
| | | // /// 丰林楼栋号 |
| | | // /// </summary> |
| | | // public string unitno; |
| | | // /// <summary> |
| | | // /// 丰林住宅Id |
| | | // /// </summary> |
| | | // public string HomeID; |
| | | // /// <summary> |
| | | // /// 呼叫记录Id |
| | | // /// </summary> |
| | | // public string callId; |
| | | |
| | | // } |
| | | //} |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage_AddIrButton.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\Send.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)FengLinVideo\ESOnVideo.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.1.0325"; |
| | | public static string VersionString = "1.1.0326"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.EnergyMonitoring: |
| | | #region 能源 |
| | | functionCount = FunctionList.List.GetElectricals().Count; |
| | | functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | functionCount = 1; |
| | | break; |
| | | case ShowFunction.Environmental: |
| | | #region 环境数据 |
| | |
| | | |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.EnergyMonitoring |
| | | && functionCount != 0) |
| | | { |
| | | Button btnFunctionCount = new Button() |
| | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.EnergyMonitoring: |
| | | #region 能源监测 |
| | | btnName.TextID = StringId.EnergyMonitoring; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new EnergyMainPage(); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Environmental: |
| | | #region 环境数据 |
| | |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面 |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring) |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring |
| | | && ShowFunction.EnergyMonitoring!= item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | using System.Text; |
| | | using HDL_ON.DAL.Server; |
| | | using System.Threading.Tasks; |
| | | using HDL_ON.FengLinVideo; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | bodyView.AddChidren(btnOnTitle); |
| | | |
| | | #if DEBUG |
| | | btnOnIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ESOnVideo.Current.Test(); |
| | | }; |
| | | //btnOnIcon.MouseUpEventHandler += (sender, e) => |
| | | //{ |
| | | // ESOnVideo.Current.Test(); |
| | | //}; |
| | | |
| | | btnOnTitle.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ESOnVideo.Current.Test(false); |
| | | }; |
| | | //btnOnTitle.MouseUpEventHandler += (sender, e) => |
| | | //{ |
| | | // ESOnVideo.Current.Test(false); |
| | | //}; |
| | | |
| | | #endif |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class EnergyMainPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | public EnergyMainPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | var generalTableView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(80), |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(148), |
| | | Radius = (uint)Application.GetRealWidth(5), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(generalTableView); |
| | | |
| | | TextButton btnTotalValue = new TextButton() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Y = Application.GetRealWidth(24), |
| | | Width = Application.GetRealWidth(18), |
| | | Height = Application.GetRealWidth(52), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 40, |
| | | Text = "000" |
| | | }; |
| | | generalTableView.AddChidren(btnTotalValue); |
| | | |
| | | btnTotalValue.Width = btnTotalValue.GetTextWidth(); |
| | | |
| | | var btnTotalValueUint = new Button() |
| | | { |
| | | X = btnTotalValue.Right, |
| | | Y = Application.GetRealWidth(24), |
| | | Width = Application.GetRealWidth(60), |
| | | Height = Application.GetRealWidth(28), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsBold = true, |
| | | Text = "kW‧h", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | generalTableView.AddChidren(btnTotalValueUint); |
| | | |
| | | var btnValue = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18), |
| | | Y = btnTotalValue.Bottom, |
| | | Width = Application.GetRealWidth(209), |
| | | Height = Application.GetRealWidth(28), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | generalTableView.AddChidren(btnValue); |
| | | |
| | | var echartsView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(100), |
| | | X = Application.GetRealWidth(227), |
| | | Y = Application.GetRealWidth(16), |
| | | }; |
| | | generalTableView.AddChidren(echartsView); |
| | | MyEchartsViewOn myEchartsView = new MyEchartsViewOn() { |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(100), |
| | | }; |
| | | |
| | | echartsView.AddChidren(myEchartsView); |
| | | Dictionary<string, string> list = new Dictionary<string, string>(); |
| | | list.Add("电冰箱", "12"); |
| | | list.Add("电风扇", "2"); |
| | | list.Add("空调", "9"); |
| | | list.Add("洗衣机", "3"); |
| | | list.Add("电脑", "33"); |
| | | var echartsPie = new EchartsOption_Pie(); |
| | | var echartRootJson = echartsPie.InitDateJson(list); |
| | | //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson); |
| | | myEchartsView.ShowWithOption(echartRootJson); |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public class EchartsOption_Pie |
| | | { |
| | | public string name = ""; |
| | | |
| | | public string type = "pie"; |
| | | |
| | | public string radius = "55%"; |
| | | |
| | | public List<OpthionData> data = new List<OpthionData>(); |
| | | |
| | | public string itemStyle = ""; |
| | | |
| | | public EchartsOption_Pie() |
| | | public string InitDateJson(Dictionary<string, string> list) |
| | | { |
| | | //组装Value |
| | | string valueText = string.Empty; |
| | | foreach (var dic in list) |
| | | { |
| | | valueText += "{value:" + dic.Value + ",name:'" + dic.Key + "'},\r\n"; |
| | | } |
| | | //获取曲线控件共通Option |
| | | //{0}:光标移动时,那条竖线的颜色 |
| | | //{1}:X轴的组员项 |
| | | //{2}:Y轴的单位格式 |
| | | //{3}:X轴组员对应的值 |
| | | //{4}:曲线的颜色 |
| | | string commonJson = this.GetChartControlCommonOption(); |
| | | commonJson = commonJson.Replace("{0}", valueText); |
| | | return commonJson; |
| | | } |
| | | |
| | | public class OpthionData |
| | | |
| | | /// <summary> |
| | | /// 获取曲线控件共通Option |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private string GetChartControlCommonOption() |
| | | { |
| | | public int value = 0; |
| | | public string name = ""; |
| | | //{0}:数据 |
| | | #if __IOS__ |
| | | return @"{ |
| | | tooltip: { |
| | | trigger: 'item', |
| | | padding:40, |
| | | textStyle:{ |
| | | fontSize :38, |
| | | }, |
| | | }, |
| | | series : [ |
| | | { |
| | | right: '55%', |
| | | bottom:'55%', |
| | | labelLine: false, |
| | | type: 'pie', |
| | | data:[ |
| | | {0} |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | color:function(params) { |
| | | var colorList = [ |
| | | '#80AEFF','#FFD154','#FF9D54','#FE6A6A','#B183C3','#ADE764', |
| | | '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0' |
| | | ]; |
| | | return colorList[params.dataIndex] |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | ] |
| | | }"; |
| | | #else |
| | | return @"{ |
| | | tooltip: { |
| | | trigger: 'item', |
| | | }, |
| | | series : [ |
| | | { |
| | | labelLine: false, |
| | | type: 'pie', |
| | | radius: '25%', |
| | | data:[ |
| | | {0} |
| | | ], |
| | | itemStyle: { |
| | | normal:{ |
| | | color:function(params) { |
| | | var colorList = [ |
| | | '#80AEFF','#FFD154','#FF9D54','#FE6A6A','#B183C3','#ADE764', |
| | | '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0' |
| | | ]; |
| | | return colorList[params.dataIndex] |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | ] |
| | | }"; |
| | | |
| | | #endif |
| | | } |
| | | |
| | | public class ItemStyle |
| | | /// <summary> |
| | | /// 颜色列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<string> ColorList () |
| | | { |
| | | |
| | | var list = new List<string>(); |
| | | return list; |
| | | } |
| | | } |
| | | } |