1个文件已添加
10个文件已删除
46个文件已修改
3 文件已重命名
| | |
| | | 16097=和 |
| | | 16098=服务条款 |
| | | 16099=请先阅读并同意《隐私权政策》和《服务条款》 |
| | | 16100=常开模式开启(自动化触发) |
| | | 16101=常开模式结束(自动化触发) |
| | | 16102=临时密码开锁成功 |
| | | 16103=临时密码开锁失败 |
| | | |
| | | ;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
|
| | | 18004=指定网关已经被绑定
|
| | |
| | | |
| | | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) |
| | | { |
| | | //base.FinishedLaunching(application, launchOptions); |
| | | Shared.Application.IsMusicEnable = false; |
| | | base.FinishedLaunching(application, launchOptions); |
| | | Shared.Application.FontSize = 12; |
| | | Shared.Application.IsUsePingFang = true; |
| | | Window = new UIWindow(UIScreen.MainScreen.Bounds); |
| | |
| | | <string>需要读取通讯录,用于添加胁迫联系人</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>使用期间需要使用地理位置,以便提供服务,如天气</string> |
| | | <key>NSLocationAlwaysUsageDescription</key> |
| | | <string>应用在后台运行,定时上报位置,执行自动化逻辑功能</string> |
| | | <key>UIViewControllerBasedStatusBarAppearance</key> |
| | | <false/> |
| | | <key>NSPhotoLibraryUsageDescription</key> |
| | |
| | | <string>需要使用多媒体权限,以便提供更多的多媒体服务</string> |
| | | <key>aps-environment</key> |
| | | <string>development</string> |
| | | <key>UIBackgroundModes</key> |
| | | <array> |
| | | <string>location</string> |
| | | <string>remote-notification</string> |
| | | </array> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0.20040901</string> |
| | | <string>1.0.20042601</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>2</string> |
| | | <key>CFBundleURLTypes</key> |
| | |
| | | </array> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>zh_CN</string> |
| | | <key>UIBackgroundModes</key> |
| | | <array> |
| | | <string>location</string> |
| | | <string>remote-notification</string> |
| | | </array> |
| | | </dict> |
| | | </plist> |
| | |
| | | 16097=和 |
| | | 16098=服务条款 |
| | | 16099=请先阅读并同意《隐私权政策》和《服务条款》 |
| | | 16100=常开模式开启(自动化触发) |
| | | 16101=常开模式结束(自动化触发) |
| | | 16102=临时密码开锁成功 |
| | | 16103=临时密码开锁失败 |
| | | |
| | | ;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
|
| | | 18004=指定网关已经被绑定
|
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.0.20041601"; |
| | | public static string CodeIDString = "1.0.20042201"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | return $"House_{Id}.json"; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 住宅id--使用云端提供的住宅唯一Id |
| | | /// </summary> |
| | | public string Id = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 住宅名称 |
| | | /// </summary> |
| | | public string Name = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 是否为其他主用户分享过来的住宅 |
| | | /// </summary> |
| | |
| | | /// 当前住宅是其他主帐号分享过来的主帐号的分布式Id
|
| | | /// </summary>
|
| | | public string MainUserDistributedMark; |
| | | |
| | | /// <summary>
|
| | | /// 该住宅是否是虚拟的,true的话代表网关和设备都是虚拟的(默认为false)
|
| | | /// </summary> |
| | | public bool IsVirtually = false; |
| | | /// <summary> |
| | | /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true",并且【AccountType】为"1"时,该账号拥有管理员权限 |
| | | /// </summary> |
| | |
| | | /// 住宅所在的地理位置的名称
|
| | | /// </summary> |
| | | public string ResidenceAddressName = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 房间列表(房间的ID) |
| | | /// </summary> |
| | | public List<string> ListRooms = new List<string>(); |
| | | |
| | | /// <summary> |
| | | /// 楼层字典 |
| | | /// key:FloorId |
| | |
| | | /// 当前楼层Id |
| | | /// </summary> |
| | | public string CurrentFloorId = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 全局场景路径列表---备用 |
| | | /// </summary> |
| | | public List<string> SceneFilePathList = new List<string> { }; |
| | | /// <summary> |
| | | /// 设备路径列表---备用 |
| | | /// </summary> |
| | | public List<string> DeviceFilePathList = new List<string> { }; |
| | | /// <summary> |
| | | /// 功能路径列表---备用 |
| | | /// </summary> |
| | | public List<string> FunctionFilePathList = new List<string> { }; |
| | | /// <summary> |
| | | /// 通用标识--备用 |
| | | /// </summary> |
| | | public object Tag; |
| | | /// <summary> |
| | | /// 期、栋、层等区域---备用 |
| | | /// </summary> |
| | | public Dictionary<string, string> LocationInfoList = new Dictionary<string, string> { }; |
| | | |
| | | #endregion |
| | | |
| | |
| | | namespace Shared.Common.ResponseEntity |
| | | { |
| | | [Serializable] |
| | | public class GetAreaCode |
| | | { |
| | | public List<AreaCodeOBJ> ResponseData = new List<AreaCodeOBJ>(); |
| | | public string ErrorInfo_En; |
| | | public string ErrorInfo_Zh; |
| | | public string ResponseVersion; |
| | | public string StateCode; |
| | | public string ErrorInfo; |
| | | } |
| | | [Serializable] |
| | | public class AreaCodeOBJ |
| | | { |
| | | public string Name{ get; set; } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Phone.Device.Category; |
| | | using Shared.Phone.UserCenter; |
| | | |
| | | namespace Shared.Common |
| | |
| | | /// </summary>
|
| | | private void InitAddTargetControl()
|
| | | {
|
| | | if (this.frameTargetTableControl == null)
|
| | | if (this.frameTargetTableControl == null || this.frameTargetTableControl.Parent == null)
|
| | | {
|
| | | //添加目标的的容器控件
|
| | | this.frameTargetTableControl = new FrameListControl();
|
| | |
| | | {
|
| | | //从网关获取场景的执行目标
|
| | | var result = await this.GetSceneTargetList();
|
| | | //添加【执行目标行】
|
| | | this.AddTargetRow();
|
| | | if (result == true)
|
| | | {
|
| | | //添加【执行目标行】
|
| | | this.AddTargetRow();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | frameSwitchBack.AddChidren(btnFloorName);
|
| | | btnFloorName.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var floors = new Device.Category.SelectFloor();
|
| | | var floors = new SelectFloorForm();
|
| | | AddChidren(floors);
|
| | | floors.Init(580, 330, Direction.Right);
|
| | | floors.changeFloor = true;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendACStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendACStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendDimmableLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendCurtainStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendCurtainStatuComand(this.device);
|
| | | }
|
| | | if (((Rollershade)this.device).WcdType == -1)
|
| | | {
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
File was renamed from ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs |
| | |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | |
| | | namespace Shared.Phone.Device.Category |
| | | namespace Shared.Phone.Category |
| | | { |
| | | public class SelectFloor : FrameLayout |
| | | public class SelectFloorForm : FrameLayout |
| | | { |
| | | |
| | | public Action<string> FloorAction; |
| | |
| | | /// <summary> |
| | | /// Init |
| | | /// </summary> |
| | | public void Init(int x, int y, CommonForm.Direction direction = CommonForm.Direction.Left) |
| | | public void Init(int x, int y, Device.CommonForm.Direction direction = Device.CommonForm.Direction.Left) |
| | | { |
| | | dialogBackground = new Dialog |
| | | { |
| | |
| | | if (floorCount > 0) |
| | | { |
| | | string directStr = string.Empty; |
| | | if (direction == CommonForm.Direction.Right) |
| | | if (direction == Device.CommonForm.Direction.Right) |
| | | { |
| | | directStr = "Right"; |
| | | } |
| | |
| | | /// <param name="verticalScrolView"></param> |
| | | private void AddFloor(VerticalScrolViewLayout verticalScrolView, KeyValuePair<string, string> floor,bool isLast=false) |
| | | { |
| | | var frow = new CommonForm.LeftIconButtonRow(449, 150); |
| | | var frow = new Device.CommonForm.LeftIconButtonRow(449, 150); |
| | | frow.Width = Application.GetMinRealAverage(449); |
| | | frow.Height = Application.GetMinRealAverage(150); |
| | | frow.Tag = floor.Key; |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | (sender as CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | (sender as Device.CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | if (changeFloor) |
| | | { |
| | | Config.Instance.Home.CurrentFloorId = (sender as CommonForm.LeftIconButtonRow).Tag.ToString(); |
| | | Config.Instance.Home.CurrentFloorId = (sender as Device.CommonForm.LeftIconButtonRow).Tag.ToString(); |
| | | Config.Instance.Home.Save(false); |
| | | UserCenter.HdlRoomLogic.Current.RefreshRoomListView(); |
| | | } |
| | | RemoveView(); |
| | | FloorAction?.Invoke((sender as CommonForm.LeftIconButtonRow).Tag.ToString()); |
| | | FloorAction?.Invoke((sender as Device.CommonForm.LeftIconButtonRow).Tag.ToString()); |
| | | |
| | | } |
| | | |
File was renamed from ZigbeeApp/Shared/Phone/Device/Category/SelectHouse.cs |
| | |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | |
| | | namespace Shared.Phone.Device.Category |
| | | namespace Shared.Phone.Category |
| | | { |
| | | public class SelectHouse : FrameLayout |
| | | public class SelectHouseForm : FrameLayout |
| | | { |
| | | public Action<string> HouseAction; |
| | | |
| | |
| | | /// <param name="verticalScrolView"></param> |
| | | private void AddFloor(VerticalScrolViewLayout verticalScrolView, House house) |
| | | { |
| | | var frow = new CommonForm.LeftIconButtonRow(449, 150); |
| | | var frow = new Device.CommonForm.LeftIconButtonRow(449, 150); |
| | | frow.Width = Application.GetMinRealAverage(449); |
| | | frow.Height = Application.GetMinRealAverage(150); |
| | | frow.Tag = house.FileName; |
| | |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | (sender as CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | var home = House.GetHouseByFilePath((sender as CommonForm.LeftIconButtonRow).Tag.ToString()); |
| | | (sender as Device.CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | var home = House.GetHouseByFilePath((sender as Device.CommonForm.LeftIconButtonRow).Tag.ToString()); |
| | | RemoveView(); |
| | | HouseAction?.Invoke(home.Id); |
| | | } |
| | |
| | | |
| | | namespace Shared.Phone.Device.CommonForm |
| | | { |
| | | public class DeviceIconSelectedIMGByLocal:FrameLayout |
| | | public class DeviceIconSelectedIMGByLocal : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// bodyFrameLayout |
| | |
| | | /// <summary> |
| | | /// action |
| | | /// </summary> |
| | | public Action<string,string > action; |
| | | public Action<string, string> action; |
| | | /// <summary> |
| | | /// tempIcon |
| | | /// </summary> |
| | |
| | | scrollView.AddChidren(itemView); |
| | | for (int i = 0; i < 4; i++) |
| | | { |
| | | var icon = new FunctionIconButton(58+ i*(207+46), 58); |
| | | var icon = new FunctionIconButton(58 + i * (207 + 46), 58); |
| | | icon.Init($"FunctionIcon/{k}Icon.png", $"FunctionIcon/{k}IconSelected.png"); |
| | | itemView.AddChidren(icon); |
| | | k++; |
| | |
| | | icon.ImageBtn.MouseUpEventHandler += selectIcon; |
| | | } |
| | | } |
| | | |
| | | var confirmBtn = new CommonForm.CompleteButton(1472, 907, 127); |
| | | confirmBtn.SetTitle(R.MyInternationalizationString.Save); |
| | | bodyFrameLayout.AddChidren(confirmBtn); |
| | | confirmBtn.MouseUpEventHandler += (sender, e) => |
| | |
|
| | | var btnConfirm = new UserCenter.BottomClickButton(); |
| | | btnConfirm.TextID = R.MyInternationalizationString.Save; |
| | | bodyFrameLayout.AddChidren(btnConfirm); |
| | | btnConfirm.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if (tempIcon.ImageBtn != null) |
| | | { |
| | |
| | | using System; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.DeviceLogic; |
| | | using Shared.Phone.UserCenter; |
| | | using ZigBee.Device; |
| | | |
| | |
| | | {
|
| | | //发送获取温度的命令 |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev); |
| | | HdlDeviceAttributeLogic.Current.SendTemperatureStatuComand(dev); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(room.HumidityDevice) == false) |
| | | { |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); |
| | | ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(dev); |
| | | var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice);
|
| | | HdlDeviceAttributeLogic.Current.SendHumidityStatuComand(dev); |
| | | } |
| | | |
| | | roomListBtn = new Button() |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.Category; |
| | | using Shared.Phone.UserCenter; |
| | | |
| | | namespace Shared.Phone.Device.CommonForm |
| | |
| | | Send.dictionary(deviceConditionsInfo, "Cluster_ID", "1026"); |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | Send.dictionary(deviceConditionsInfo, "Range", "1");//1:等于AttriButeData1时触发动作 |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", "50");//默认温度值50℃ |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", "5000");//默认温度值50℃ |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | } |
| | | else |
| | |
| | | Send.dictionary(deviceConditionsInfo, "Cluster_ID", "1029"); |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | Send.dictionary(deviceConditionsInfo, "Range", "1");//1:等于AttriButeData1时触发动作 |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", "50");//默认湿度值50% |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", "5000");//默认湿度值50% |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | } |
| | | mUIPickerView.setNPicker(mList1, mList2, mList3); |
| | |
| | | |
| | | mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) => |
| | | { |
| | | ///温度进率转换*100 |
| | | var strValue = (int.Parse(mList2[s2]) * 100).ToString(); |
| | | SelectedDeviceStatus = "TemperatureSensor"; |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", mList2[s2]); |
| | | Send.dictionary(deviceConditionsInfo, "AttriButeData1", strValue); |
| | | switch (mList1[s1]) |
| | | { |
| | | case ">": |
| | |
| | | break; |
| | | } |
| | | //查找索引 |
| | | index1 = mList1.IndexOf(s); |
| | | index2 = mList2.IndexOf(devices["AttriButeData1"]); |
| | | index1 = mList1.IndexOf(s);
|
| | | //转换温度值/100
|
| | | var dd = (int.Parse(devices["AttriButeData1"])/100).ToString(); |
| | | index2 = mList2.IndexOf(dd); |
| | | |
| | | } |
| | | ///更新最新状态; |
| | |
| | | s = "≤"; |
| | | } |
| | | break; |
| | | } |
| | | }
|
| | | ///转换温度值/100
|
| | | string srtValue = (int.Parse(conditions["AttriButeData1"]) / 100).ToString(); |
| | | if (conditions["Cluster_ID"] == "1026") |
| | | { |
| | | icon = "ZigeeLogic/temperature.png"; |
| | | state = s + conditions["AttriButeData1"] + "℃"; |
| | | state = s + srtValue + "℃"; |
| | | } |
| | | else |
| | | { |
| | | icon = "ZigeeLogic/humidity.png"; |
| | | state = s + conditions["AttriButeData1"] + "%"; |
| | | state = s + srtValue + "%"; |
| | | } |
| | | break; |
| | | |
| | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 选中该设备功能作为条件或者目标的视图方法 |
| | | /// 选中该作为条件或者目标的视图方法 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | void DevcieView( CommonDevice common,Button button) |
| | |
| | | Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); |
| | | actionsInfo.Add("LinkType", 8); |
| | | actionsInfo.Add("DeviceAddr", common.DeviceAddr); |
| | | actionsInfo.Add("Epoint", common.DeviceEpoint); |
| | | actionsInfo.Add("Epoint","200"); |
| | | string SelectedDeviceStatus = ""; |
| | | switch (common.Type) |
| | | { |
| | |
| | | Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); |
| | | actionsInfo.Add("LinkType", 8); |
| | | actionsInfo.Add("DeviceAddr", doorLock.DeviceAddr); |
| | | actionsInfo.Add("Epoint", doorLock.DeviceEpoint); |
| | | actionsInfo.Add("Epoint", "200"); |
| | | actionsInfo.Add("PassData", "055704010113");//默认门锁常关 |
| | | |
| | | //new一个新逻辑对象; |
| | |
| | | }; |
| | | phoneZoneSelectedShowView.AddChidren(phoneZoneListView); |
| | | |
| | | var okBtn = new CommonForm.CompleteButton(1166, 668, 127); |
| | | phoneZoneSelectedShowView.AddChidren(okBtn); |
| | | okBtn.MouseUpEventHandler += (sender, e) => |
| | | var btnOk = new UserCenter.BottomClickButton(668); |
| | | btnOk.Y = Application.GetRealHeight(1166); |
| | | btnOk.TextID = R.MyInternationalizationString.Complete; |
| | | phoneZoneSelectedShowView.AddChidren(btnOk); |
| | | btnOk.ButtonClickEvent += (sender, e) => |
| | | { |
| | | ActionSelectedZone?.Invoke(CommonPage.PhoneZoneStr); |
| | | ActionSelectedZone = null; |
| | | RemoveFromParent(); |
| | | }; |
| | | phoneZoneSelectedShowView.AddChidren(okBtn); |
| | | var cancleBtn = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(1719), |
| | |
| | | using Shared.Common;
|
| | | using Shared.Phone.Device.AC;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
| | | this.deviceAc = (AC)this.device;
|
| | | //先清空
|
| | | this.listControl = new List<ButtonBase>();
|
| | | if (device.HadReadDeviceStatu == true && ACControlBase.IsOpen(deviceAc) == true)
|
| | | if (device.HadReadDeviceStatu == true && DeviceAcDetailCardMethord.IsOpen(deviceAc) == true)
|
| | | {
|
| | | //设置状态文字 当前室温
|
| | | this.SetStatuText(deviceAc.currentLocalTemperature + "℃");
|
| | |
| | | /// <param name="frameWhiteBack"></param>
|
| | | private void InitAcControl(FrameLayout frameWhiteBack)
|
| | | {
|
| | | bool isAcOpen = ACControlBase.IsOpen(deviceAc);
|
| | | bool isAcOpen = DeviceAcDetailCardMethord.IsOpen(deviceAc);
|
| | |
|
| | | //空调控件的容器
|
| | | var frameAcBack = new FrameLayout();
|
| | |
| | | frameAcBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.AddChidren(frameAcBack);
|
| | |
|
| | | this.nowProgressValue = ACControlBase.GetCurrentModeTemperature(deviceAc);
|
| | | this.nowProgressValue = DeviceAcDetailCardMethord.GetCurrentModeTemperature(deviceAc);
|
| | | if (nowProgressValue < 16) { nowProgressValue = 16; }
|
| | | if (nowProgressValue > 32) { nowProgressValue = 32; }
|
| | | //空调控件
|
| | |
| | | this.btnNowModeView = new NormalViewControl(200, 55, true);
|
| | | btnNowModeView.Y = Application.GetMinRealAverage(184);
|
| | | btnNowModeView.Gravity = Gravity.CenterHorizontal;
|
| | | btnNowModeView.Text = ACControlBase.GetModeNameByModeId(deviceAc.currentSystemMode);
|
| | | btnNowModeView.Text = DeviceAcDetailCardMethord.GetModeNameByModeId(deviceAc.currentSystemMode);
|
| | | btnNowModeView.TextSize = 12;
|
| | | btnNowModeView.TextAlignment = TextAlignment.Center;
|
| | | frameAcBack.AddChidren(btnNowModeView);
|
| | |
| | |
|
| | | btnFanSwingMode.X = XX;
|
| | | btnFanSwingMode.Y = YY;
|
| | | btnFanSwingMode.UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | btnFanSwingMode.SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | btnFanSwingMode.UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | btnFanSwingMode.SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | btnFanSwingMode.IsSelected = isAcOpen;
|
| | | frameWhiteBack.AddChidren(btnFanSwingMode);
|
| | | btnFanSwingMode.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //空调打开状态才能点击
|
| | | if (ACControlBase.IsOpen(deviceAc) == true)
|
| | | if (DeviceAcDetailCardMethord.IsOpen(deviceAc) == true)
|
| | | {
|
| | | //选择摆风
|
| | | this.SelectFanSwing(frameWhiteBack);
|
| | |
| | | var btnModel = new IconViewControl(81);
|
| | | btnModel.X = XX;
|
| | | btnModel.Y = YY;
|
| | | btnModel.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | btnModel.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | btnModel.UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | btnModel.SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | btnModel.IsSelected = isAcOpen;
|
| | | frameWhiteBack.AddChidren(btnModel);
|
| | | XX = btnModel.Right + IconSpace;
|
| | |
| | | btnModel.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //空调打开状态才能点击
|
| | | if (ACControlBase.IsOpen(deviceAc) == true)
|
| | | if (DeviceAcDetailCardMethord.IsOpen(deviceAc) == true)
|
| | | {
|
| | | //选择模式
|
| | | this.SelectAcModel(frameWhiteBack);
|
| | |
| | | var btnFanMode = new IconViewControl(81);
|
| | | btnFanMode.X = XX;
|
| | | btnFanMode.Y = YY;
|
| | | btnFanMode.UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | btnFanMode.SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | btnFanMode.UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeUnSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | btnFanMode.SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | btnFanMode.IsSelected = isAcOpen;
|
| | | frameWhiteBack.AddChidren(btnFanMode);
|
| | | this.listControl.Add(btnFanMode);
|
| | | btnFanMode.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //空调打开状态才能点击
|
| | | if (ACControlBase.IsOpen(deviceAc) == true)
|
| | | if (DeviceAcDetailCardMethord.IsOpen(deviceAc) == true)
|
| | | {
|
| | | //选择模式
|
| | | this.SelectAcWindSpeed(frameWhiteBack);
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[0].SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingMode(oldModel);
|
| | | listControl[0].UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingMode(oldModel);
|
| | | listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingMode(oldModel);
|
| | | listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingMode(oldModel);
|
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | listControl[0].SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | listControl[0].UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | |
|
| | | deviceAc.SetFanSwingAsyncMode(fanSwingMode);
|
| | | }
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[1].SelectedImagePath = ACControlBase.GetModeSelectedImagePathByMode(oldModel);
|
| | | listControl[1].UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByMode(oldModel);
|
| | | listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByMode(oldModel);
|
| | | listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByMode(oldModel);
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | listControl[1].SelectedImagePath = ACControlBase.GetModeSelectedImagePathByMode(mode);
|
| | | listControl[1].UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByMode(mode);
|
| | | listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByMode(mode);
|
| | | listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByMode(mode);
|
| | |
|
| | | deviceAc.SetSystemModeAsync(mode);
|
| | | }
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[3].SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | listControl[3].UnSelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | listControl[3].SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | listControl[3].UnSelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | |
|
| | | deviceAc.SetFanModeAsync(mode);
|
| | | }
|
| | |
| | | arcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
|
| | | }
|
| | | }
|
| | | this.listControl[1].SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | this.listControl[1].UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | this.btnNowModeView.Text = ACControlBase.GetModeNameByModeId(deviceAc.currentSystemMode);
|
| | | arcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(deviceAc);
|
| | | arcScaleSeekBar.IsClickable = ACControlBase.IsOpen(deviceAc);
|
| | | this.listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | this.listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | this.btnNowModeView.Text = DeviceAcDetailCardMethord.GetModeNameByModeId(deviceAc.currentSystemMode);
|
| | | arcScaleSeekBar.Progress = DeviceAcDetailCardMethord.GetCurrentModeTemperature(deviceAc);
|
| | | arcScaleSeekBar.IsClickable = DeviceAcDetailCardMethord.IsOpen(deviceAc);
|
| | | //设置状态文字 当前室温
|
| | | this.SetStatuText(deviceAc.currentLocalTemperature + "℃");
|
| | | //送风没有温度的概念
|
| | |
| | | {
|
| | | this.listControl[3].IsSelected = true;
|
| | | }
|
| | | this.listControl[3].SelectedImagePath = ACControlBase.GetFanModeSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | this.listControl[3].UnSelectedImagePath = ACControlBase.GetFanModeUnSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | this.listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | this.listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeUnSelectedImagePathByFanModeId(deviceAc.currentFanMode);
|
| | | });
|
| | | //已经接收到网关的反馈
|
| | | return true;
|
| | |
| | | {
|
| | | this.listControl[0].IsSelected = true;
|
| | | }
|
| | | this.listControl[0].SelectedImagePath = ACControlBase.GetFanSwingModeSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | this.listControl[0].UnSelectedImagePath = ACControlBase.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | this.listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | this.listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingModeId(deviceAc.currentFanSwingMode);
|
| | | });
|
| | | //已经接收到网关的反馈
|
| | | return true;
|
File was renamed from ZigbeeApp/Shared/Phone/Device/AC/ACControlBase.cs |
| | |
| | | using System; |
| | | namespace Shared.Phone.Device.AC |
| | | namespace Shared.Phone.MainPage.ControlForm |
| | | { |
| | | public class ACControlBase |
| | | /// <summary>
|
| | | /// 郭雪城的空调深度卡片的各种方法
|
| | | /// </summary> |
| | | public class DeviceAcDetailCardMethord |
| | | { |
| | | #region ◆ 变量_____________________________ |
| | | /// <summary> |
| | |
| | | using Shared.Common;
|
| | | using Shared.Phone.Device.DeviceLogic;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendACStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendACStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendDimmableLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendCurtainStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendCurtainStatuComand(this.device);
|
| | | }
|
| | | if (((Rollershade)this.device).WcdType == -1)
|
| | | {
|
| | |
| | | using System;
|
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | //检测能否发送获取状态命令
|
| | | if (this.CheckCanSendStatuComand() == true)
|
| | | {
|
| | | Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendLightStatuComand(this.device);
|
| | | }
|
| | | }
|
| | |
|
New file |
| | |
| | | using Shared.Phone.UserCenter;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.MainPage.Controls
|
| | | {
|
| | | /// <summary>
|
| | | /// 选择本地设备图片的界面
|
| | | /// </summary>
|
| | | public class SelectLocalDeviceImageForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 结束选择的事件(图片名字)
|
| | | /// </summary>
|
| | | public Action<string> FinishSelectEvent = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.LocalPicture));
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //列表控件
|
| | | var listView = new VerticalListControl();
|
| | | listView.Height = bodyFrameLayout.Height;
|
| | | bodyFrameLayout.AddChidren(listView);
|
| | |
|
| | | int space = this.GetPictrueRealSize(46);
|
| | | int backWidth = (listView.Width - ControlCommonResourse.XXLeft * 2 - space * 3) / 4;
|
| | | //防止误差,分两步计算
|
| | | int iconWidth = backWidth - this.GetPictrueRealSize(43) - this.GetPictrueRealSize(43);
|
| | |
|
| | | //一共28张图片
|
| | | FrameLayout frameRow = null;
|
| | | for (int i = 0; i < 28; i++)
|
| | | {
|
| | | //4个一组
|
| | | if (i % 4 == 0)
|
| | | {
|
| | | //行控件
|
| | | frameRow = new FrameLayout();
|
| | | frameRow.Height = backWidth + Application.GetRealHeight(58);
|
| | | listView.AddChidren(frameRow);
|
| | | }
|
| | | //背景
|
| | | var frameBack = new FrameLayoutControl();
|
| | | frameBack.UseClickStatu = false;
|
| | | frameBack.Height = backWidth;
|
| | | frameBack.Width = backWidth;
|
| | | frameBack.Radius = (uint)backWidth / 2;
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameBack.X = ControlCommonResourse.XXLeft + (i % 4) * (backWidth + space);
|
| | | frameBack.Y = Application.GetRealHeight(58);
|
| | | frameRow.AddChidren(frameBack);
|
| | |
|
| | | //图片
|
| | | var btnIcon = new PicViewControl(iconWidth, iconWidth, false);
|
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/{i + 1}Icon.png";
|
| | | btnIcon.SelectedImagePath = $"FunctionIcon/{i + 1}IconSelected.png";
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | frameBack.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | frameBack.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //结束选择的事件
|
| | | //this.FinishSelectEvent?.Invoke(btnIcon.ImagePath);
|
| | | this.CloseForm();
|
| | | };
|
| | | }
|
| | |
|
| | | //保存
|
| | | var btnSave = new BottomClickButton();
|
| | | btnSave.TextID = R.MyInternationalizationString.uSave;
|
| | | btnSave.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | };
|
| | |
|
| | | //调整桌布高度
|
| | | listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23));
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | this.FinishSelectEvent = null;
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var selectHouse = new Device.Category.SelectHouse();
|
| | | var selectHouse = new Category.SelectHouseForm();
|
| | | selectHouse.Init();
|
| | | selectHouse.HouseAction = (houseId) =>
|
| | | {
|
| | |
| | | /// </summary>
|
| | | private void ShowSelectFloorForm(NormalViewControl btnFloor)
|
| | | {
|
| | | var floorFL = new Device.Category.SelectFloor();
|
| | | var floorFL = new Category.SelectFloorForm();
|
| | | this.AddChidren(floorFL);
|
| | | floorFL.Init(35, 153);
|
| | | floorFL.changeFloor = true;
|
old mode 100755
new mode 100644
| | |
| | | using System; |
| | | using System.Collections.Generic;
|
| | | using Shared.Common; |
| | | using Shared.Phone.Device.Category; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Shared.Phone.UserCenter;
|
| | | using Shared.Phone.UserView; |
| | |
| | | };
|
| | |
|
| | | //获取楼层
|
| | | this.curFloorId = Config.Instance.Home.CurrentFloorId;
|
| | | if (this.curFloorId == string.Empty) |
| | | { |
| | | this.curFloorId = Config.Instance.Home.CurrentFloorId; |
| | | }
|
| | | var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
|
| | | if (dicFloor.Count == 0)
|
| | | {
|
| | |
| | | btnIconContr.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //楼层菜单
|
| | | var floors = new SelectFloor();
|
| | | var floors = new Category.SelectFloorForm();
|
| | | AddChidren(floors);
|
| | | floors.changeFloor = false;
|
| | | floors.CurFloorId = curFloorId;
|
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.Category; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Shared.Phone.UserCenter;
|
| | | using Shared.Phone.UserView; |
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 自动化推送结果______________________
|
| | |
|
| | | /// <summary>
|
| | | /// 自动化推送内容
|
| | | /// </summary>
|
| | | public class LogicPushResult
|
| | | {
|
| | | /// <summary>
|
| | | /// 自动化ID
|
| | | /// </summary>
|
| | | public int LogicId = -1;
|
| | | /// <summary>
|
| | | /// 自动化名称
|
| | | /// </summary>
|
| | | public string LogicName = string.Empty;
|
| | | /// <summary>
|
| | | /// 自动化推送内容
|
| | | /// </summary>
|
| | | public string LogicCustomPushText = string.Empty;
|
| | | /// <summary>
|
| | | /// 门锁常开模式数据(自动化推送)
|
| | | /// </summary>
|
| | | public DoorNormallyOpenData ActionData = null;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 门锁常开模式数据(自动化推送)
|
| | | /// </summary>
|
| | | public class DoorNormallyOpenData
|
| | | {
|
| | | /// <summary>
|
| | | /// 8:常开模式的数据
|
| | | /// </summary>
|
| | | public int Actiontype = -1;
|
| | | /// <summary>
|
| | | /// 门锁Mac地址
|
| | | /// </summary>
|
| | | public string MacStr = string.Empty;
|
| | | /// <summary>
|
| | | /// 门锁端口号
|
| | | /// </summary>
|
| | | public int Epoint = -1;
|
| | | /// <summary>
|
| | | /// 设置自动化时,发送的透传数据 055704010112:常开模式打开 055704010113:常开模式关闭
|
| | | /// </summary>
|
| | | public string PassDataString = string.Empty;
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 空调_______________________________ |
| | |
|
| | | /// <summary> |
| | | /// SendACStatuComand |
| | | /// </summary> |
| | | /// <param name="device">设备</param> |
| | | public void SendACStatuComand(CommonDevice device) |
| | | { |
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | | SendFanStatuComand(device); |
| | | System.Threading.Thread.Sleep(300); |
| | | SendThermostatStatuComand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// SendThermostatStatuComand
|
| | | /// </summary>
|
| | | /// <param name="device">设备</param>
|
| | | public void SendThermostatStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.Thermostat },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.LocalTemperature}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.CoolingSetpoint}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.HeatingSetpoint}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.AutoSetpoint}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.SystemMode}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.AcModeSupport}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.CleanStatu}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// SendFanStatuComand
|
| | | /// </summary>
|
| | | /// <param name="device">设备</param>
|
| | | private void SendFanStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.FanControl },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.FanMode}
|
| | | },
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.FanSwing}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 窗帘_______________________________ |
| | | /// <summary>
|
| | | /// 发送获取窗帘状态命令
|
| | | /// </summary>
|
| | | /// <param name="device">窗帘</param>
|
| | | public void SendCurtainStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.WindowCovering },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.CurrentPositionLiftPercentage}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 灯光_______________________________ |
| | | |
| | | /// <summary> |
| | | /// Light |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | public void SendLightStatuComand(CommonDevice device) |
| | | { |
| | | SendSwitchStatuComand(device); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Light |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | public void SendDimmableLightStatuComand(CommonDevice device) |
| | | { |
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | | SendSwitchStatuComand(device); |
| | | System.Threading.Thread.Sleep(300); |
| | | SendLevelStatuComand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 发送获取灯光状态命令
|
| | | /// </summary>
|
| | | /// <param name="device">窗帘</param>
|
| | | private void SendSwitchStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.Switch },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.Switch}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 发送获取灯光状态命令
|
| | | /// </summary>
|
| | | /// <param name="device">窗帘</param>
|
| | | private void SendLevelStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.LevelControl },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.LevelControl}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 温湿度_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 读取温度 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | public void SendTemperatureStatuComand(CommonDevice device) |
| | | { |
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject |
| | | { |
| | | { "DeviceAddr",device.DeviceAddr }, |
| | | { "Epoint", device.DeviceEpoint }, |
| | | { "Cluster_ID", (int)Cluster_ID.TemperatureMeasurement }, |
| | | { "Command", 108 } |
| | | }; |
| | | var attriBute = new Newtonsoft.Json.Linq.JArray |
| | | { |
| | | new Newtonsoft.Json.Linq.JObject |
| | | { |
| | | { "AttriButeId", (int)AttriButeId.MeasuredValue} |
| | | } |
| | | }; |
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } }; |
| | | jObject.Add("Data", data); |
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取湿度 |
| | | /// </summary> |
| | | /// <param name="device"></param> |
| | | public void SendHumidityStatuComand(CommonDevice device) |
| | | { |
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject |
| | | { |
| | | { "DeviceAddr",device.DeviceAddr }, |
| | | { "Epoint", device.DeviceEpoint }, |
| | | { "Cluster_ID", (int)Cluster_ID.RelativeHumidityMeasurement }, |
| | | { "Command", 108 } |
| | | }; |
| | | var attriBute = new Newtonsoft.Json.Linq.JArray |
| | | { |
| | | new Newtonsoft.Json.Linq.JObject |
| | | { |
| | | { "AttriButeId", (int)AttriButeId.MeasuredValue} |
| | | } |
| | | }; |
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } }; |
| | | jObject.Add("Data", data); |
| | | device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString()); |
| | | } |
| | | |
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | var pra = new GetDoorIdPra();
|
| | | pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | | pra.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
|
| | | pra.DoorLockId = i_doorLock.DeviceAddr + "_200";
|
| | | //不二次发送,不检测错误码
|
| | | var listCheck = new List<string>() { "NotSetAgain", "NotCheck" };
|
| | | var result = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/GetDoorLockPager", true, pra, listCheck);
|
| | |
| | | //如果还没有创建,则虚拟一个特殊的东西出来
|
| | | var pra2 = new AddDoorPra();
|
| | | pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | | pra2.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
|
| | | pra2.DoorLockId = i_doorLock.DeviceAddr + "_200";
|
| | | var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra2, listCheck);
|
| | | //云端是直接返回创建的主键字符串
|
| | | return result2;
|
| | |
| | | //逻辑触发上报
|
| | | else if (topic == gatewayId + "/Logic/Execute_Respon")
|
| | | {
|
| | | this.LogicExecutePush(null);
|
| | | this.LogicExecutePush(JObject.Parse(msgData));
|
| | | }
|
| | | //场景触发上报
|
| | | else if (topic == gatewayId + "/Scene/Exec_Respon")
|
| | |
| | | private void DoorLockDeviceReportPush(JObject receiveData)
|
| | | {
|
| | | //只有徐梅的门锁界面没有打开的情况下,才会处理这个东西
|
| | | if (ControlCommonResourse.IsDoorLockPageOpen == false)
|
| | | if (ControlCommonResourse.IsDoorLockPageOpen == false && UserCenterResourse.UserInfo.AuthorityNo == 1)
|
| | | {
|
| | | var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint"));
|
| | | if ((device is ZigBee.Device.DoorLock) == false)
|
| | | if (device.Type != DeviceType.DoorLock)
|
| | | {
|
| | | //它不是门锁
|
| | | return;
|
| | |
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockAlarmsResult>(receiveData["Data"].ToString());
|
| | | if (info.Clusterid == 257)
|
| | | {
|
| | | //常开模式开启
|
| | | if (info.AlarmCode == 216)
|
| | | //常开模式关闭
|
| | | if (info.AlarmCode == 217 || info.AlarmCode == 219)
|
| | | {
|
| | | DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null);
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //弹出徐梅的那个窗口
|
| | | DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | /// <param name="receiveData"></param>
|
| | | private void LogicExecutePush(JObject receiveData)
|
| | | {
|
| | | //目前不处理逻辑上报内容
|
| | |
|
| | | //显示有新消息的特效
|
| | | this.ShowHadNewMessageAppeal();
|
| | |
|
| | | //这个东西暂时不处理
|
| | | ////只有徐梅的门锁界面没有打开的情况下,才会处理这个东西
|
| | | //if (ControlCommonResourse.IsDoorLockPageOpen == false && UserCenterResourse.UserInfo.AuthorityNo == 1)
|
| | | //{
|
| | | // var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint"));
|
| | | // if (device.Type != DeviceType.DoorLock)
|
| | | // {
|
| | | // return;
|
| | | // }
|
| | | // //自动化执行 常开关闭
|
| | | // var data = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(receiveData["Data"].ToString());
|
| | | // if (data.ActionData != null && data.ActionData.Actiontype == 8
|
| | | // && data.ActionData.PassDataString == "055704010113")
|
| | | // {
|
| | | // HdlThreadLogic.Current.RunMain(() =>
|
| | | // {
|
| | | // //弹出徐梅的那个窗口
|
| | | // DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidDialog((ZigBee.Device.DoorLock)device, DoorLock.DoorLockCommonInfo.DoorLockMessType.ServicePush, null);
|
| | | // });
|
| | | // }
|
| | | //}
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | }
|
| | | else if (data.Type == "1")
|
| | | {
|
| | | var scene = Common.SceneRoomUI.AllSceneRoomUIList.Find((obj) => obj.sceneUI.Id == data.ScenesId);
|
| | | var scene = HdlSceneLogic.Current.GetSceneUIBySceneId(data.ScenesId);
|
| | | if (scene != null)
|
| | | {
|
| | | string msg = scene.sceneUI.Name + "\r\n";
|
| | | string msg = scene.Name + "\r\n";
|
| | | //目标场景不存在
|
| | | msg += Language.StringByID(R.MyInternationalizationString.uTargetSceneIsNotExsit);
|
| | | this.ShowTipMsg(msg);
|
| | |
| | | return;
|
| | | }
|
| | | //读取状态
|
| | | Phone.Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendThermostatStatuComand(listDevice[i]);
|
| | | HdlDeviceAttributeLogic.Current.SendThermostatStatuComand(listDevice[i]);
|
| | | System.Threading.Thread.Sleep(200);
|
| | | }
|
| | | });
|
| | |
| | | using System.Collections.Generic; |
| | | using System.Threading.Tasks; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.Category; |
| | | using Shared.Phone.UserCenter.Device; |
| | | using ZigBee.Device; |
| | | using static ZigBee.Device.Panel; |
| | |
| | | btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uMoreSettion);
|
| | | btnHelp.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //更改过一次之后,则界面关闭后不再更改
|
| | | this.saveDefultName = string.Empty;
|
| | | //改名字
|
| | | btnNote.txtInput.FinishInputEvent();
|
| | |
|
| | |
| | | detailBackFrame.AddChidren(btnFinish);
|
| | | btnFinish.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | //更改过一次之后,则界面关闭后不再更改
|
| | | this.saveDefultName = string.Empty;
|
| | | //改名字
|
| | | btnNote.txtInput.FinishInputEvent();
|
| | | //关闭自身
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 获取记录___________________________
|
| | | #region ■ 获取门锁打开记录___________________
|
| | |
|
| | | /// <summary>
|
| | | /// 获取历史记录
|
| | |
| | | return null;
|
| | | }
|
| | | var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<GetHistoryDataResult>(result);
|
| | | listLog.AddRange(dataInfo.PageData);
|
| | | foreach (var data in dataInfo.PageData)
|
| | | {
|
| | | //不知道为什么会有上报了虚拟9000的那个特殊的东西
|
| | | if (data.OpenLockMode == 9000 && data.OtherOpenLockMode <= 9000)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | listLog.Add(data);
|
| | | }
|
| | |
|
| | | if (dataInfo.HasNextPage == false)
|
| | | {
|
| | |
| | | return listLog;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 获取门锁其他记录___________________
|
| | |
|
| | | /// <summary>
|
| | | /// 获取门锁的其他记录
|
| | | /// </summary>
|
| | |
| | | {
|
| | | var listLog = new List<HistoryInfo>();
|
| | |
|
| | | //去获取其他信息
|
| | | //获取门锁其他类信息上报
|
| | | var pra2 = new MessageInfoPra();
|
| | | pra2.BeginTime = beginTime;
|
| | | pra2.EndTime = endTime;
|
| | |
| | | {
|
| | | return null;
|
| | | }
|
| | | this.AdjustDoorOtherAlarmData(ref listLog, result);
|
| | |
|
| | | //从自动化中,获取常开模式记录
|
| | | pra2.Topic = "/Logic/Execute_Respon";
|
| | | result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
|
| | | if (result == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | this.AdjustDoorNormallyOpenData(ref listLog, result);
|
| | |
|
| | | //获取门锁临时密码开锁记录
|
| | | pra2.Topic = "/DoorLock/DoorLockOperatingEventNotificationCommand";
|
| | | result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra2);
|
| | | if (result == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | this.AdjustDoorTemporaryPasswordData(ref listLog, result);
|
| | |
|
| | | return listLog;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 处理门锁常开模式记录信息
|
| | | /// </summary>
|
| | | /// <param name="listLog"></param>
|
| | | /// <param name="result"></param>
|
| | | private void AdjustDoorOtherAlarmData(ref List<HistoryInfo> listLog, string result)
|
| | | {
|
| | | var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
|
| | | string doorKey = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
|
| | | string doorKey = this.DeviceDoor.DeviceAddr + "_200";
|
| | | foreach (var myInfo in dataInfo2.PageData)
|
| | | {
|
| | | //设备对象
|
| | |
| | | }
|
| | | listLog.Add(data);
|
| | | }
|
| | | }
|
| | |
|
| | | return listLog;
|
| | | /// <summary>
|
| | | /// 处理门锁常开模式信息上报
|
| | | /// </summary>
|
| | | /// <param name="listLog"></param>
|
| | | /// <param name="result"></param>
|
| | | private void AdjustDoorNormallyOpenData(ref List<HistoryInfo> listLog, string result)
|
| | | {
|
| | | var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
|
| | | string doorKey = this.DeviceDoor.DeviceAddr + "_200";
|
| | | foreach (var myInfo in dataInfo2.PageData)
|
| | | {
|
| | | var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson);
|
| | | var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicPushResult>(jobject["Data"].ToString());
|
| | | if (myActionData.ActionData == null || myActionData.ActionData.Actiontype != 8)
|
| | | {
|
| | | //不是常开模式的自动化
|
| | | continue;
|
| | | }
|
| | | string deviceAddr = myActionData.ActionData.MacStr;
|
| | | int deviceEpoint = myActionData.ActionData.Epoint;
|
| | | if (doorKey != deviceAddr + "_" + deviceEpoint)
|
| | | {
|
| | | //不是同一个门锁的记录
|
| | | continue;
|
| | | }
|
| | |
|
| | | var data = new HistoryInfo();
|
| | | data.DeviceMac = deviceAddr;
|
| | | data.DeviceEpoint = deviceEpoint;
|
| | | //消息
|
| | | if (myActionData.ActionData.PassDataString == "055704010112")
|
| | | {
|
| | | //常开模式开启(自动化触发)
|
| | | data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg11);
|
| | | }
|
| | | else if (myActionData.ActionData.PassDataString == "055704010113")
|
| | | {
|
| | | //常开模式结束(自动化触发)
|
| | | data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg12);
|
| | | }
|
| | | else
|
| | | {
|
| | | continue;
|
| | | }
|
| | | //时间
|
| | | data.UnlockTime = myInfo.CreatedOnUtc;
|
| | | //主键
|
| | | data.MsgKeyId = myInfo.Id;
|
| | | //消息区分
|
| | | data.OpenLockMode = 9000;
|
| | |
|
| | | listLog.Add(data);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 处理门锁临时密码上报
|
| | | /// </summary>
|
| | | /// <param name="listLog"></param>
|
| | | /// <param name="result"></param>
|
| | | private void AdjustDoorTemporaryPasswordData(ref List<HistoryInfo> listLog, string result)
|
| | | {
|
| | | var dataInfo2 = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
|
| | | string doorKey = this.DeviceDoor.DeviceAddr + "_200";
|
| | | foreach (var myInfo in dataInfo2.PageData)
|
| | | {
|
| | | var jobject = Newtonsoft.Json.Linq.JObject.Parse(myInfo.PayloadJson);
|
| | | string deviceAddr = jobject.Value<string>("DeviceAddr");
|
| | | int deviceEpoint = jobject.Value<int>("Epoint");
|
| | | if (doorKey != deviceAddr + "_" + deviceEpoint)
|
| | | {
|
| | | //不是同一个门锁的记录
|
| | | continue;
|
| | | }
|
| | | var myActionData = Newtonsoft.Json.JsonConvert.DeserializeObject<PasswordOperationData>(jobject["Data"].ToString());
|
| | | if (myActionData.UserID != 246)
|
| | | {
|
| | | //不是临时密码
|
| | | continue;
|
| | | }
|
| | | var data = new HistoryInfo();
|
| | | data.DeviceMac = deviceAddr;
|
| | | data.DeviceEpoint = deviceEpoint;
|
| | | //消息
|
| | | if (myActionData.OperationEventCode == 2)
|
| | | {
|
| | | //临时密码开锁成功
|
| | | data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg13);
|
| | | }
|
| | | else
|
| | | {
|
| | | //临时密码开锁失败
|
| | | data.AlarmMsg = Language.StringByID(R.MyInternationalizationString.uDoorLockAlarmMsg14);
|
| | | }
|
| | | //时间
|
| | | data.UnlockTime = myInfo.CreatedOnUtc;
|
| | | //主键
|
| | | data.MsgKeyId = myInfo.Id;
|
| | |
|
| | | listLog.Add(data);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString();
|
| | | pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString();
|
| | | pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | | pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
|
| | | pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_200";
|
| | |
|
| | | return pra;
|
| | | }
|
| | |
| | | pra.UnlockTimeBegin = dateFrom.ToUniversalTime().ToString();
|
| | | pra.UnlockTimeEnd = dateTo.ToUniversalTime().ToString();
|
| | | pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | | pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_" + this.DeviceDoor.DeviceEpoint;
|
| | | pra.DoorLockId = this.DeviceDoor.DeviceAddr + "_200";
|
| | | pra.CloudAccountIds = listUser;
|
| | | pra.OpenLockModes = listLock;
|
| | |
|
| | |
| | | public string MsgKeyId = string.Empty;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 临时密码数据
|
| | | /// </summary>
|
| | | private class PasswordOperationData
|
| | | {
|
| | | /// <summary>
|
| | | /// 0:密码 15:指纹 3:IC卡
|
| | | /// </summary>
|
| | | public int OperationEventSoure = -1;
|
| | | /// <summary>
|
| | | /// 2:开锁成功
|
| | | /// </summary>
|
| | | public int OperationEventCode = -1;
|
| | | /// <summary>
|
| | | /// 246代表临时密码
|
| | | /// </summary>
|
| | | public int UserID = -1;
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
|
| | | btnUserIcon.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果改住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new UserInformationForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果改住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Member.MemberListForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果改住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Safety.SafetyManagementMainForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | btnBackView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowback.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果改住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new HdlBackup.HdlBackupListForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | btnAbountView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowAbount.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果改住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Abount.AbountForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
| | | /// </summary>
|
| | | public const int uEditorSceneNameFail = 16087;
|
| | | /// <summary>
|
| | | /// 门锁报警信息8:常开模式开启(网关触发)
|
| | | /// 门锁报警信息9:常开模式开启(网关触发)
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg9 = 16088;
|
| | | /// <summary>
|
| | | /// 门锁报警信息8:常开模式结束(网关触发)
|
| | | /// 门锁报警信息10:常开模式结束(网关触发)
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg10 = 16089;
|
| | | /// <summary>
|
| | |
| | | /// 请先阅读并同意《隐私权政策》和《服务条款》
|
| | | /// </summary>
|
| | | public const int uPleaseReadAndAgreePrivacyPolicyMsg = 16099;
|
| | | /// <summary>
|
| | | /// 门锁报警信息11:常开模式开启(自动化触发)
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg11 = 16100;
|
| | | /// <summary>
|
| | | /// 门锁报警信息12:常开模式结束(自动化触发)
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg12 = 16101;
|
| | | /// <summary>
|
| | | /// 门锁报警信息13:临时密码开锁成功
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg13 = 16102;
|
| | | /// <summary>
|
| | | /// 门锁报警信息14:临时密码开锁失败
|
| | | /// </summary> |
| | | public const int uDoorLockAlarmMsg14 = 16103;
|
| | |
|
| | |
|
| | | //★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
|
| | | /// <summary>
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\Logic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ApkInfoOBJ.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\AuthUserRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\FirmwareManaRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\GetAppVersionCode.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResultPack.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\UserLoginLocalRegionRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Pad\MainPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\AddOrEditorSceneForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\AdjustTargetAddDelayTimeForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\AdjustTargetAddDeviceForm.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Controls\PhoneEmailSelectControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneEmailForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneZone.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\AC\ACControlBase.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectFloor.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectHouse.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceAcDetailCardMethord.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectFloorForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectHouseForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonEnum.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonFormResouce.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CompleteButton.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceIconSelectedIMGByLocal.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\DeviceInfoRow.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\FunctionIconButton.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectTime.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectZone.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\TopFrameLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\DeviceLogic\ReadDeviceAttributeLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\AddLogicPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\AddScenePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\CustomText.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceFunctionUnallocatedControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceSelectUnallocatedControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\SelectLocalDeviceImageForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\DeviceDetailInfoForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\UnallocatedRoomForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\Base\DeviceCardCommon.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLogin.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLoginByCode.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\CommonPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\BackupInfoRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\FolderRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\GatewayRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\GetAreaCode.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResidenceRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResponsePack.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\UserLoginRes.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\UserRegisterReqDto.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\SendDataToServer.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\Room.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ListRoomViewFrom.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Safety\SafetyManagementMainForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\FrameLayoutControls\FrameRowControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\SceneUI.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\SceneTargetDeviceUI.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\SceneRoomUI.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Common\Application.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Common\BigInteger.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Common\CloudMqttResponsePack.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlAlarmsLogic.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Pad\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Pad\Home\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Phone\CommonForm\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\Base\" />
|
| | | </ItemGroup>
|