20210630
1.Dome版本功能。
2.增加红外风扇控制功能、界面
3.增加房间列表界面显示切换功能
4.增加空调扫风模式控制
5.消息推送切换住宅功能。
6主页温湿度加载优化
7.修复调试软件上传的自动化无法二次编辑的问题
8.修复二次调试功能异常问题。
| | |
| | | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/Function/Scene.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="275" Column="53" /> |
| | | <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="1521" Column="7" /> |
| | | <File FileName="HDL-ON_Android/Assets/Language.ini" Line="467" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="341" Column="46" /> |
| | | <File FileName="HDL_ON/UI/MainPage.cs" Line="275" Column="45" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" Line="142" Column="50" /> |
| | | <File FileName="HDL_ON/Common/R.cs" Line="8" Column="15" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="229" Column="64" /> |
| | | <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="156" Column="50" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="242" Column="69" /> |
| | | <File FileName="HDL_ON/Entity/Function/Function.cs" Line="1193" Column="45" /> |
| | | <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="141" Column="30" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="304" Column="1" /> |
| | | <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="367" Column="51" /> |
| | | <File FileName="HDL_ON/Entity/Enumerative/MyEnum.cs" Line="15" Column="6" /> |
| | | <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="1713" Column="27" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="631" Column="50" /> |
| | | <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="855" Column="46" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneAddPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" Line="20" Column="41" /> |
| | | <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneCatchFunctionListPage.cs" Line="170" Column="82" /> |
| | | <File FileName="HDL_ON/Entity/Function/Scene.cs" Line="440" Column="23" /> |
| | | </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="Mqtt" expanded="True" /> |
| | | <Node name="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True" /> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="CSS" expanded="True" /> |
| | | <Node name="UI0-Public" expanded="True" /> |
| | | <Node name="UI0-Stan" expanded="True"> |
| | | <Node name="Form" expanded="True"> |
| | | <Node name="Base" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True"> |
| | | <Node name="Enumerative" expanded="True" /> |
| | | <Node name="Function" expanded="True"> |
| | | <Node name="Scene.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI0-Public" expanded="True" /> |
| | | <Node name="UI1-Login" expanded="True" /> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="2-Classification" expanded="True"> |
| | | <Node name="ClassificationPage.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="3-Intelligence" expanded="True" /> |
| | | <Node name="4-PersonalCenter" expanded="True"> |
| | | <Node name="RoomListManage" expanded="True" /> |
| | | <Node name="2-Classification" expanded="True" /> |
| | | <Node name="3-Intelligence" expanded="True"> |
| | | <Node name="Scene" expanded="True" /> |
| | | </Node> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Electrical" expanded="True" /> |
| | | <Node name="1ContorlPage" expanded="True" /> |
| | | <Node name="FoolHeating" expanded="True" /> |
| | | <Node name="Light" expanded="True" /> |
| | | <Node name="Music" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_Android" expanded="True"> |
| | | <Node name="Assets" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Classification" expanded="True" /> |
| | | <Node name="FunctionIcon" expanded="True"> |
| | | <Node name="IrFan" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="Assets" expanded="True" /> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True"> |
| | | <Node name="Resources" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Classification" expanded="True"> |
| | | <Node name="Room" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="Other" expanded="True" /> |
| | | <Node name="Resources" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </State> |
| | |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" line="118" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" line="546" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" line="213" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" relfile="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" line="232" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs" line="79" column="1" /> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="44" column="1" /> |
| | | </BreakpointStore> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <MultiItemStartupConfigurations /> |
| | |
| | | 333=Floor cooling power |
| | | 334=Adjust the percentage |
| | | 335=No delay |
| | | 336=No scene |
| | | 336=No scene available. Add one! |
| | | 337=Edit the scene |
| | | 338=The name of the scene can not be blank. |
| | | 339=The name of the scene has existed, please revise. |
| | |
| | | 476=Add residence |
| | | 477=Swing |
| | | 478=Pattern |
| | | 479=Air volume |
| | | 479=Speed |
| | | |
| | | |
| | | |
| | | 1000=Room Humidity |
| | | 1001=V-chip |
| | |
| | | 476=添加住宅 |
| | | 477=摆动 |
| | | 478=模式 |
| | | 479=风量 |
| | | 479=风速 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\IrFan\SpeedIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\IrFan\SpeedIconOn.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Classification\Room\AllCloseIcon2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irfan_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irfan_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irfan.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" /> |
| | |
| | | { |
| | | pushMes.messageType = jpushExpandData.messageType; |
| | | pushMes.expantContent = jpushExpandData.expantContent; |
| | | pushMes.HomeId = jpushExpandData.homeId; |
| | | Utlis.WriteLine("PushMes messageType : " + pushMes.messageType); |
| | | } |
| | | |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202106171" android:versionName="1.2.202106171" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202106291" android:versionName="1.2.202106291" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> |
| | | <!-- 可视对讲权限--> |
| | | <uses-permission android:name="android.permission.CAMERA" /> |
| | |
| | | var expandData = ""; |
| | | var messageType = ""; |
| | | var expantContent = ""; |
| | | var homeId = ""; |
| | | if (userInfo.ContainsKey(new NSString("expandData"))) |
| | | { |
| | | var expandDataStr = userInfo["expandData"] as NSString; |
| | |
| | | Utlis.WriteLine("expantContent: " + expantContent); |
| | | } |
| | | |
| | | if (expandDataNSD.ContainsKey(new NSString("homeId"))) |
| | | { |
| | | homeId = expandDataNSD["homeId"].ToString(); |
| | | Utlis.WriteLine("homeId: " + homeId); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | var pushMes = new JPushMessageInfo() |
| | | { |
| | | HomeId = homeId, |
| | | Title = title, |
| | | Content = body, |
| | | Extras = expandData, |
| | |
| | | <MtouchLink>SdkOnly</MtouchLink> |
| | | <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> |
| | | <MtouchI18n>cjk</MtouchI18n> |
| | | <CodesignProvision>On+_Hoc20210401-1</CodesignProvision> |
| | | <CodesignProvision>ComHdlOnProAdHoc20210616-1</CodesignProvision> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="System" /> |
| | |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\IrFan\HeadSwingingIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\IrFan\HeadSwingingIconOn.png" /> |
| | | <BundleResource Include="Resources\Phone\Classification\Room\AllCloseIcon2.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irfan.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irfan_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irfan_white.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.2.202106082</string> |
| | | <string>1.2.202106281</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.2.06082</string> |
| | | <string>1.2.06281</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | 333=Floor cooling power |
| | | 334=Adjust the percentage |
| | | 335=No delay |
| | | 336=No scene |
| | | 336=No scene available. Add one! |
| | | 337=Edit the scene |
| | | 338=The name of the scene can not be blank. |
| | | 339=The name of the scene has existed, please revise. |
| | |
| | | 476=Add residence |
| | | 477=Swing |
| | | 478=Pattern |
| | | 479=Air volume |
| | | 479=Speed |
| | | |
| | | |
| | | |
| | | 1000=Room Humidity |
| | | 1001=V-chip |
| | |
| | | 476=添加住宅 |
| | | 477=摆动 |
| | | 478=模式 |
| | | 479=风量 |
| | | 479=风速 |
| | | |
| | | |
| | | 1000=室内湿度 |
| | |
| | | if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) |
| | | { |
| | | //报警推送弹窗提示 |
| | | ShowAlarmPushMessage(jpushMessageInfo); |
| | | ShowAlarmPushMessage(jpushMessageInfo,true); |
| | | } |
| | | else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) |
| | | { |
| | |
| | | |
| | | ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo); |
| | | |
| | | } |
| | | else if(jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString())) |
| | | { |
| | | ShowAlarmPushMessage(jpushMessageInfo, false); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// 报警推送弹窗提示,点击查看跳转信息中心 |
| | | /// </summary> |
| | | /// <param name="jpushMessageInfo"></param> |
| | | public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo) |
| | | /// <param name="isAlarm">是否是报警信息,(加载的弹窗颜色不一样)</param> |
| | | public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo,bool isAlarm) |
| | | { |
| | | //没登录不处理 |
| | | if (UserInfo.Current == null || !UserInfo.Current.IsLogin || MainPage.BasePageView == null) |
| | |
| | | //跳转信息中心页面 |
| | | Action goAction = () => |
| | | { |
| | | //查看对应住宅的信息,要切换到对应住宅 |
| | | if (jpushMessageInfo.HomeId != DB_ResidenceData.Instance.CurrentRegion.id) |
| | | { |
| | | var homeTemp = UserInfo.Current.regionList.Find((obj) => jpushMessageInfo.HomeId == obj.id); |
| | | if (homeTemp != null) |
| | | { |
| | | DB_ResidenceData.Instance.CurrentRegion = homeTemp; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | DB_ResidenceData.Instance.EixtAccount(); |
| | | //刷新住宅数据 |
| | | Common.ApiUtlis.Ins.DownloadData(); |
| | | while (MainPage.BasePageView.ChildrenCount > 1) |
| | | { |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 2; |
| | | } |
| | | MainPage.CurPageIndex = 9999; |
| | | MainPage.UserBasePage.ChooseCollection(); |
| | | } |
| | | } |
| | | //Dialog |
| | | alarmPushConfirmDialog = null; |
| | | Action backAction = () => |
| | |
| | | //防止多次弹窗处理 |
| | | if (alarmPushConfirmDialog == null) |
| | | { |
| | | alarmPushConfirmDialog = new ConfirmDialog(); |
| | | alarmPushConfirmDialog = new ConfirmDialog(isAlarm); |
| | | alarmPushConfirmDialog.ShowDialog(Language.StringByID(StringId.Tip), jpushMessageInfo.Content, goAction, cancelAction, StringId.Cancel, StringId.LookOver); |
| | | } |
| | | else |
| | |
| | | { |
| | | m_Current = new UserInfo() |
| | | { |
| | | ID = "体验账号1234567890", |
| | | ID = "1234567890", |
| | | userName = "体验账号", |
| | | AccountString = "体验账号", |
| | | userMobileInfo = "体验账号", |
| | |
| | | { |
| | | b1 += (byte)(16 + wm); |
| | | } |
| | | if (commandDictionary.ContainsKey("temp")) |
| | | if (commandDictionary.ContainsKey("set_temp")) |
| | | { |
| | | var dicTempString = ""; |
| | | commandDictionary.TryGetValue("temp", out dicTempString); |
| | | commandDictionary.TryGetValue("set_temp", out dicTempString); |
| | | var dicTemp = Convert.ToByte(dicTempString); |
| | | var mode = function.GetAttrState(FunctionAttributeKey.Mode); |
| | | switch (mode) |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //7 湿度设定 % |
| | | //8 室内温度值 ℃ |
| | | byte indoorTemp_airFrsh = 0; |
| | | if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorTemp) == true) |
| | | { |
| | | indoorTemp_airFrsh= Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorTemp]); |
| | | } |
| | | byte indoorHumidity_airFrsh = 0; |
| | | if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorHumidity) == true) |
| | | { |
| | | indoorHumidity_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorHumidity]); |
| | | } |
| | | //9 室内湿度值 ℃ |
| | | //10 过滤网剩余 % |
| | | //11 过滤网使用超时 1 超时 0 无 |
| | | //11 过滤网使用超时 1 超时 0 无 |
| | | ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] { |
| | | function.bus.LoopId,0, switchValue , |
| | | 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)), |
| | | indoorTemp_airFrsh, |
| | | indoorHumidity_airFrsh, |
| | | //Convert.ToByte( function.GetAttrState(FunctionAttributeKey.FilterRemain)), |
| | | //function.GetAttrState(FunctionAttributeKey.FilterTimeout) =="true"?1:0, |
| | | 0,0 |
| | | }); |
| | | break; |
| | | } |
| | |
| | | { |
| | | ddd += bb + ","; |
| | | } |
| | | MainPage.Log(((int)command) + " : " + ddd); |
| | | MainPage.Log($"bus命令:"+ ((int)command) + " : 数据:" + ddd); |
| | | #endif |
| | | //处理是否要重发数据 |
| | | ManagerReceive(subnetID, deviceID, command, usefulBytes); |
| | |
| | | }; |
| | | |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | //appHomeRefresh:住宅数据刷新通知--杨涛 |
| | | var appHomeRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //住宅消息变更推送--豆豆 |
| | | var residenceChange = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //appRoomRefresh:房间数据刷新通知 |
| | |
| | | //appDeviceRefresh:设备数据刷新通知 |
| | | var appDeviceRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up", |
| | | Topic = $"/user/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/app/thing/event/appHomeRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //一端口密钥更新通知 |
| | |
| | | Utlis.WriteLine("开始订阅!"); |
| | | var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { |
| | | pirStatus,pirStudy, |
| | | appDeviceRefresh,appHomeRefresh,appRoomRefresh, |
| | | appDeviceRefresh,appHomeRefresh,appRoomRefresh,residenceChange, |
| | | topicFilterPush2, topicAlinkStatus ,mqttkeyChange}); |
| | | if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0) |
| | | { |
| | |
| | | } |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up" |
| | | || topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up") |
| | | { |
| | | MainPage.Log("住宅数据刷新通知"); |
| | | new HttpServerRequest().GetHomePager(); |
| | |
| | | #endregion |
| | | |
| | | //(4)===========开始连接过程========== |
| | | |
| | | ////一端口每次都要刷新密钥 |
| | | //if (DB_ResidenceData.Instance.HomeGateway != null && DB_ResidenceData.Instance.HomeGateway.gatewayType == "BUSUDPGATEWAY") { |
| | | // var pm = new HttpServerRequest(); |
| | | // var result = pm.GetHomeGatewayList(); |
| | | // if(result == StateCode.SUCCESS) |
| | | // { |
| | | // MainPage.Log($"刷新一端口密钥"); |
| | | // MainPage.Log($"旧密钥:{mqttEncryptKey}"); |
| | | // mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey; |
| | | // MainPage.Log($"新密钥:{mqttEncryptKey}"); |
| | | // }else |
| | | // { |
| | | // return; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | |
| | | //之前已经获取参数成功过 |
| | | if (MqttInfoConfig.Current.IfGetMqttInfoSuccess) |
| | | { |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj() |
| | | { |
| | | pushId = OnAppConfig.Instance.PushId, |
| | | pushType = pushType |
| | | pushType = pushType, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson); |
| | | } |
| | |
| | | public class JPushMessageInfo |
| | | { |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string HomeId; |
| | | /// <summary> |
| | | /// 推送标题 |
| | | /// </summary> |
| | | public string Title; |
| | |
| | | public class ExpandData |
| | | { |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string homeId; |
| | | /// <summary> |
| | | /// 附加内容 |
| | | /// </summary> |
| | | public string expantContent; |
| | |
| | | public static List<string> ArmSensorSpkList() |
| | | { |
| | | var spkList = new List<string>(); |
| | | spkList.Add(SensorLight); |
| | | //spkList.Add(SensorLight); |
| | | spkList.Add(SensorPir); |
| | | spkList.Add(SensorDoorWindow); |
| | | spkList.Add(SensorSmoke); |
| | | spkList.Add(SensorWater); |
| | | spkList.Add(SensorGas); |
| | | spkList.Add(SensorShanLan); |
| | | spkList.Add(SensorDuiShe); |
| | | spkList.Add(SensoruUtrasonic); |
| | | spkList.Add(SensorDryContact); |
| | | //spkList.Add(SensorGas); |
| | | //spkList.Add(SensorShanLan); |
| | | //spkList.Add(SensorDuiShe); |
| | | //spkList.Add(SensoruUtrasonic); |
| | | //spkList.Add(SensorDryContact); |
| | | spkList.Add(SenesorMegahealth); |
| | | return spkList; |
| | | } |
| | |
| | | spkList.Add(TvIr); |
| | | spkList.Add(TvXmIr); |
| | | spkList.Add(ElectricFan); |
| | | spkList.Add(FanIr); |
| | | spkList.Add(ClothesHanger); |
| | | spkList.Add(IrLearn); |
| | | spkList.Add(PjtIr); |
| | |
| | | if (sfs.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | if (sfs.value == "off") |
| | | { |
| | | return Language.StringByID(StringId.Close); |
| | | } |
| | | } |
| | | } |
| | | sceneFunctionInfo += Language.StringByID(StringId.Open) + " "; |
| | |
| | | /// <para>false:直接无条件添加</para></param> |
| | | public void IniFunctionList(string filePath, bool checkRepeat = false) |
| | | { |
| | | //MainPage.Log("12346890sdkxghjkl"); |
| | | // todo 增加设备,增加功能进功能列表 |
| | | if (filePath.StartsWith("FunctionData_")) |
| | | { |
| | |
| | | /// </summary> |
| | | public static PageLayout BasePageView { get; set; } |
| | | /// <summary> |
| | | /// 用户控制父容器 |
| | | /// </summary> |
| | | public static UserPage UserBasePage; |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.2.0617"; |
| | | public static string VersionString = "1.2.0629"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | if (NoLoginMode) |
| | | { |
| | | //跳转页面---- |
| | | var UserBasePage = new UserPage(); |
| | | UserBasePage = new UserPage(); |
| | | BasePageView.AddChidren(UserBasePage); |
| | | UserBasePage.LoadPage(); |
| | | BasePageView.PageIndex = 0; |
| | |
| | | addResidencePage.LoadView(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | try |
| | | { |
| | | Entity.FunctionList.List.Clear(); |
| | | Entity.SpatialInfo.CurrentSpatial.Clear(); |
| | | ///等待获取住宅信息 |
| | | Application.RunOnMainThread(() => |
| | | Application.RunOnMainThread( () => |
| | | { |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | |
| | | //跳转页面---- |
| | | var UserBasePage = new UserPage(); |
| | | UserBasePage = new UserPage(); |
| | | BasePageView.AddChidren(UserBasePage); |
| | | UserBasePage.LoadPage(); |
| | | BasePageView.PageIndex = 0; |
| | |
| | | /// bodyView |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// 是否加载报警颜色窗口(红色) |
| | | /// </summary> |
| | | bool isAlarmColor = false; |
| | | |
| | | /// <summary> |
| | | /// |
| | |
| | | public ConfirmDialog() |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ConfirmDialog(bool isAlarmColor) |
| | | { |
| | | this.isAlarmColor = isAlarmColor; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }; |
| | | |
| | | //this.Show(); |
| | | if(isAlarmColor) |
| | | { |
| | | btnTitle.TextColor = CSS_Color.WarningColor; |
| | | btnConfirm.TextColor = CSS_Color.MainBackgroundColor; |
| | | btnConfirm.BackgroundColor = CSS_Color.WarningColor; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //return; |
| | | if (b) |
| | | { |
| | | etAccount.Text = "15626203746";//测试服务器 |
| | | etAccount.Text = "tf@smarttech.com.ua";//国外账号,有住宅,登录无法显示 |
| | | //etAccount.Text = "13375012446";//测试服务器 |
| | | //etAccount.Text = "1033326940@qq.com"; |
| | | //etAccount.Text = "18022428438";//wjc |
| | |
| | | } |
| | | else |
| | | { |
| | | etAccount.Text = "464027401@qq.com";// |
| | | etAccount.Text = "15626203746"; |
| | | //etAccount.Text = "15018447586";//音乐数量刷新问题 |
| | | //etAccount.Text = "464027401@qq.com";// |
| | | //etAccount.Text = "15217626103";// |
| | | //etAccount.Text = "13682244600";//波哥 |
| | | //etAccount.Text = "13168123446";//昆明金茂项目,新风问题 |
| | | //etAccount.Text = "BB01010101@evoyo.com";//可视对讲 |
| | | //etAccount.Text = "13168123446"; |
| | | //etAccount.Text = "13676202754";//巴林服务器 |
| | |
| | | }; |
| | | accountView.AddChidren(etAccount); |
| | | |
| | | if (userInfo != null) |
| | | if (userInfo != null && userInfo.ID != "1234567890") |
| | | { |
| | | registerEmail = userInfo.userEmailInfo; |
| | | etAccount.Text = registerPhone = userInfo.userMobileInfo; |
| | |
| | | IsBold = true, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "体验模式" |
| | | Text = "Dome模式" |
| | | }; |
| | | bodyView.AddChidren(btnDomeLogin); |
| | | btnDomeLogin.MouseUpEventHandler = (sender, e) => { |
| | |
| | | var room1 = new Room() |
| | | { |
| | | roomId = "1405771366041378818", |
| | | roomName = "洗手间", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "洗手间" : "Restroom", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "47c98953-6fd4-4379-88b9-4b748963504f", |
| | | roomType = "ROOM", |
| | |
| | | homeId = "1396717478877241345", |
| | | createTime = "1623996986290", |
| | | modifyTime = "1623996986290", |
| | | floorRoomName = "1F-洗手间" |
| | | floorRoomName = "1F-Restroom" |
| | | }; |
| | | room1.SaveRoomFile(); |
| | | var room2 = new Room() |
| | | { |
| | | roomId = "1405771310345216001", |
| | | roomName = "主卧", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "168d27a1-9e53-42c0-95c9-f5cbf41ea167", |
| | | roomType = "ROOM", |
| | | parentId = "2348be0f-eec2-43c4-b74d-9b6037a5ba55", |
| | | homeId = "1396717478877241345", |
| | | createTime = "1623996973011", |
| | | modifyTime = "1623996973011", |
| | | floorRoomName = "1F-主卧" |
| | | }; |
| | | room2.SaveRoomFile(); |
| | | //var room2 = new Room() |
| | | //{ |
| | | // roomId = "1405771310345216001", |
| | | // roomName = Language.CurrentLanguage == "Chinese"? "主卧" : "Master bedroom", |
| | | // roomImage = "Classification/Room/Roombg.png", |
| | | // uid = "168d27a1-9e53-42c0-95c9-f5cbf41ea167", |
| | | // roomType = "ROOM", |
| | | // parentId = "2348be0f-eec2-43c4-b74d-9b6037a5ba55", |
| | | // homeId = "1396717478877241345", |
| | | // createTime = "1623996973011", |
| | | // modifyTime = "1623996973011", |
| | | // floorRoomName = "1F-Master bedroom" |
| | | //}; |
| | | //room2.SaveRoomFile(); |
| | | var room3 = new Room() |
| | | { |
| | | roomId = "1405771193802285057", |
| | | roomName = "餐厅", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "餐厅" : "Restaurant", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "ed7fc784-aace-44b8-97a3-bc3e727e598b", |
| | | roomType = "ROOM", |
| | |
| | | homeId = "1396717478877241345", |
| | | createTime = "1623996945225", |
| | | modifyTime = "1623996945225", |
| | | floorRoomName = "1F-餐厅" |
| | | floorRoomName = "1F-Restaurant" |
| | | }; |
| | | room3.SaveRoomFile(); |
| | | var room4 = new Room() |
| | | { |
| | | roomId = "1405771024583090178", |
| | | roomName = "客厅", |
| | | roomName = Language.CurrentLanguage == "Chinese"? "客厅" : "Drawing room", |
| | | roomImage = "Classification/Room/Roombg.png", |
| | | uid = "9191a3a2-026f-4667-a0b1-e3af699e7295", |
| | | roomType = "ROOM", |
| | |
| | | homeId = "1396717478877241345", |
| | | createTime = "1623996904880", |
| | | modifyTime = "1623996904880", |
| | | floorRoomName = "1F-客厅" |
| | | floorRoomName = "1F-Drawing room" |
| | | }; |
| | | room4.SaveRoomFile(); |
| | | var floor = new SpatialInfo() |
| | |
| | | |
| | | SpatialInfo.CurrentSpatial.FloorList.Add(floor); |
| | | SpatialInfo.CurrentSpatial.RoomList.Add(room1); |
| | | SpatialInfo.CurrentSpatial.RoomList.Add(room2); |
| | | //SpatialInfo.CurrentSpatial.RoomList.Add(room2); |
| | | SpatialInfo.CurrentSpatial.RoomList.Add(room3); |
| | | SpatialInfo.CurrentSpatial.RoomList.Add(room4); |
| | | |
| | |
| | | { |
| | | sid = "light1", |
| | | deviceId = "light1", |
| | | name = "RGB1", |
| | | name = Language.CurrentLanguage == "Chinese"? "客厅氛围灯1": "RGB light 1", |
| | | spk = SPK.LightRGB, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | collect = true, |
| | |
| | | { |
| | | sid = "light2", |
| | | deviceId = "light2", |
| | | name = "RGB2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "客厅氛围灯2" : "RGB light 2", |
| | | spk = SPK.LightRGB, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "light3", |
| | | deviceId = "light3", |
| | | name = "CCT1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "阅读灯" : "CCT light", |
| | | spk = SPK.LightCCT, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "light4", |
| | | deviceId = "light4", |
| | | name = "开关灯1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "大灯" : "light 1" , |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "light5", |
| | | deviceId = "light5", |
| | | name = "开关灯2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开关灯" : "light 2", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "curtain1", |
| | | deviceId = "curtain1", |
| | | name = "开合帘", |
| | | name = Language.CurrentLanguage == "Chinese" ? "开合帘" : "Curtain 1", |
| | | spk = SPK.CurtainTrietex, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "curtain2", |
| | | deviceId = "curtain2", |
| | | name = "卷帘", |
| | | name = Language.CurrentLanguage == "Chinese" ? "卷帘" : "Curtain 2", |
| | | spk = SPK.CurtainRoller, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "floorheat1", |
| | | deviceId = "floorheat1", |
| | | name = "地暖", |
| | | name = Language.CurrentLanguage == "Chinese" ? "地暖" : "Floorheat 1", |
| | | spk = SPK.FloorHeatStandard, |
| | | roomIds = new List<string>() { "1405771024583090178"}, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "scene1", |
| | | userSceneId = "scene1", |
| | | name = "明亮模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "明亮模式" : "Bright scene", |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | gatewayId = "1234567890123456", |
| | | collect = true, |
| | |
| | | { |
| | | sid = "scene2", |
| | | userSceneId = "scene2", |
| | | name = "浪漫模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "浪漫模式" : "Romantic scene", |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | gatewayId = "1234567890123456", |
| | | collect = false, |
| | |
| | | { |
| | | sid = "light6", |
| | | deviceId = "light6", |
| | | name = "餐厅灯1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "餐厅灯1" : "Dining room light 1", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "light7", |
| | | deviceId = "light7", |
| | | name = "餐厅灯2", |
| | | name = Language.CurrentLanguage == "Chinese" ? "餐厅灯2" : "Dining room light 2", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | { |
| | | sid = "scene3", |
| | | userSceneId = "scene3", |
| | | name = "温馨模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "温馨模式" : "Warm scene", |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = true, |
| | |
| | | { |
| | | sid = "scene4", |
| | | userSceneId = "scene4", |
| | | name = "西餐模式", |
| | | name = Language.CurrentLanguage == "Chinese" ? "西餐模式" : "Western food mode", |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = false, |
| | |
| | | { |
| | | sid = "ac1", |
| | | deviceId = "ac1", |
| | | name = "卧室空调", |
| | | name = Language.CurrentLanguage == "Chinese" ? "卧室空调" : "Bedroom air conditioning", |
| | | spk = SPK.AcStandard, |
| | | roomIds = new List<string>() { room3.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | } |
| | | }; |
| | | ac.SaveFunctionFile(); |
| | | var scene5 = new Scene() |
| | | { |
| | | sid = "scene5", |
| | | userSceneId = "scene5", |
| | | name = "阅读", |
| | | roomIds = new List<string>() { room2.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = true, |
| | | }; |
| | | scene5.SaveSceneFile(); |
| | | var scene6 = new Scene() |
| | | { |
| | | sid = "scene6", |
| | | userSceneId = "scene6", |
| | | name = "起床", |
| | | roomIds = new List<string>() { room2.roomId }, |
| | | gatewayId = "1234567890123456", |
| | | collect = false, |
| | | }; |
| | | scene6.SaveSceneFile(); |
| | | //var scene5 = new Scene() |
| | | //{ |
| | | // sid = "scene5", |
| | | // userSceneId = "scene5", |
| | | // name = Language.CurrentLanguage == "Chinese" ? "阅读" : "Reading mode", |
| | | // roomIds = new List<string>() { room2.roomId }, |
| | | // gatewayId = "1234567890123456", |
| | | // collect = true, |
| | | //}; |
| | | //scene5.SaveSceneFile(); |
| | | //var scene6 = new Scene() |
| | | //{ |
| | | // sid = "scene6", |
| | | // userSceneId = "scene6", |
| | | // name = Language.CurrentLanguage == "Chinese" ? "起床" : "Wake up scene", |
| | | // roomIds = new List<string>() { room2.roomId }, |
| | | // gatewayId = "1234567890123456", |
| | | // collect = false, |
| | | //}; |
| | | //scene6.SaveSceneFile(); |
| | | #endregion |
| | | |
| | | |
| | |
| | | { |
| | | sid = "lightSwitch6", |
| | | deviceId = "lightSwitch6", |
| | | name = "洗手间灯", |
| | | name = Language.CurrentLanguage == "Chinese" ? "洗手间灯" : "Toilet light", |
| | | spk = SPK.LightSwitch, |
| | | roomIds = new List<string>() { room1.roomId }, |
| | | attributes = new List<FunctionAttributes>() |
| | |
| | | |
| | | var fileList = Common.FileUtlis.Files.ReadFiles(); |
| | | |
| | | foreach (var file in fileList) |
| | | { |
| | | FunctionList.List.IniFunctionList(file,true); |
| | | } |
| | | //foreach (var file in fileList) |
| | | //{ |
| | | // FunctionList.List.IniFunctionList(file,true); |
| | | //} |
| | | |
| | | Room.CurrentSpatial.InitRoomListFunctions(); |
| | | |
| | |
| | | }; |
| | | #endregion |
| | | |
| | | #region 分享与功能 |
| | | #region 分享与功能 |
| | | shareMenuButton = new MenuButton() |
| | | { |
| | | X = allMenuButton.Right, |
| | |
| | | MenuButtonSelect(1); |
| | | }; |
| | | shareMenuButton.SelectAction = shateAction; |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 报警类 |
| | | alarmMenuButton = new MenuButton() |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | //需要移动的高度 |
| | | var runHeight = Application.GetRealWidth(i / 2 * 142); |
| | | var runHeight = Application.GetRealWidth(i * 142); |
| | | |
| | | int runCount = 0; |
| | | //循环次数,动画效果需要在1秒 (10次)内完成 |
| | | while (runCount == 9) |
| | | while (runCount < 9) |
| | | { |
| | | System.Threading.Thread.Sleep(100); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (childView.GetType() == typeof(FrameLayout)) |
| | |
| | | } |
| | | if (i > 0) |
| | | { |
| | | childView.Y += runDirection * Application.GetRealWidth(14 * i / 2); |
| | | childView.Y += runDirection * Application.GetRealWidth(14 * i); |
| | | } |
| | | }); |
| | | runCount++; |
| | | System.Threading.Thread.Sleep(8); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | { |
| | | if (runDirection == 1) |
| | | { |
| | | childView.Height = Application.GetRealWidth(192); |
| | | childView.Height = Application.GetRealWidth(192+20); |
| | | } |
| | | else |
| | | { |
| | | childView.Height = Application.GetRealWidth(70); |
| | | childView.Height = Application.GetRealWidth(70+20); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start(); |
| | | |
| | | //if (childView.GetType() == typeof(Button)) |
| | | //{ |
| | | // new System.Threading.Thread(() => { |
| | | // //循环次数,动画效果需要在1秒 (10次)内完成 |
| | | // int runCount = 9; |
| | | // //需要移动的高度 |
| | | // var runHeight = i / 2 * Application.GetRealWidth(142); |
| | | |
| | | // while (runCount == 0) |
| | | // { |
| | | // System.Threading.Thread.Sleep(100); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // childView.Height += Application.GetRealWidth(14) * runDirection; |
| | | // }); |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // if (runDirection == 1) |
| | | // { |
| | | // childView.Height = Application.GetRealWidth(192 + 20); |
| | | // } |
| | | // else |
| | | // { |
| | | // childView.Height = Application.GetRealWidth(70 + 20); |
| | | // } |
| | | // }); |
| | | // }) |
| | | // { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start(); |
| | | //} |
| | | |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | roomView.RemoveAll(); |
| | | roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | roomView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | var roomViewbg = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | |
| | | var roomViewbgColor = new Button() |
| | | { |
| | | Height = Application.GetRealWidth(192), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = 0x19333333, |
| | | }; |
| | |
| | | roomView.AddChidren(btnAllClose); |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(192), |
| | | Height = Application.GetRealWidth(20), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(btn); |
| | | //var btn = new Button() |
| | | //{ |
| | | // Y = Application.GetRealWidth(192), |
| | | // Height = Application.GetRealWidth(20), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //roomView.AddChidren(btn); |
| | | |
| | | roomViewbgColor.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | { |
| | | roomView.RemoveAll(); |
| | | roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | roomView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | |
| | | var viewbg = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(70), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(viewbg); |
| | | |
| | | var btnRoomName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(12 - 2), |
| | | //Y = Application.GetRealHeight(12 - 2), |
| | | Width = Application.GetRealWidth(266), |
| | | Height = Application.GetRealHeight(52), |
| | | Text = room.roomName, |
| | |
| | | var btnFloorName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(42), |
| | | Y = Application.GetRealHeight(19), |
| | | Width = Application.GetRealWidth(266), |
| | | Height = Application.GetRealHeight(46), |
| | | Text = room.floorName, |
| | |
| | | var btnAllClose = new Button() |
| | | { |
| | | X = Application.GetRealWidth(288), |
| | | Gravity = Gravity.CenterVertical, |
| | | Y = Application.GetRealWidth(10), |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | UnSelectedImagePath = "Classification/Room/AllCloseIcon2.png", |
| | |
| | | roomView.AddChidren(btnAllClose); |
| | | LoadEvent_CloseAllFunction(btnAllClose, room); |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(70), |
| | | Height = Application.GetRealWidth(20), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | roomView.AddChidren(btn); |
| | | //var btn = new Button() |
| | | //{ |
| | | // Y = Application.GetRealWidth(70), |
| | | // Height = Application.GetRealWidth(20), |
| | | // BackgroundColor = CSS_Color.BackgroundColor, |
| | | //}; |
| | | //roomView.AddChidren(btn); |
| | | |
| | | roomViewbg.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | | functionCount = FunctionList.List.GetAirFreshList().Count; |
| | | functionOnCount = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.Music: |
| | | functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | if(functionCount == 0) |
| | | { |
| | | functionCount = FunctionList.List.GetMusicList().Count; |
| | | } |
| | | //functionCount = Music.A31MusicModel.A31MusicModelList.Count; |
| | | //functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | //if(functionCount == 0) |
| | | //{ |
| | | // functionCount = FunctionList.List.GetMusicList().Count; |
| | | //} |
| | | functionCount = 1; |
| | | break; |
| | | case ShowFunction.Panel: |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | functionCount = 1; |
| | | if (!MainPage.NoLoginMode) |
| | | { |
| | | functionCount = 1; |
| | | } |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | |
| | | functionView.AddChidren(btnName); |
| | | |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter |
| | | && functionCount != 0) |
| | | { |
| | |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) == "0", |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "off", |
| | | Tag = function.sid + "_off" |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainClose); |
| | |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", |
| | | Tag = function.sid + "_on", |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0" |
| | | IsSelected = function.GetAttrState(FunctionAttributeKey.OnOff) == "on", |
| | | }; |
| | | bodyDiv.AddChidren(btnCurtainOpen); |
| | | if (function.spk == SPK.CurtainRoller) |
| | |
| | | // } |
| | | // catch { } |
| | | //} |
| | | |
| | | if (temp != null) |
| | | { |
| | | temp = sceneFunction; |
| | |
| | | { |
| | | row.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); |
| | | } |
| | | else |
| | | { |
| | | if(sceneStatus.value == "stop") |
| | | { |
| | | sceneStatus.value = "on"; |
| | | } |
| | | } |
| | | Button btnRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | |
| | | } |
| | | btnExit.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | UserInfo.Current.ClearUserInfo(); |
| | | HDLCommon.Current.Logout(); |
| | | }; |
| | | bodyView.AddChidren(btnExit); |
| | |
| | | { |
| | | var regionId = (string)btnHomeName.Tag; |
| | | dialog.Close(); |
| | | //LoadEvent_ChangeCurHome(UserInfo.Current.regionList.Find((obj) => obj.RegionID == regionId)); |
| | | LoadEvent_ChangeCurHome(home); |
| | | LoadContentView(); |
| | | }; |
| | |
| | | var library = Newtonsoft.Json.JsonConvert.DeserializeObject<Library>(str); |
| | | if (library != null) |
| | | { |
| | | if (libraryList.Count < 40) |
| | | if (libraryList.Count < 60) |
| | | { |
| | | //限制40个库; |
| | | libraryList.Add(library); |
| | |
| | | this.RefreshNowDeviceStatuMemory(this.device); |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | |
| | | Control.Ins.SendReadCommand(device); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | this.FrameWhiteCentet1.AddChidren(btnFanView); |
| | | |
| | | //开关图标 |
| | | this.btnSwitch = new IconViewControl(40); |
| | | this.btnSwitch = new IconViewControl(32); |
| | | btnSwitch.Gravity = Gravity.CenterHorizontal; |
| | | btnSwitch.Y = Application.GetRealHeight(468); |
| | | btnSwitch.UnSelectedImagePath = "Public/PowerClose.png"; |
| | |
| | | dic[FunctionAttributeKey.Energy] = this.airFreshData.Energy; |
| | | //风速 |
| | | dic[FunctionAttributeKey.FanSpeed] = this.airFreshData.Fan ; |
| | | //室内温度 |
| | | dic[FunctionAttributeKey.IndoorTemp] = this.airFreshData.Indoor_temp.ToString(); |
| | | ///室内湿度 |
| | | dic[FunctionAttributeKey.IndoorHumidity] = this.airFreshData.Indoor_humidity.ToString(); |
| | | |
| | | return dic; |
| | | } |
| | |
| | | Language.StringByID(StringId.Mode), |
| | | ""); |
| | | patternView.Y = Application.GetRealHeight(263); |
| | | patternView.X = Application.GetRealWidth(57); |
| | | patternView.X = Application.GetRealWidth(36); |
| | | patternView.Width = Application.GetRealWidth(96); |
| | | patternView.Height = Application.GetRealHeight(74); |
| | | FrameWhiteCentet1.AddChidren(patternView); |
| | |
| | | Language.StringByID(StringId.HeadSwinging), |
| | | ""); |
| | | swingView.Y = Application.GetRealHeight(263); |
| | | swingView.X = Application.GetRealWidth(216); |
| | | swingView.X = Application.GetRealWidth(229-34); |
| | | swingView.Width = Application.GetRealWidth(96); |
| | | swingView.Height = Application.GetRealHeight(74); |
| | | FrameWhiteCentet1.AddChidren(swingView); |
| | |
| | | Language.StringByID(StringId.Timing), |
| | | ""); |
| | | timingView.Y = Application.GetRealHeight(366); |
| | | timingView.X = Application.GetRealWidth(57); |
| | | timingView.X = Application.GetRealWidth(36); |
| | | timingView.Width = Application.GetRealWidth(96); |
| | | timingView.Height = Application.GetRealHeight(74); |
| | | FrameWhiteCentet1.AddChidren(timingView); |
| | |
| | | "FunctionIcon/IrFan/SpeedIconOn.png", |
| | | Language.StringByID(StringId.AirVolume), |
| | | ""); |
| | | airVolumeView.Y = Application.GetRealHeight(263); |
| | | airVolumeView.X = Application.GetRealWidth(216); |
| | | airVolumeView.Y = Application.GetRealHeight(366); |
| | | airVolumeView.X = Application.GetRealWidth(229 - 34); |
| | | airVolumeView.Width = Application.GetRealWidth(96); |
| | | airVolumeView.Height = Application.GetRealHeight(74); |
| | | FrameWhiteCentet1.AddChidren(airVolumeView); |
| | |
| | | |
| | | btnTitle = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Y = btnIcon.Bottom, |
| | | Text = title, |
| | | Height = Application.GetRealHeight(42), |
| | | Height = Application.GetRealHeight(30), |
| | | TextColor = CSS_Color.TextualColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | |
| | | btnIcon.MouseUpEventHandler = eventHandler; |
| | | btnTitle.MouseUpEventHandler = eventHandler; |
| | | btnIcon.MouseDownEventHandler = (sender, e) => { |
| | | btnTitle.IsSelected = true; |
| | | btnIcon.IsSelected = true; |
| | | }; |
| | | btnTitle.MouseDownEventHandler = (sender, e) => { |
| | | btnTitle.IsSelected = true; |
| | | btnIcon.IsSelected = true; |
| | | }; |
| | | btnIcon.MouseUpEventHandler += (sender, e) => { |
| | |
| | | System.Threading.Thread.Sleep(500); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnTitle.IsSelected = false; |
| | | btnIcon.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | System.Threading.Thread.Sleep(500); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnTitle.IsSelected = false; |
| | | btnIcon.IsSelected = false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | { |
| | | lightTemp.SetRGBcolor(e2,function); |
| | | colorChangeTime = DateTime.Now; |
| | | btnCurColor.BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function)); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.RGB, lightTemp.GetRGBcolorString(function)); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | } |
| | | |
| | | }; |
| | | colorPicker.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y); |
| | | if (pointIsRight == false) |
| | | { |
| | | //点的区域不是圆盘内 |
| | | return; |
| | | } |
| | | //显示白点 |
| | | btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2; |
| | | btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2; |
| | | if (btnWhiteRound.Visible == true) |
| | | { |
| | | btnWhiteRound.Visible = false; |
| | | } |
| | | }; |
| | | colorPicker.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | |
| | | btnWhiteRound.Visible = true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | colorPicker.MouseMoveEventHandler += (sender, e) => |
| | | { |
| | | //当鼠标点下事件处理 |
| | | colorPicker.MouseDownEventHandler(sender, e); |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | | pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y); |
| | | if (pointIsRight == false) |
| | | { |
| | | //点的区域不是圆盘内 |
| | | return; |
| | | } |
| | | //显示白点 |
| | | btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2; |
| | | btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2; |
| | | if (btnWhiteRound.Visible == false) |
| | | { |
| | | btnWhiteRound.Visible = true; |
| | | } |
| | | btnCurColor.BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function)); |
| | | }; |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 切换到收藏界面 |
| | | /// </summary> |
| | | void ChooseCollection() |
| | | public void ChooseCollection() |
| | | { |
| | | if (MainPage.CurPageIndex == 0) |
| | | { |