2个文件已添加
52个文件已修改
1 文件已重命名
| | |
| | | <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.26569F89-0BA9-4C06-81F2-764A3AF2E1B7" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs"> |
| | | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/HomePage.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" Line="66" Column="1" /> |
| | | <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="367" Column="38" /> |
| | | <File FileName="HDL_ON/Entity/FunctionList.cs" Line="143" Column="31" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="565" Column="50" /> |
| | | <File FileName="HDL_ON/Entity/Enumerative/MyEnum.cs" Line="171" Column="9" /> |
| | | <File FileName="HDL_ON/Entity/Room.cs" Line="58" Column="23" /> |
| | | <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="1" Column="1" /> |
| | | <File FileName="HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs" Line="66" Column="22" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="203" Column="92" /> |
| | | <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="165" Column="14" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs" Line="145" Column="60" /> |
| | | <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="29" Column="16" /> |
| | | </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="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="Entity" expanded="True"> |
| | | <Node name="Enumerative" expanded="True" /> |
| | | <Node name="Function" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="BindingResidence" expanded="True" /> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="1-HomePage" expanded="True"> |
| | | <Node name="MessageCenterPage.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="ArmCenter" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="HDL-ON_Android" expanded="True"> |
| | | <Node name="Assets" expanded="True" /> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True"> |
| | | <Node name="Other" expanded="True" /> |
| | | <Node name="Resources" expanded="True" /> |
| | | </Node> |
| | | <Node name="HDL-ON_iOS" expanded="True" selected="True" /> |
| | | </Node> |
| | | </State> |
| | | </Pad> |
| | |
| | | <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> |
| | | <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" /> |
| | |
| | | 7120=防拆功能 |
| | | 7121=在线 |
| | | 7122=不在线 |
| | | 7123=空气质量 |
| | | 7124=优 |
| | | 7125=良 |
| | | 7126=差 |
| | | 7127=发送通知 |
| | | 7128=通知内容 |
| | | 7129=(100字内) |
| | | 7130=账号选择 |
| | | 7131=App推送 |
| | | |
| | | |
| | | 9000=请使用新的手机账号登录APP |
| | | 9001=请使用新的邮箱账号登录APP |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104131" android:versionName="1.2.202104131" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104191" android:versionName="1.2.202104191" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> |
| | | <!-- 可视对讲权限--> |
| | | <uses-permission android:name="android.permission.CAMERA" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.2.202104131</string> |
| | | <string>1.2.202104201</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>202104131</string> |
| | | <string>202104201</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | 7120=防拆功能 |
| | | 7121=在线 |
| | | 7122=不在线 |
| | | 7123=空气质量 |
| | | 7124=优 |
| | | 7125=良 |
| | | 7126=差 |
| | | 7127=发送通知 |
| | | 7128=通知内容 |
| | | 7129=(100字内) |
| | | 7130=账号选择 |
| | | 7131=App推送 |
| | | |
| | | 9000=请使用新的手机账号登录APP |
| | | 9001=请使用新的邮箱账号登录APP |
| | |
| | | var pack = Ins.HttpRequest.GetSecurityList(); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(pack.Data.ToString()); |
| | | var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(pack.Data.ToString()); |
| | | var sidList = new List<string>(); |
| | | foreach (var function in packList) |
| | | { |
| | | sidList.Add(function.sid); |
| | | } |
| | | var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>()); |
| | | var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(infoListPack.Data.ToString()); |
| | | var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString()); |
| | | foreach (var function in infoList) |
| | | { |
| | | function.SaveFile(); |
| | |
| | | { |
| | | get |
| | | { |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null) |
| | | { |
| | | return AccountPath; |
| | | } |
| | | if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.RegionID)) |
| | | if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.id)) |
| | | { |
| | | regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.id); |
| | | if (!Directory.Exists(regionPath)) |
| | | { |
| | | Directory.CreateDirectory(regionPath); |
| | |
| | | /// <summary> |
| | | /// 账号注册服务器信息 |
| | | /// </summary> |
| | | public string RequestHttpsHost = "https://china.hdlcontrol.com"; |
| | | public string RequestHttpsHost ="https://china.hdlcontrol.com"; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | public const int fangchaigongneng = 7120; |
| | | public const int zaixian = 7121; |
| | | public const int buzaixian = 7122; |
| | | public const int kongqizhiliang = 7123; |
| | | public const int kongqiyou= 7124; |
| | | public const int kongqiliang = 7125; |
| | | public const int kongqicha = 7126; |
| | | public const int fasongtongzhi = 7127; |
| | | public const int tongzhineirong = 7128; |
| | | public const int xianzhichangdu = 7129; |
| | | public const int zhanghaoxuanze = 7130; |
| | | public const int apptuisong = 7131; |
| | | |
| | | #region LE新增 |
| | | /// <summary> |
| | |
| | | }; |
| | | var topicAlinkStatus = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //App订阅红外宝 / 网关遥控器添加成功通知 |
| | | var pirStatus = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //App订阅遥控器自学按键学习成功通知 |
| | | var pirStudy = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | var appHomeRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //appRoomRefresh:房间数据刷新通知 |
| | | var appRoomRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //appDeviceRefresh:设备数据刷新通知 |
| | | var appDeviceRefresh = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up", |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | #endregion |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null) |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null) |
| | | { |
| | | return; |
| | | } |
| | |
| | | ReceiveNotifySqueezeAsync(mMes); |
| | | } |
| | | //App订阅红外宝/网关遥控器添加成功通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString; |
| | | } |
| | | //App订阅遥控器自学按键学习成功通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | |
| | | } |
| | | #region 数据更新推送主题 |
| | | //appHomeRefresh:住宅数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up") |
| | | { |
| | | MainPage.Log("住宅数据刷新通知"); |
| | | new HttpServerRequest().GetHomePager(); |
| | | } |
| | | //appRoomRefresh:房间数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up") |
| | | { |
| | | MainPage.Log("房间数据刷新通知"); |
| | | var roomResult = new HttpServerRequest().GetRoomList(); |
| | |
| | | } |
| | | } |
| | | //appDeviceRefresh:设备数据刷新通知 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up") |
| | | { |
| | | MainPage.Log("设备数据刷新通知"); |
| | | var deviceResult = new HttpServerRequest().GetDeviceList(); |
| | |
| | | } |
| | | #endregion |
| | | //A网关设备状态-包含涂鸦设备 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send") |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | |
| | | mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey; |
| | | //解密密钥规则:已现有的住宅ID为基准,从右边一一获取值,最后如果不够16位,则往右补零 |
| | | string aesKey = string.Empty; |
| | | for (int i = DB_ResidenceData.Instance.CurrentRegion.RegionID.Length - 1; i >= 0; i--) |
| | | for (int i = DB_ResidenceData.Instance.CurrentRegion.id.Length - 1; i >= 0; i--) |
| | | { |
| | | aesKey += DB_ResidenceData.Instance.CurrentRegion.RegionID[i].ToString(); |
| | | aesKey += DB_ResidenceData.Instance.CurrentRegion.id[i].ToString(); |
| | | if (aesKey.Length == 16) { break; } |
| | | } |
| | | aesKey = aesKey.PadRight(16, '0'); |
| | |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("type", qType); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", new List<string>() { deviceId }); |
| | | d.Add("key", new List<string>() { deviceKey }); |
| | | |
| | |
| | | public ResponsePackNew GetArmSensorHistory( string deviceId,string pageSize, string pageNo) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("pageSize", pageSize); |
| | | d.Add("pageNo", pageNo); |
| | |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | UserInfo.Current.regionList = new List<RegionInfoRes>(); |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); |
| | | if (homeList == null || homeList.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | foreach (var mHome in homeList) |
| | | foreach (var home in homeList) |
| | | { |
| | | var home = new RegionInfoRes() |
| | | { |
| | | RegionID = mHome.Id, |
| | | Name = mHome.homeName, |
| | | IsOthreShare = mHome.IsOtherShare, |
| | | accountType = mHome.accountType, |
| | | isRemoteControl = mHome.isRemoteControl, |
| | | isBindGateway = mHome.isBindGateway, |
| | | longitude = mHome.longitude, |
| | | latitude = mHome.latitude, |
| | | deliverstatus = mHome.deliverstatus, |
| | | homeType = mHome.homeType, |
| | | regionUrl = mHome.regionUrl, |
| | | emqUrl = mHome.emqUrl, |
| | | homeRegionName = mHome.homeRegionName, |
| | | homeRegionId = mHome.homeRegionId, |
| | | Address = mHome.homeAddress, |
| | | isAllowCreateScene = mHome.isAllowCreateScene, |
| | | }; |
| | | //var home = new RegionInfoRes() |
| | | //{ |
| | | // RegionID = mHome.Id, |
| | | // Name = mHome.homeName, |
| | | // IsOthreShare = mHome.IsOtherShare, |
| | | // accountType = mHome.accountType, |
| | | // isRemoteControl = mHome.isRemoteControl, |
| | | // isBindGateway = mHome.isBindGateway, |
| | | // longitude = mHome.longitude, |
| | | // latitude = mHome.latitude, |
| | | // deliverstatus = mHome.deliverstatus, |
| | | // homeType = mHome.homeType, |
| | | // regionUrl = mHome.regionUrl, |
| | | // emqUrl = mHome.emqUrl, |
| | | // homeRegionName = mHome.homeRegionName, |
| | | // homeRegionId = mHome.homeRegionId, |
| | | // Address = mHome.homeAddress, |
| | | // isAllowCreateScene = mHome.isAllowCreateScene, |
| | | //}; |
| | | if (home.isBindGateway) |
| | | { |
| | | UserInfo.Current.regionList.Add(home); |
| | |
| | | return "null"; |
| | | } |
| | | //-------如果账号是首次登录 |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) |
| | | if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id)) |
| | | { |
| | | //刷新当前住宅 |
| | | DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0]; |
| | |
| | | else |
| | | { |
| | | //住宅被删除 |
| | | var findHome = UserInfo.Current.regionList.Find((obj) => obj.RegionID == DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | var findHome = UserInfo.Current.regionList.Find((obj) => obj.id == DB_ResidenceData.Instance.CurrentRegion.id); |
| | | if (findHome == null) |
| | | { |
| | | Shared.Application.RunOnMainThread(() => |
| | |
| | | { |
| | | var requestObj = new AddOrUpdateHomeObj() |
| | | { |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | |
| | | if (editId == 0) |
| | |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return ""; |
| | | var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.RegionID; |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id)) return ""; |
| | | var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.id; |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = nowhomeId }); |
| | | var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_GetGatewayList, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HomeGatewayInfo>>(revertObj.Data.ToString()); |
| | | if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.RegionID) |
| | | if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.id) |
| | | { |
| | | if (mHomeGatewayRes != null) |
| | | { |
| | |
| | | if (DB_ResidenceData.Instance.HomeGateway == null) |
| | | return StateCode.NETWORK_ERROR; |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | var jsonString = HttpUtil.GetSignRequestJson(d); |
| | | var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGatewayInfo, jsonString); |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetResidenceMemberAccount() |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id }); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_FindAll, requestJson); |
| | | } |
| | | |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj() |
| | | { |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | childAccountId = childAccountId, |
| | | nickName = nickName, |
| | | }); |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj() |
| | | { |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | childAccountId = childAccountId, |
| | | isAllowCreateScene = isAllow, |
| | | }); |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new GetShareObj() |
| | | { |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | childAccountId = childAccountId, |
| | | }); |
| | | |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Share_GetList, requestJson); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | ///// <summary> |
| | |
| | | public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName) |
| | | { |
| | | //添加子账号 |
| | | var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, account = subAccount, nickName = nickName }; |
| | | var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, account = subAccount, nickName = nickName }; |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); |
| | | |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// 获取住宅下的成员账号信息 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //public ResponsePack GetResidenceMemberAccountInfo(string account) |
| | | //{ |
| | | // Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | // d.Add("Account", account); |
| | | // string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | // return RequestHttps($"{severAddress}/ZigbeeUsers/GetSubAccountInfo", jsonString, true); |
| | | //} |
| | | /// <summary> |
| | | /// 修改住宅调试权限 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew ChangeResidenceDebugPerm(bool debugPerm) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("debugPerm", debugPerm); |
| | | string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_Post_Home_UpdateDebugPerm, jsonString); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | /// <summary> |
| | |
| | | public ResponsePackNew GetDeviceList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId); |
| | | //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//可控参数,当需要分页获取,怎么知道分页总数 |
| | | //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | |
| | | public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("productPlatform", productPlatform); |
| | | d.Add("productBrand", productBrand); |
| | | d.Add("networkConfig", true); |
| | |
| | | public ResponsePackNew GetDeviceInfo(string functionId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", new List<string>() { functionId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetDeviceInfoList(List<string> functionIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", functionIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew RefreshDeviceStatus(List<string> functionIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", functionIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew ControlDevice(List<ApiAlinkControlActionObj> actionObjs) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway == null ? "0" : DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); |
| | | d.Add("actions", actionObjs); |
| | | |
| | |
| | | public ResponsePackNew UpdataDevcieInfo(Function function) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", function.deviceId); |
| | | d.Add("name", function.name); |
| | | d.Add("collect", function.collect); |
| | |
| | | public ResponsePackNew UpdataDevcieBindRoomInfo(Function function) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", function.deviceId); |
| | | d.Add("roomIds", function.roomIds); |
| | | |
| | |
| | | public ResponsePackNew BindDeviceToRoom(List<string> deviceIds,List<string> roomIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", deviceIds); |
| | | d.Add("roomIds", roomIds); |
| | | |
| | |
| | | public string UnbindDeviceToRoom(string deviceId, string roomId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", new List<string>() { deviceId }); |
| | | d.Add("roomIds", new List<string>() { roomId }); |
| | | |
| | |
| | | public string EditDeviceName(string deviceId, string deviceName) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId); |
| | | d.Add("name", deviceName); |
| | | |
| | |
| | | public ResponsePackNew CollectDevice(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds",new List<string>() { deviceId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew CancelCollectDevice(string deviceId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", new List<string>() { deviceId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetSceneList(string roomId = null) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | if (roomId != null) |
| | | { |
| | | d.Add("roomId", roomId); |
| | |
| | | public ResponsePackNew AddScene(Scene scene) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("scenes", new List<Scene>() { scene }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew EditScene(Scene scene) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("scenes", new List<Scene>() { scene }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string DeleteScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string ExecuteScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string CollectScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public string CancelCollectScene(string userSceneId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userSceneIds", new List<string>() { userSceneId }); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetRoomList(string GetType = "All") |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | if (GetType != "All") |
| | | { |
| | | d.Add("roomType", GetType); |
| | |
| | | public ResponsePackNew AddRoom(List<SpatialInfo> rooms) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("rooms", rooms); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew UpdateRoom(List<SpatialInfo> rooms) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("rooms", rooms); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew DeleteRoom(List<string> roomIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("ids", roomIds); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetSecurityList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_List, requestJson); |
| | |
| | | public ResponsePackNew GetSecurityInfo(List<string> sidList, List<string> userSecurityIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | //sids userSecurityIds 不能同时为空 |
| | | d.Add("sids", sidList); |
| | |
| | | /// <summary> |
| | | /// 添加安防 |
| | | /// </summary> |
| | | public ResponsePackNew AddSecurity(List<Security> securities) |
| | | public ResponsePackNew AddSecurity(List<SecurityAlarm> securities) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | d.Add("securitys", securities); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | /// <summary> |
| | | /// 编辑安防 |
| | | /// </summary> |
| | | public ResponsePackNew EditSecurity(List<Security> securities) |
| | | public ResponsePackNew EditSecurity(List<SecurityAlarm> securities) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | d.Add("securitys", securities); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew DeleteSecurity(List<string> sidList, List<string> userSecurityIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | //sids userSecurityIds 不能同时为空 |
| | | d.Add("sids", sidList); |
| | |
| | | public ResponsePackNew ReadSecurityStatus(List<string> sidList, List<string> userSecurityIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | //sids userSecurityIds 不能同时为空 |
| | | d.Add("sids", sidList); |
| | |
| | | public ResponsePackNew SetSecurityStatus(List<SecurityState> securityStates) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("securitys", securityStates); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson); |
| | |
| | | public ResponsePackNew SetSecurityBypass(List<SecurityBypass> securityBypassStates) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("securitys", securityBypassStates); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_BypassSet, requestJson); |
| | |
| | | public ResponsePackNew ReadSecurityBypass(List<string> sidList, List<string> userSecurityIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | //sids userSecurityIds 不能同时为空 |
| | | d.Add("sids", sidList); |
| | |
| | | public ResponsePackNew GetSecurityLogList(string pageSize,string pageNo) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("pageSize", pageSize); |
| | | d.Add("pageNo", pageNo); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew GetSecurityAlarmLogList(string pageSize, string pageNo) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("pageSize", pageSize); |
| | | d.Add("pageNo", pageNo); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | |
| | | public ResponsePackNew Get3tyBindBrandList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetBindBrandList, requestJson); |
| | | |
| | |
| | | public ResponsePackNew CheckFlVideo() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson); |
| | | return pack; |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | { |
| | | urlHead = OnAppConfig.Instance.RequestHttpsHost; |
| | | } |
| | | //"https://bahrain-gateway.hdlcontrol.com"; |
| | | urlHead="https://china-gateway.hdlcontrol.com"; |
| | | string requestFullUrl = urlHead + apiPath; |
| | | |
| | | |
| | |
| | | /// 住宅迁移 |
| | | /// </summary> |
| | | public const string API_POST_Home_Transfer = "/home-wisdom/app/home/transfer"; |
| | | /// <summary> |
| | | /// 更改住宅权限 |
| | | /// </summary> |
| | | public const string API_Post_Home_UpdateDebugPerm = "/home-wisdom/app/home/updateDebugPerm"; |
| | | #endregion |
| | | |
| | | #region ■ 子账号 -- 添加住宅成员___________________________ |
| | |
| | | { |
| | | if (MainPage.NoLoginMode) |
| | | { |
| | | return new RegionInfoRes() { Name = "本地模式" }; |
| | | return new RegionInfoRes() { homeName = "本地模式" }; |
| | | } |
| | | else |
| | | { |
File was renamed from HDL_ON/Entity/Function/Security.cs |
| | |
| | | |
| | | namespace HDL_ON.Entity |
| | | { |
| | | public class Security |
| | | public class SecurityAlarm |
| | | { |
| | | /// <summary> |
| | | /// 安防sid |
| | |
| | | /// <summary> |
| | | /// 安防列表 |
| | | /// </summary> |
| | | public List<Security> securities = new List<Security>(); |
| | | public List<SecurityAlarm> securities = new List<SecurityAlarm>(); |
| | | |
| | | /// <summary> |
| | | /// 加载功能列表 |
| | |
| | | { |
| | | var dataBytes = FileUtlis.Files.ReadFile(filePath); |
| | | var dataString = System.Text.Encoding.UTF8.GetString(dataBytes); |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<Security>(dataString); |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityAlarm>(dataString); |
| | | if (temp == null) |
| | | { |
| | | MainPage.Log("null"); |
| | |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary>
|
| | | public string RegionID { get; set; }
|
| | | public string id { get; set; }
|
| | | /// <summary> |
| | | /// 住宅名称 |
| | | /// </summary>
|
| | | public string Name { get; set; }
|
| | | public string homeName { get; set; }
|
| | | /// <summary> |
| | | /// 住宅地址 |
| | | /// </summary>
|
| | | public string Address { get; set; } |
| | | public string homeAddress { get; set; } |
| | | /// <summary> |
| | | /// 是否为其他主用户分享过来的住宅 |
| | | /// </summary> |
| | | public bool IsOthreShare = false; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public List<HomeGateways> homeGateways = new List<HomeGateways>(); |
| | | |
| | | //2020-11-13 新增 |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 是否支持远程 |
| | | /// </summary> |
| | | public bool isRemoteControl; |
| | | public bool isRemoteControl;//?? |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public string homeType; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string createonutc; |
| | | /// <summary> |
| | | /// 区域服务器 |
| | | /// </summary> |
| | | public string regionUrl; |
| | | /// <summary> |
| | | /// 区域服务器 |
| | | /// emq服务器 |
| | | /// </summary> |
| | | public string emqUrl; |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public string homeRegionId; |
| | | /// <summary> |
| | | /// 住宅区域名字 |
| | | /// </summary> |
| | | public string homeRegionName; |
| | | /// <summary> |
| | | /// 是否允许创建场景 |
| | | /// </summary> |
| | | public bool isAllowCreateScene; |
| | | public bool isAllowCreateScene;//?? |
| | | /// <summary> |
| | | /// 是否绑定网关 |
| | | /// </summary> |
| | | public bool isBindGateway; |
| | | /// <summary> |
| | | /// 调试人员ID |
| | | /// </summary> |
| | | public string debugStaffUserId; |
| | | /// <summary> |
| | | /// 调试权限是否打开 |
| | | /// </summary> |
| | | public bool debugPerm; |
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 新云端住宅列表返回字段 |
| | | /// </summary>
|
| | | [Serializable] |
| | | public class RegionInfoResNew |
| | | { |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string Id; |
| | | /// <summary> |
| | | /// 住宅名字 |
| | | /// </summary> |
| | | public string homeName; |
| | | /// <summary> |
| | | /// 是否为其他主用户分享过来的住宅 |
| | | /// </summary> |
| | | public bool IsOtherShare; |
| | | /// <summary> |
| | | /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true", |
| | | /// 子账户类型 1.ORDINARY 2.DEBUG 3.ADMIN |
| | | /// </summary> |
| | | public string accountType; |
| | | /// <summary> |
| | | /// 是否支持远程 |
| | | /// </summary> |
| | | public bool isRemoteControl; |
| | | /// <summary> |
| | | /// 住宅空间结构Id |
| | | /// </summary> |
| | | public string structId; |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | | public double longitude; |
| | | /// <summary> |
| | | /// 纬度 |
| | | /// </summary> |
| | | public double latitude; |
| | | /// <summary> |
| | | /// 交付状态 |
| | | /// </summary> |
| | | public string deliverstatus; |
| | | /// <summary> |
| | | /// 住宅类型 Zigbee, Buspro, A |
| | | /// </summary> |
| | | public string homeType; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string createonutc; |
| | | /// <summary> |
| | | /// 区域服务器 |
| | | /// </summary> |
| | | public string regionUrl; |
| | | /// <summary> |
| | | /// 区域服务器 |
| | | /// </summary> |
| | | public string emqUrl; |
| | | /// <summary> |
| | | /// 住宅区域Id |
| | | /// </summary> |
| | | public string homeRegionId; |
| | | /// <summary> |
| | | /// 住宅区域名字 |
| | | /// </summary> |
| | | public string homeRegionName; |
| | | /// <summary> |
| | | /// 是否绑定网关 |
| | | /// </summary> |
| | | public bool isBindGateway; |
| | | /// <summary> |
| | | /// 住宅地址 |
| | | /// </summary>
|
| | | public string homeAddress; |
| | | /// <summary> |
| | | /// 是否允许创建场景 |
| | | /// </summary> |
| | | public bool isAllowCreateScene; |
| | | }
|
| | | }
|
| | |
| | | public SpatialInfo(string spatialType) |
| | | { |
| | | roomType = "FLOOR"; |
| | | parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID; |
| | | parentId = DB_ResidenceData.Instance.CurrentRegion.id; |
| | | } |
| | | |
| | | public string roomId = ""; |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneCatchFunctionListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmCenterPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\Security.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
|
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.2.0413"; |
| | | public static string VersionString = "1.2.0420"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | public bool CloudOverallMsgReceiveEx(string topic, byte[] byteData, string mqttEncryptKey, string homeIdEncryptKey) |
| | | { |
| | | //设备入网上报主题 |
| | | if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") |
| | | if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") |
| | | { |
| | | if (string.IsNullOrEmpty(homeIdEncryptKey) == false) |
| | | { |
| | |
| | | if (ListCloudEvent.Count == 0) { return false; } |
| | | |
| | | //设备入网上报主题(目前只有红外宝) |
| | | if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") |
| | | if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found") |
| | | { |
| | | for (int i = 0; i < this.ListCloudEvent.Count; i++) |
| | | { |
| | |
| | | //return; |
| | | if (b) |
| | | { |
| | | etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; |
| | | etAccount.Text = "13226233133";//豆豆 |
| | | //etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; |
| | | // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 |
| | | } |
| | | else |
| | | { |
| | | //etAccount.Text = "BB01010101@evoyo.com";//可视对讲 |
| | | //etAccount.Text = "13168123446"; |
| | | //etAccount.Text = "13602944661";//kx |
| | | etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | etAccount.Text = "13602944661";//kx |
| | | //etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 |
| | | } |
| | | b = !b; |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Name, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.homeName, |
| | | IsBold = true |
| | | }; |
| | | topView.AddChidren(btnResidenceName); |
| | |
| | | shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom; |
| | | shiwaiView.btnText.TextID = StringId.shiwaibainhua; |
| | | shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png"; |
| | | //viewLayout.AddChidren(shiwaiView.FLayoutView()); |
| | | viewLayout.AddChidren(shiwaiView.FLayoutView()); |
| | | #endregion |
| | | |
| | | |
| | |
| | | #region 执行推送 发送通知 |
| | | ///上下间隔12像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | /////执行推送iew |
| | | //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | //push.frameLayout.Height = Application.GetRealHeight(50); |
| | | //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | //push.btnText.TextID = StringId.push; |
| | | //push.btnNextIcon.Width = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.Height = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | | //viewLayout.AddChidren(push.FLayoutView()); |
| | | /////发送通知View |
| | | //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); |
| | | //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | //notification.btnText.TextID = StringId.notification; |
| | | //viewLayout.AddChidren(notification.FLayoutView()); |
| | | /////上下间隔62像素 |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); |
| | | ///执行推送iew |
| | | LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | push.frameLayout.Height = Application.GetRealHeight(50); |
| | | push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | push.btnText.TextID = StringId.push; |
| | | push.btnNextIcon.Width = Application.GetRealWidth(36); |
| | | push.btnNextIcon.Height = Application.GetRealWidth(36); |
| | | push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | | push.btnClick.Width = Application.GetRealWidth(305); |
| | | viewLayout.AddChidren(push.FLayoutView()); |
| | | ///发送通知View |
| | | LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); |
| | | notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | notification.btnText.TextID = StringId.notification; |
| | | notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor; |
| | | viewLayout.AddChidren(notification.FLayoutView()); |
| | | |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | push.btnNextIcon.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | push.btnNextIcon.IsSelected = false; |
| | | } |
| | | ///上下间隔62像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); |
| | | #endregion |
| | | |
| | | |
| | | #region 保存 |
| | | ///保存View |
| | | LogicView.SaveView saveView = new LogicView.SaveView(); |
| | |
| | | cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | DateMethod(cyclicTitle.btnText); |
| | | }; |
| | | ///是否要推送点击事件 |
| | | //初始化对象 |
| | | PushConfigs pushConfigs = new PushConfigs(); |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | pushConfigs = Logic.currlogic.pushConfigs[0]; |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) |
| | | { |
| | | //默认推送当前账号 |
| | | pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo); |
| | | } |
| | | else |
| | | { |
| | | //默认推送当前账号 |
| | | pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo); |
| | | } |
| | | } |
| | | push.btnNextIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected; |
| | | if (push.btnNextIcon.IsSelected) |
| | | { |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | //清空之前旧配置数据 |
| | | Logic.currlogic.pushConfigs.Clear(); |
| | | } |
| | | //增加配置数据 |
| | | Logic.currlogic.pushConfigs.Add(pushConfigs); |
| | | } |
| | | else |
| | | { |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | //默认取第一个赋值 |
| | | pushConfigs = Logic.currlogic.pushConfigs[0]; |
| | | //清空配置数据 |
| | | Logic.currlogic.pushConfigs.Clear(); |
| | | } |
| | | } |
| | | }; |
| | | ///输入推送文本 |
| | | notification.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | InputPushText inputPushText = new InputPushText(); |
| | | MainPage.BasePageView.AddChidren(inputPushText); |
| | | inputPushText.Show(pushConfigs); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | inputPushText.action += (pushConfigsIfon) => |
| | | { |
| | | //赋值 |
| | | pushConfigs = pushConfigsIfon; |
| | | }; |
| | | }; |
| | | ///保存点击事件 |
| | | saveView.btnClick.MouseUpEventHandler += (sender, e) => |
| | |
| | | { |
| | | //定义一个局部weekList列表用来记录选中数据; |
| | | List<string> weekStateList = new List<string>(); |
| | | |
| | | PublicInterface weekView = new PublicInterface(); |
| | | if (Logic.currlogic.cycle.type == "week") |
| | | { |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | | { |
| | | public class AirQuality : FrameLayout |
| | | { |
| | | public AirQuality() |
| | | { |
| | | Tag = "Logic"; |
| | | } |
| | | public void Show() |
| | | { |
| | | #region 界面布局 |
| | | LogicView.TopView topView = new LogicView.TopView(); |
| | | topView.frameLayout.Height = Application.GetRealHeight(64 + 20); |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.topNameBtn.TextID = StringId.selectionCondition; |
| | | topView.Location(); |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | FrameLayout viewLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(64 + 20), |
| | | Width = Application.GetRealWidth(LogicView.TextSize.view375), |
| | | Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 20), |
| | | BackgroundColor = CSS.CSS_Color.viewMiddle, |
| | | }; |
| | | this.AddChidren(viewLayout); |
| | | #endregion |
| | | |
| | | var list = new List<string> { |
| | | Language.StringByID(StringId.kongqiyou), |
| | | Language.StringByID(StringId.kongqiliang), |
| | | Language.StringByID(StringId.kongqicha), |
| | | }; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | LogicView.SelectTypeView view = new LogicView.SelectTypeView(); |
| | | view.frameLayout.Y = Application.GetRealHeight(i * 50); |
| | | view.btnIcon.Visible = false; |
| | | view.btnNextIcon.Visible = false; |
| | | view.btnText.X = Application.GetRealWidth(16); |
| | | view.btnLine.X = Application.GetRealWidth(16); |
| | | view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); |
| | | view.btnText.Text = list[i]; |
| | | view.btnClick.Tag = list[i]; |
| | | viewLayout.AddChidren(view.FLayoutView()); |
| | | |
| | | view.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | string value = ""; |
| | | string text = view.btnClick.Tag.ToString(); |
| | | if (text == Language.StringByID(StringId.kongqiyou)) |
| | | { |
| | | //优 |
| | | value = "excellent"; |
| | | } |
| | | else if (text == Language.StringByID(StringId.kongqiliang)) |
| | | { |
| | | //良 |
| | | value = "good"; |
| | | } |
| | | else if (text == Language.StringByID(StringId.kongqicha)) |
| | | { |
| | | //差 |
| | | value = "poor"; |
| | | } |
| | | AddDic(value); |
| | | }; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 封装数据 |
| | | /// </summary> |
| | | /// <param name="value"></param> |
| | | private void AddDic(string value) |
| | | { |
| | | Input input = new Input(); |
| | | input.sid = LogicMethod.NewSid(); |
| | | input.condition_type = "9"; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "air_quality"); |
| | | LogicMethod.dictionary(dic, "comparator", "="); |
| | | LogicMethod.dictionary(dic, "data_type", "string"); |
| | | LogicMethod.dictionary(dic, "value", value); |
| | | input.condition.Add(dic); |
| | | AddCondition(input); |
| | | } |
| | | /// <summary> |
| | | /// 添加条件 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | private void AddCondition(Input input) |
| | | { |
| | | ///记录索引值 |
| | | int index = -1; |
| | | for (var i = 0; i < Logic.currlogic.input.Count; i++) |
| | | { |
| | | var condition_type = Logic.currlogic.input[i].condition_type; |
| | | if (condition_type == "9") |
| | | { |
| | | ///找到标记索引,退出循环体 |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index != -1) |
| | | { |
| | | //移除旧数据 |
| | | Logic.currlogic.input.RemoveAt(index); |
| | | //新数据插入旧数据的位置 |
| | | Logic.currlogic.input.Insert(index, input); |
| | | } |
| | | else |
| | | { |
| | | Logic.currlogic.input.Add(input); |
| | | } |
| | | |
| | | LogicMethod.RemoveAllView(); |
| | | AddLogic addLogic = new AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | break; |
| | | case "9": |
| | | { |
| | | inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png"; |
| | | foreach (var dic in dicList) |
| | | { |
| | | string strtext = ""; |
| | | string value = dic["value"]; |
| | | switch (value) |
| | | { |
| | | case "excellent": |
| | | { |
| | | strtext = Language.StringByID(StringId.kongqiyou); |
| | | |
| | | } |
| | | break; |
| | | case "good": |
| | | { |
| | | |
| | | strtext = Language.StringByID(StringId.kongqiliang); |
| | | |
| | | } |
| | | break; |
| | | case "poor": |
| | | { |
| | | strtext = Language.StringByID(StringId.kongqicha); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | inputView.btnText.TextID = StringId.kongqizhiliang; |
| | | inputView.btnState.Text = strtext; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | } |
| | | //再次编辑条件状态点击事件 |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |
| | | case "9": |
| | | { |
| | | |
| | | AirQuality airQuality = new AirQuality(); |
| | | MainPage.BasePageView.AddChidren(airQuality); |
| | | airQuality.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |
| | | } |
| | | }; |
| | | ///删除控件 |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | | { |
| | | public class InputPushText : FrameLayout |
| | | { |
| | | public InputPushText() |
| | | { |
| | | Tag = "Logic"; |
| | | } |
| | | public Action<PushConfigs> action; |
| | | public void Show(PushConfigs pushConfigs) |
| | | { |
| | | |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | LogicView.TopView topView = new LogicView.TopView(); |
| | | topView.topNameBtn.TextID = StringId.fasongtongzhi; |
| | | this.AddChidren(topView.FLayoutView()); |
| | | |
| | | FrameLayout viewLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Width = Application.GetRealWidth(LogicView.TextSize.view375), |
| | | Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76), |
| | | BackgroundColor = CSS.CSS_Color.viewMiddle, |
| | | }; |
| | | this.AddChidren(viewLayout); |
| | | #region 通知内容 |
| | | LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView(); |
| | | addInputTextView.btnIf.TextID = StringId.tongzhineirong; |
| | | viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12)); |
| | | ///输入推送文本 |
| | | EditTextView textBox = new EditTextView//EditText |
| | | { |
| | | Y = Application.GetRealHeight(42), |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(152), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | Radius=(uint)Application.GetRealHeight(12), |
| | | Text= pushConfigs.pushContent, |
| | | TextSize = LogicView.TextSize.text14, |
| | | TextColor= CSS.CSS_Color.textColor, |
| | | PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100字以内)", |
| | | PlaceholderTextColor = CSS.CSS_Color.textCancelColor, |
| | | BackgroundColor = CSS.CSS_Color.textWhiteColor, |
| | | |
| | | }; |
| | | viewLayout.AddChidren(textBox); |
| | | textBox.TextChangeEventHandler += (sender, e) => |
| | | { |
| | | var leng = e.Length; |
| | | if (leng > 100) |
| | | { |
| | | textBox.Text = e.Substring(0,100); |
| | | #if __Android__ |
| | | textBox.SetSelectionEnd(); |
| | | #endif |
| | | |
| | | } |
| | | pushConfigs.pushContent = textBox.Text.Trim(); |
| | | |
| | | }; |
| | | #endregion |
| | | #region App推送 |
| | | LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView(); |
| | | appPush.frameLayout.Y = Application.GetRealHeight(206); |
| | | appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12); |
| | | appPush.btnText.TextID = StringId.apptuisong; |
| | | appPush.btnText.X = Application.GetRealWidth(12); |
| | | viewLayout.AddChidren(appPush.FLayoutView()); |
| | | appPush.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //定义一个局部账号列表用来记录选中数据; |
| | | List<string> accountList = new List<string>(); |
| | | Loading loading = new Loading(); |
| | | this.AddChidren(loading); |
| | | loading.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var userList = Send.GetResidenceMemberAccount(); |
| | | for (int i = 0; i < userList.Count; i++) |
| | | { |
| | | var user = userList[i]; |
| | | accountList.Add(user.Account); |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) |
| | | { |
| | | //默认推送当前账号 |
| | | accountList.Insert(0, UserInfo.Current.userMobileInfo); |
| | | } |
| | | else |
| | | { |
| | | //默认推送当前账号 |
| | | accountList.Insert(0, UserInfo.Current.userEmailInfo); |
| | | } |
| | | PublicInterface view = new PublicInterface(); |
| | | view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze |
| | | , (list) => |
| | | { |
| | | pushConfigs.pushTarget = list; |
| | | }); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | #endregion |
| | | #region 确认 |
| | | LogicView.SaveView saveView = new LogicView.SaveView(); |
| | | saveView.btnSave.TextID = StringId.queren; |
| | | saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | this.AddChidren(saveView.FLayoutView()); |
| | | |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | |
| | | action(pushConfigs); |
| | | RemoveFromParent(); |
| | | }; |
| | | saveView.btnClick.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | action(pushConfigs); |
| | | RemoveFromParent(); |
| | | }; |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 逻辑存储数据对象 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class Logic |
| | | { |
| | | |
| | |
| | | /// 逻辑输出目标数组 |
| | | /// </summary> |
| | | public List<Output> output = new List<Output>(); |
| | | |
| | | /// <summary> |
| | | /// 推送配置 |
| | | /// </summary> |
| | | public List<PushConfigs> pushConfigs = new List<PushConfigs>(); |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 执行周期对象 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class Cycle |
| | | { |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 输入条件对象 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class Input |
| | | { |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public string condition_type = ""; |
| | | public List<Dictionary<string, string>> condition = new List<Dictionary<string, string>>(); |
| | | /// <summary> |
| | | /// 地理围栏配置 |
| | | /// </summary> |
| | | public Fence geo_fence = new Fence(); |
| | | } |
| | | /// <summary> |
| | | /// 输出目标对象 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class Output |
| | | { |
| | | /// <summary> |
| | |
| | | public string target_type = ""; |
| | | public List<Dictionary<string, string>> status = new List<Dictionary<string, string>>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 地理围栏配置 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class Fence |
| | | { |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | | public string longitude = string.Empty; |
| | | /// <summary> |
| | | /// 纬度 |
| | | /// </summary> |
| | | public string latitude = string.Empty; |
| | | /// <summary> |
| | | /// 单位米 |
| | | /// </summary> |
| | | public string radius = string.Empty; |
| | | } |
| | | /// <summary> |
| | | /// 推送配置 |
| | | /// </summary> |
| | | [Serializable] |
| | | public class PushConfigs |
| | | { |
| | | /// <summary> |
| | | /// 推送方式(APP/SMS) |
| | | /// </summary> |
| | | public string pushMethod = "APP"; |
| | | /// <summary> |
| | | /// 推送内容 |
| | | /// </summary> |
| | | public string pushContent = string.Empty; |
| | | /// <summary> |
| | | /// 推送目标 |
| | | /// </summary> |
| | | public List<string> pushTarget = new List<string> {}; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | get |
| | | { |
| | | return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; |
| | | return Entity.DB_ResidenceData.Instance.CurrentRegion.id; |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | frameLayout.Height = Application.GetRealHeight(flHeight); |
| | | btnIf.Y= Application.GetRealHeight(btnY); |
| | | frameLayout.AddChidren(btnIf); |
| | | |
| | | return frameLayout; |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 最上面块View |
| | | /// </summary> |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | { |
| | | BackgroundColor = CSS.CSS_Color.viewTop, |
| | | Height = Application.GetRealHeight(64), |
| | |
| | | { |
| | | TextSize = TextSize.text18, |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | Width = Application.GetRealWidth(TextSize.view375-60-60), |
| | | Width = Application.GetRealWidth(TextSize.view375 - 60 - 60), |
| | | Height = Application.GetRealHeight(25), |
| | | Y = Application.GetRealHeight(30), |
| | | X = Application.GetRealWidth(60) |
| | |
| | | /// <summary> |
| | | /// 设置图标增加热键大小 |
| | | /// </summary> |
| | | public Button clickSetBtn = new Button |
| | | public Button clickSetBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(337 - 37), |
| | | Width = Application.GetRealWidth(28 + 37), |
| | |
| | | return frameLayout; |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 显示位置 |
| | | /// </summary> |
| | | public void Location() |
| | | { |
| | | //获取宽度 |
| | | int widthValue = topNameBtn.GetTextWidth(); |
| | | int textWidth = (Application.GetRealWidth(255) - widthValue) / 2; |
| | | Button locationBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(18), |
| | | Height = Application.GetRealWidth(18), |
| | | X = Application.GetRealWidth(60 + 4) + textWidth + widthValue, |
| | | Y = Application.GetRealHeight(34 + 1), |
| | | UnSelectedImagePath = "LogicIcon/location.png", |
| | | }; |
| | | frameLayout.AddChidren(locationBtn); |
| | | |
| | | Button textBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(14), |
| | | Y = Application.GetRealHeight(57), |
| | | TextSize = LogicView.TextSize.text10, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | Text = "广东广州市番禺区石楼镇", |
| | | }; |
| | | frameLayout.AddChidren(textBtn); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 按+跳转到逻辑界面的方法 |
| | | /// </summary> |
| | | public static void SkipAddLogicPage() |
| | | public void SkipAddLogicPage() |
| | | { |
| | | Logic.currlogic = new Logic(); |
| | | var addLogic = new AddLogic(); |
| | |
| | | if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "") |
| | | { |
| | | var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data); |
| | | var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date); |
| | | var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date); |
| | | for (int i = 0; i < dateList.Count; i++) |
| | | { |
| | | //添加逻辑ID |
| | |
| | | } |
| | | } |
| | | } |
| | | class Date |
| | | class LogicData |
| | | { |
| | | /// <summary> |
| | | /// 云端唯一id |
| | | /// </summary> |
| | | public string userLogicId = ""; |
| | | public string userLogicId = ""; |
| | | /// <summary> |
| | | /// 网关id |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 超出5个元素该用滑动控件 |
| | | /// </summary> |
| | | /// <param name="frame">显示在哪个界面的父控件</param> |
| | | /// <param name="list">显示数据源</param> |
| | | /// <param name="stateList">之前状态数据源</param> |
| | | /// <param name="titleText">标题</param> |
| | | /// <param name="action">返回值索引值</param> |
| | | public void FrameOrVvList(FrameLayout frame, List<string> list,List<string>stateList, int titleText, Action<List<string>> action) |
| | | { |
| | | |
| | | int line = 0; |
| | | if (list.Count == 0 || list.Count > 5) |
| | | { |
| | | //超出5个只能默认5个; |
| | | line = 5; |
| | | } |
| | | else |
| | | { |
| | | line = list.Count; |
| | | } |
| | | |
| | | FrameLayout frameLayout = new FrameLayout |
| | | { |
| | | BackgroundColor = CSS.CSS_Color.viewTrans60lucence, |
| | | }; |
| | | frame.AddChidren(frameLayout); |
| | | |
| | | LogicView.DateView view = new LogicView.DateView(); |
| | | view.btnTitle.TextID = titleText; |
| | | view.FLayoutView(frameLayout, line); |
| | | view.btnCancel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //移除fLayout界面 |
| | | frameLayout.RemoveFromParent(); |
| | | }; |
| | | //小于5使用 |
| | | FrameLayout frameL = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(56), |
| | | Height = Application.GetRealHeight(50 * line), |
| | | }; |
| | | //大于5使用 |
| | | VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout |
| | | { |
| | | Y = Application.GetRealHeight(56), |
| | | Height = Application.GetRealHeight(50 * 5), |
| | | |
| | | }; |
| | | verticalRefresh.BeginHeaderRefreshingAction += () => |
| | | { |
| | | //关闭刷新View; |
| | | verticalRefresh.EndHeaderRefreshing(); |
| | | }; |
| | | |
| | | if (list.Count == 0) |
| | | { |
| | | //Button btnTipNot = new Button |
| | | //{ |
| | | // X = Application.GetRealWidth(93), |
| | | // Y = Application.GetRealHeight(80), |
| | | // Width = Application.GetRealWidth(158), |
| | | // Height = Application.GetRealWidth(158), |
| | | // UnSelectedImagePath = "TipNot.png", |
| | | |
| | | //}; |
| | | //view.frameLayout.AddChidren(btnTipNot); |
| | | |
| | | //Button btnTipNotText = new Button() |
| | | //{ |
| | | // Y = btnTipNot.Bottom + Application.GetRealHeight(16), |
| | | // Height = Application.GetRealHeight(20), |
| | | // TextID = StringId.secnenull, |
| | | // TextColor = CSS.CSS_Color.textColor, |
| | | // TextSize = LogicView.TextSize.text14, |
| | | // TextAlignment = TextAlignment.Center, |
| | | //}; |
| | | //view.frameLayout.AddChidren(btnTipNotText); |
| | | } |
| | | else if (list.Count > 0 && list.Count <= 5) |
| | | { |
| | | view.frameLayout.AddChidren(frameL); |
| | | } |
| | | else if (list.Count > 5) |
| | | { |
| | | view.frameLayout.AddChidren(verticalRefresh); |
| | | |
| | | } |
| | | List<string> selecetdList = new List<string>(); |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | string strName = list[i]; |
| | | LogicView.CheckView checkView = new LogicView.CheckView(); |
| | | checkView.btnText.TextSize = LogicView.TextSize.text14; |
| | | if (list.Count <= 5) |
| | | { |
| | | checkView.frameLayout.Y = Application.GetRealWidth(i * 50); |
| | | frameL.AddChidren(checkView.FLayoutView()); |
| | | if (line - 1 == i) |
| | | { |
| | | checkView.btnLine.BackgroundColor = CSS.CSS_Color.view; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | verticalRefresh.AddChidren(checkView.FLayoutView()); |
| | | } |
| | | if (stateList.Contains(strName)) { |
| | | checkView.btnClick.IsSelected = true; |
| | | checkView.btnCheckIcon.IsSelected = true; |
| | | selecetdList.Add(strName); |
| | | } |
| | | checkView.btnText.Text = strName; |
| | | checkView.btnClick.Tag = strName;//标记 |
| | | //点击事件 |
| | | checkView.btnClick.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected; |
| | | checkView.btnCheckIcon.IsSelected = checkView.btnClick.IsSelected; |
| | | if (checkView.btnClick.IsSelected) |
| | | { |
| | | if (!selecetdList.Contains(checkView.btnClick.Tag.ToString())) |
| | | { |
| | | selecetdList.Add(checkView.btnClick.Tag.ToString()); |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (selecetdList.Contains(checkView.btnClick.Tag.ToString())) |
| | | { |
| | | selecetdList.Remove(checkView.btnClick.Tag.ToString()); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | } |
| | | view.btnConfirm.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | if (selecetdList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | //列表索引值 |
| | | action(selecetdList); |
| | | //移除fLayout界面 |
| | | frameLayout.RemoveFromParent(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取界面列表 |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using Newtonsoft.Json.Linq; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | | { |
| | | public class Send |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 调用获取住宅子账号列表 |
| | | /// </summary> |
| | | public static List<ResidenceMemberInfo> GetResidenceMemberAccount() |
| | | { |
| | | |
| | | var responePack = new HttpServerRequest().GetResidenceMemberAccount(); |
| | | if (responePack.Code == StateCode.SUCCESS) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); |
| | | } |
| | | //失败 |
| | | else |
| | | { |
| | | //提示 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code); |
| | | } |
| | | return new List<ResidenceMemberInfo>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取逻辑ID列表 |
| | | /// </summary> |
| | |
| | | outputArray.Add(outputTypeJOb); |
| | | } |
| | | |
| | | var pushConfigsArray = new JArray { }; |
| | | if (logic.pushConfigs.Count > 0) |
| | | { // 推送文本 |
| | | foreach (var pushConfig in logic.pushConfigs) |
| | | { |
| | | |
| | | var pushConfigJob = new JObject { }; |
| | | pushConfigJob.Add("pushMethod", pushConfig.pushMethod); |
| | | pushConfigJob.Add("pushContent", pushConfig.pushContent); |
| | | var accountArray = new JArray { }; |
| | | foreach (var account in pushConfig.pushTarget) |
| | | { |
| | | accountArray.Add(account); |
| | | } |
| | | pushConfigJob.Add("pushTarget", accountArray); |
| | | pushConfigsArray.Add(pushConfigJob); |
| | | } |
| | | } |
| | | |
| | | var logicjArray = new JArray { }; |
| | | var logicIfon = new JObject { }; |
| | | logicIfon.Add("sid", logic.sid); |
| | |
| | | logicIfon.Add("cycle", cycleJObject); |
| | | logicIfon.Add("input", inputArray); |
| | | logicIfon.Add("output", outputArray); |
| | | logicIfon.Add("pushConfigs", pushConfigsArray); |
| | | logicjArray.Add(logicIfon); |
| | | var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } }; |
| | | responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add); |
| | |
| | | outputArray.Add(outputTypeJOb); |
| | | } |
| | | |
| | | var pushConfigsArray = new JArray { }; |
| | | if (logic.pushConfigs.Count > 0) |
| | | { // 推送文本 |
| | | foreach (var pushConfig in logic.pushConfigs) |
| | | { |
| | | |
| | | var pushConfigJob = new JObject { }; |
| | | pushConfigJob.Add("pushMethod", pushConfig.pushMethod); |
| | | pushConfigJob.Add("pushContent", pushConfig.pushContent); |
| | | var accountArray = new JArray { }; |
| | | foreach (var account in pushConfig.pushTarget) |
| | | { |
| | | accountArray.Add(account); |
| | | } |
| | | pushConfigJob.Add("pushTarget", accountArray); |
| | | pushConfigsArray.Add(pushConfigJob); |
| | | } |
| | | } |
| | | |
| | | var logicjArray = new JArray { }; |
| | | var logicIfon = new JObject { }; |
| | | logicIfon.Add("userLogicId", logic.userLogicId); |
| | |
| | | logicIfon.Add("cycle", cycleJObject); |
| | | logicIfon.Add("input", inputArray); |
| | | logicIfon.Add("output", outputArray); |
| | | logicIfon.Add("pushConfigs", pushConfigsArray); |
| | | |
| | | logicjArray.Add(logicIfon); |
| | | var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } }; |
| | | responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update); |
| | |
| | | topView.frameLayout.Height = Application.GetRealHeight(64 + 20); |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.topNameBtn.Text = titelText; |
| | | //获取宽度 |
| | | int widthValue = topView.topNameBtn.GetTextWidth(); |
| | | int textWidth = (Application.GetRealWidth(255) - widthValue) / 2; |
| | | Button locationBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(18), |
| | | Height = Application.GetRealWidth(18), |
| | | X = Application.GetRealWidth(60 + 4) + textWidth + widthValue, |
| | | Y = Application.GetRealHeight(34 + 1), |
| | | UnSelectedImagePath = "LogicIcon/location.png", |
| | | |
| | | }; |
| | | topView.frameLayout.AddChidren(locationBtn); |
| | | |
| | | Button textBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(14), |
| | | Y = Application.GetRealHeight(57), |
| | | TextSize = LogicView.TextSize.text10, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | Text = "广东广州市番禺区石楼镇", |
| | | }; |
| | | topView.frameLayout.AddChidren(textBtn); |
| | | topView.Location(); |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | RemoveFromParent(); |
| | |
| | | weatherView.btnText.TextID = StringId.tianqibianhua; |
| | | viewLayout.AddChidren(weatherView.FLayoutView()); |
| | | |
| | | //空气质量 |
| | | LogicView.SelectTypeView kongqiViewk = new LogicView.SelectTypeView(); |
| | | kongqiViewk.frameLayout.Y = weatherView.frameLayout.Bottom; |
| | | kongqiViewk.btnIcon.Visible = false; |
| | | kongqiViewk.btnText.X = Application.GetRealWidth(16); |
| | | kongqiViewk.btnLine.X = Application.GetRealWidth(16); |
| | | kongqiViewk.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); |
| | | kongqiViewk.btnText.TextID = StringId.kongqizhiliang; |
| | | viewLayout.AddChidren(kongqiViewk.FLayoutView()); |
| | | #endregion |
| | | |
| | | #region 所有点击事件 |
| | |
| | | weatherCondition.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | //空气质量 |
| | | kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => { |
| | | AirQuality airQuality = new AirQuality(); |
| | | MainPage.BasePageView.AddChidren(airQuality); |
| | | airQuality.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | topView.frameLayout.Height = Application.GetRealHeight(64 + 20); |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.topNameBtn.TextID = StringId.selectionCondition; |
| | | //获取宽度 |
| | | int widthValue = topView.topNameBtn.GetTextWidth(); |
| | | int textWidth = (Application.GetRealWidth(255) - widthValue) / 2; |
| | | Button locationBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(18), |
| | | Height = Application.GetRealWidth(18), |
| | | X = Application.GetRealWidth(60 + 4) + textWidth + widthValue, |
| | | Y = Application.GetRealHeight(34 + 1), |
| | | UnSelectedImagePath = "LogicIcon/location.png", |
| | | |
| | | }; |
| | | topView.frameLayout.AddChidren(locationBtn); |
| | | |
| | | Button textBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(14), |
| | | Y = Application.GetRealHeight(57), |
| | | TextSize = LogicView.TextSize.text10, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | Text = "广东广州市番禺区石楼镇", |
| | | }; |
| | | topView.frameLayout.AddChidren(textBtn); |
| | | topView.Location(); |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | RemoveFromParent(); |
| | |
| | | else |
| | | { |
| | | //跳转到逻辑界面 |
| | | UI2.Intelligence.Automation.MainView.SkipAddLogicPage(); |
| | | UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView(); |
| | | logicMainView.SkipAddLogicPage(); |
| | | } |
| | | }; |
| | | } |
| | |
| | | private void RefreshMiniRemoteControlInfo(Action<Entity.Function> successEvent) |
| | | { |
| | | var pra = new Dictionary<string, object>(); |
| | | pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID); |
| | | pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id); |
| | | pra.Add("spk", Entity.SPK.IrModule); |
| | | |
| | | var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(pra); |
| | |
| | | var deleteShareObj = new DeleteShareObj() |
| | | { |
| | | shareDatas = funs_Del, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | LoadMethod_DelSharedData(deleteShareObj); |
| | | |
| | |
| | | { |
| | | shareDatas = funs_NeedAdd, |
| | | childAccountIds = childAccountIds, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | result = LoadMethod_AddShareData(addShareObj); |
| | | |
| | |
| | | var addShareObj = new AddShareObj() |
| | | { |
| | | childAccountIds = childAccountIds, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | shareDatas = roomList |
| | | }; |
| | | var responePack = new HttpServerRequest().AddShareData(addShareObj); |
| | |
| | | var deleteShareObj = new DeleteShareObj() |
| | | { |
| | | shareDatas = roomList, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj); |
| | | if (responePack.Code != StateCode.SUCCESS) |
| | |
| | | var deleteShareObj = new DeleteShareObj() |
| | | { |
| | | shareDatas = funs_Del, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | result = LoadMethod_DelSharedData(deleteShareObj); |
| | | |
| | |
| | | var deleteShareObj = new DeleteShareObj() |
| | | { |
| | | shareDatas = roomList, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }; |
| | | var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj); |
| | | if (responePack.Code != StateCode.SUCCESS) |
| | |
| | | var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson); |
| | | if (resultObj.Code == DAL.Server.StateCode.SUCCESS) |
| | | { |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); |
| | | if (homeList == null || homeList.Count == 0) |
| | | { |
| | | //如果还没有住宅的话,继续下一次检测 |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Name, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.homeName, |
| | | IsBold = true |
| | | }; |
| | | residenceInfoView.AddChidren(btnCurResidenceName); |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS.CSS_Color.FirstLevelTitleColor, |
| | | SelectedTextColor = CSS.CSS_Color.MainColor, |
| | | Text = home.Name, |
| | | TextSize = home.Name.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, |
| | | IsSelected = DB_ResidenceData.Instance.CurrentRegion.RegionID == home.RegionID, |
| | | Text = home.homeName, |
| | | TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, |
| | | IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, |
| | | IsMoreLines = true, |
| | | Tag = home.RegionID |
| | | Tag = home.id |
| | | }; |
| | | contentView.AddChidren(btnHomeName); |
| | | |
| | |
| | | /// <param name="homeTemp"></param> |
| | | void LoadEvent_ChangeCurHome(RegionInfoRes homeTemp) |
| | | { |
| | | if (DB_ResidenceData.Instance.CurrentRegion.RegionID == homeTemp.RegionID) |
| | | if (DB_ResidenceData.Instance.CurrentRegion.id == homeTemp.id) |
| | | { |
| | | return; |
| | | } |
| | | DB_ResidenceData.Instance.CurrentRegion = homeTemp; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName; |
| | | DB_ResidenceData.Instance.EixtAccount(); |
| | | //刷新住宅数据 |
| | | Common.ApiUtlis.Ins.DownloadData(); |
| | |
| | | { |
| | | Action updateResidenceName = () => |
| | | { |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name; |
| | | btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName; |
| | | }; |
| | | var residentialManagePage = new ResidentialManagePage(updateResidenceName); |
| | | MainPage.BasePageView.AddChidren(residentialManagePage); |
| | |
| | | { |
| | | get |
| | | { |
| | | return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; |
| | | return Entity.DB_ResidenceData.Instance.CurrentRegion.id; |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | try |
| | | { |
| | | var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID }; |
| | | var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id }; |
| | | var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f); |
| | | if (addResult == DAL.Server.StateCode.SUCCESS) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID }; |
| | | var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id }; |
| | | var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f); |
| | | if (addResult == DAL.Server.StateCode.SUCCESS) |
| | | { |
| | |
| | | /// </summary> |
| | | Button btnRoomManagementTitle; |
| | | |
| | | #region F3阶段 |
| | | /// <summary> |
| | | /// 调试权限开关按钮 |
| | | /// </summary> |
| | | //Button btnCommissioningAuthoritySwitchIcon; |
| | | Button btnCommissioningAuthoritySwitchIcon; |
| | | |
| | | #region F3阶段 |
| | | #region 管理员权限迁移 |
| | | //FrameLayout administratorPermissionMigrationRow; |
| | | //Button btnAdministratorPermissionMigrationTitle; |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.ResidenceManage)).LoadTopView(); |
| | | //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.ResidenceManage)); |
| | | |
| | | VerticalScrolViewLayout contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(667 - 64), |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | |
| | | #region 住宅名称 |
| | | FrameLayout residenceNameRow; |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(residenceNameRow); |
| | | contentView.AddChidren(residenceNameRow); |
| | | Button btnResidenceNameTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | { |
| | | X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, |
| | | Width = Application.GetRealWidth(200), |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Name, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.homeName, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(residenceAddressRow); |
| | | contentView.AddChidren(residenceAddressRow); |
| | | |
| | | var btnResidenceAddressTitle = new Button() |
| | | { |
| | |
| | | { |
| | | X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right, |
| | | Width = Application.GetRealWidth(200), |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.Address, |
| | | Text = DB_ResidenceData.Instance.CurrentRegion.homeAddress, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | |
| | | residenceAddressRow.AddChidren(btnResidenceAddress); |
| | | #endregion |
| | | #region 楼层管理 |
| | | contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); |
| | | |
| | | floorManagementRow = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(8) + residenceNameRow.Bottom,// residenceAddressRow.Bottom, |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(floorManagementRow); |
| | | contentView.AddChidren(floorManagementRow); |
| | | |
| | | btnFloorManagementTitle = new Button() |
| | | { |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(roomManagementRow); |
| | | contentView.AddChidren(roomManagementRow); |
| | | |
| | | btnRoomManagementTitle = new Button() |
| | | { |
| | |
| | | |
| | | #region F3阶段 |
| | | #region 管理员权限迁移 |
| | | //contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); |
| | | //administratorPermissionMigrationRow = new FrameLayout() |
| | | //{ |
| | | // Y = Application.GetRealHeight(8) + roomManagementRow.Bottom, |
| | | // Height = Application.GetRealHeight(65), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //bodyView.AddChidren(administratorPermissionMigrationRow); |
| | | //contentView.AddChidren(administratorPermissionMigrationRow); |
| | | |
| | | //btnAdministratorPermissionMigrationTitle = new Button() |
| | | //{ |
| | |
| | | // Height = Application.GetRealHeight(65), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //bodyView.AddChidren(transferRow); |
| | | //contentView.AddChidren(transferRow); |
| | | |
| | | //btnTransferTitle = new Button() |
| | | //{ |
| | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region F3阶段 |
| | | #region 调试权限 |
| | | //FrameLayout commissioningAuthorityRow; |
| | | //commissioningAuthorityRow = new FrameLayout() |
| | | //{ |
| | | // Y = Application.GetRealHeight(8) + transferRow.Bottom, |
| | | // Height = Application.GetRealHeight(65), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //bodyView.AddChidren(commissioningAuthorityRow); |
| | | |
| | | contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); |
| | | FrameLayout commissioningAuthorityRow; |
| | | commissioningAuthorityRow = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(65), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(commissioningAuthorityRow); |
| | | |
| | | |
| | | //var btnCommissioningAuthorityTitle = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(16), |
| | | // Y = Application.GetRealHeight(10), |
| | | // Width = Application.GetRealWidth(308), |
| | | // Height = Application.GetRealHeight(24), |
| | | // TextID = StringId.CommissioningAuthority, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.SubheadingFontSize, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | //}; |
| | | //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle); |
| | | var btnCommissioningAuthorityTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(308), |
| | | Height = Application.GetRealHeight(24), |
| | | TextID = StringId.CommissioningAuthority, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | }; |
| | | commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle); |
| | | |
| | | //var btnCommissioningAuthorityExplan = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(16), |
| | | // Y = btnCommissioningAuthorityTitle.Bottom, |
| | | // Width = Application.GetRealWidth(308), |
| | | // Height = Application.GetRealHeight(21), |
| | | // TextID = StringId.CommissioningAuthorityExPlan, |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | // TextColor = CSS_Color.PromptingColor1, |
| | | //}; |
| | | //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan); |
| | | var btnCommissioningAuthorityExplan = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnCommissioningAuthorityTitle.Bottom, |
| | | Width = Application.GetRealWidth(308), |
| | | Height = Application.GetRealHeight(21), |
| | | TextID = StringId.CommissioningAuthorityExPlan, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | }; |
| | | commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan); |
| | | |
| | | //btnCommissioningAuthoritySwitchIcon = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(314), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetMinRealAverage(48), |
| | | // Height = Application.GetMinRealAverage(36), |
| | | // UnSelectedImagePath = "Public/Switch.png", |
| | | // SelectedImagePath = "Public/SwitchOn.png", |
| | | //}; |
| | | //commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon); |
| | | #endregion |
| | | btnCommissioningAuthoritySwitchIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(314), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(48), |
| | | Height = Application.GetMinRealAverage(36), |
| | | UnSelectedImagePath = "Public/Switch.png", |
| | | SelectedImagePath = "Public/SwitchOn.png", |
| | | IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm |
| | | }; |
| | | commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon); |
| | | |
| | | btnCommissioningAuthoritySwitchIcon.MouseUpEventHandler = (sender, e) => { |
| | | DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm; |
| | | btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | btnResidenceName.Text = str; |
| | | upateResidenceName(); |
| | | }); |
| | | DB_ResidenceData.Instance.CurrentRegion.Name = str; |
| | | DB_ResidenceData.Instance.CurrentRegion.homeName = str; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | } |
| | | else |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.Name, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>()); |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>()); |
| | | }; |
| | | btnResidenceName.MouseUpEventHandler = eventHandler; |
| | | btnEditResidenceNameIcon.MouseUpEventHandler = eventHandler; |
| | |
| | | if (responsePack.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | btnResidenceAddress.Text = str; |
| | | DB_ResidenceData.Instance.CurrentRegion.Address = str; |
| | | DB_ResidenceData.Instance.CurrentRegion.homeAddress = str; |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | //OnAppConfig.Instance.SaveUserConfig(); |
| | | } |
| | |
| | | IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); |
| | | } |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.Name, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>()); |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btnResidenceAddress.MouseUpEventHandler = eventHandler; |
| | | btnLocationAddressIcon.MouseUpEventHandler = eventHandler; |
| | |
| | | using Shared; |
| | | using HDL_ON.Stan; |
| | | using ZXing.QrCode.Internal; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = StringId.baolu30, |
| | | }; |
| | | bjFl.AddChidren(regionBtn); |
| | | //bjFl.AddChidren(regionBtn); |
| | | |
| | | var vv = new VerticalRefreshLayout |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(58 + 17), |
| | | Height = Application.GetRealHeight(458 - 17), |
| | | Y = Application.GetRealHeight(58), |
| | | Height = Application.GetRealHeight(458), |
| | | Width = Application.GetRealWidth(295), |
| | | }; |
| | | bjFl.AddChidren(vv); |
| | |
| | | frameLayout60.btnTime.Text = getTime(call.callTime); |
| | | ///呼叫状态(0:未接;1:已接;2:拒接);是否开锁; |
| | | frameLayout60.btnStateText.Text = getStateText(call.callStatus) + "," + getUnlockText(call.isUnlock); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | var utcTime = Convert.ToDateTime(str); |
| | | var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local); |
| | | return dateTime.ToString("HH") + ":" + dateTime.ToString("mm"); |
| | | // var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day); |
| | | var monday = dateTime.ToString("MM") + "/" + dateTime.ToString("dd"); |
| | | var time = dateTime.ToString("HH") + ":" + dateTime.ToString("mm"); |
| | | return monday + " " + time; |
| | | } |
| | | /// <summary> |
| | | /// 获取呼叫状态文本 |
| | |
| | | /// <returns></returns> |
| | | private string getUnlockText(bool if_bool) |
| | | { |
| | | string s = ""; |
| | | if (if_bool) |
| | | { |
| | | s = Language.StringByID(StringId.yikaisuo); |
| | | return Language.StringByID(StringId.yikaisuo); |
| | | } |
| | | else |
| | | { |
| | | s = Language.StringByID(StringId.weikaisuo); |
| | | return Language.StringByID(StringId.weikaisuo); |
| | | } |
| | | return s; |
| | | } |
| | | /// <summary> |
| | | /// 获取uuid |
| | |
| | | var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST"); |
| | | if (!string.IsNullOrEmpty(str)) |
| | | { |
| | | var json = JObject.Parse(str); |
| | | if (json != null) |
| | | if (str.Contains("status")) |
| | | { |
| | | var stateCode = json["status"].ToString(); |
| | | if (stateCode == "0") |
| | | //var json = JObject.Parse(str); |
| | | //if (json != null) |
| | | //{ |
| | | // var stateCode = json["status"].ToString(); |
| | | // if (stateCode == "0") |
| | | // { |
| | | // if_bool = true; |
| | | // } |
| | | //} |
| | | if_bool = true; |
| | | } |
| | | else { |
| | | var json = JObject.Parse(str); |
| | | if (json != null) |
| | | { |
| | | if_bool = true; |
| | | var stateCode = json["desc"].ToString(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //错误提示 |
| | | new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 主控件View |
| | | /// </summary> |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | public RowLayout frameLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | // BackgroundColor = CSS.CSS_Color.view, |
| | | LineColor = CSS.CSS_Color.view, |
| | | }; |
| | | /// <summary> |
| | | /// 文本描述 |
| | |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public FrameLayout FLayoutView() |
| | | public RowLayout FLayoutView() |
| | | { |
| | | frameLayout.AddChidren(btnText); |
| | | frameLayout.AddChidren(btnClick); |
| | |
| | | /// <summary> |
| | | /// 主控件View |
| | | /// </summary> |
| | | public FrameLayout frameLayout = new FrameLayout |
| | | public RowLayout frameLayout = new RowLayout |
| | | { |
| | | Height = Application.GetRealHeight(60), |
| | | //BackgroundColor = CSS.CSS_Color.view, |
| | | LineColor = CSS.CSS_Color.view, |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(20), |
| | | TextColor = CSS.CSS_Color.textColor, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | TextSize = TextSize.text14, |
| | | TextAlignment=TextAlignment.CenterLeft, |
| | | Text = "15:01", |
| | | //Text = "15:01", |
| | | }; |
| | | /// <summary> |
| | | /// 状态文本 |
| | |
| | | TextSize = TextSize.text12, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "已接听, 已开锁", |
| | | }; |
| | | |
| | | |
| | |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public FrameLayout FLayoutView() |
| | | public RowLayout FLayoutView() |
| | | { |
| | | frameLayout.AddChidren(btnText); |
| | | frameLayout.AddChidren(btnTime); |
| | |
| | | //密码 |
| | | Button btnpaw = new Button() |
| | | { |
| | | X=Application.GetRealWidth(100), |
| | | X=Application.GetRealWidth(95), |
| | | Y = Application.GetRealHeight(62), |
| | | Height = Application.GetRealHeight(32), |
| | | Width = Application.GetRealWidth(82), |
| | | Width = Application.GetRealWidth(82+5), |
| | | TextColor = MusicColor.SelectedColor, |
| | | TextSize =24, |
| | | TextSize =20,//24 |
| | | TextAlignment = TextAlignment.Center, |
| | | IsBold = true, |
| | | Text = str1, |