| | |
| | | public string currentUserDisplayMethod = string.Empty;//当前用户显示方式 |
| | | //本地所有账户列表 |
| | | public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; |
| | | /// <summary> |
| | | /// 是否常开模式[当数据获取失败,返回空] |
| | | /// </summary> |
| | | public Dictionary<string, bool> IsDoorLockNormallyMode = new Dictionary<string, bool> { };//是否冻结子账户 |
| | | public string LocalTempPassword = string.Empty;//本地生成的临时密码 |
| | | public Dictionary<string, bool> IsFreezeAccount = new Dictionary<string, bool> { };//是否冻结子账户 |
| | | public Dictionary<string, bool> HasRemoteUnlockAccess = new Dictionary<string, bool> { };//是否给子账户拥有远程开锁的条件 |
| | |
| | | /// <summary> |
| | | /// 矫正门锁时间 |
| | | /// </summary> |
| | | /// <returns>The writable value async.</returns> |
| | | /// <param name="timestamp">矫正门锁的时间</param> |
| | | /// <param name="timestamp"></param> |
| | | /// <returns></returns> |
| | | public async System.Threading.Tasks.Task<SetWritableValueResponAllData> RectifyDoorLockTimeAsync(int timestamp) |
| | | { |
| | | if (Gateway == null) |
| | |
| | | var tempD = new DefaultControlResponseData(); |
| | | tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString(); |
| | | tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); |
| | | result = new DefaultControlResponseAllData { defaultControlResponseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0450_{ topic}"); |
| | | if (tempD.command == "0450") |
| | | { |
| | | result = new DefaultControlResponseAllData { defaultControlResponseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0450_{ topic}"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | var tempD = new RemoteResponseData(); |
| | | tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString(); |
| | | tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); |
| | | result = new RemoteResponseAllData { responseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0462_{ topic}"); |
| | | if (tempD.command == "0462") |
| | | { |
| | | result = new RemoteResponseAllData { responseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0462_{ topic}"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | var tempD = new TempPasswordResponseData(); |
| | | tempD.command = data[12].ToString() + data[13].ToString() + data[10].ToString() + data[11].ToString(); |
| | | tempD.status = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16); |
| | | result = new TempPasswordResponseAllData { responseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0463_{ topic}"); |
| | | if (tempD.command == "0463") |
| | | { |
| | | result = new TempPasswordResponseAllData { responseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0463_{ topic}"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | var tempD = new VolumeResponseData(); |
| | | tempD.command = data[10].ToString() + data[11].ToString(); |
| | | tempD.value = Convert.ToInt32(data[13].ToString(), 16); |
| | | tempD.value = Convert.ToInt32(data[12].ToString() + data[13].ToString(), 16); |
| | | result = new VolumeResponseAllData { volumeResponseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0456_{ topic}"); |
| | | } |
| | |
| | | ///<summary > |
| | | ///音量 |
| | | ///<para>命令值: comandValue</para> |
| | | ///<para>comandValue: 0 静音</para> |
| | | ///<para>comandValue:1 最小音量</para> |
| | | ///<para>comandValue:2~13 音量 </para> |
| | | ///<para>comandValue:14 最大音量</para> |
| | | ///<para>comandValue: 0-0x64 音量</para> |
| | | /// </summary> |
| | | public async System.Threading.Tasks.Task<DefaultControlResponseAllData> SetVolumeAsync(int comandValue) |
| | | { |
| | |
| | | if (tempD.command == "0455") |
| | | { |
| | | result = new DefaultControlResponseAllData { defaultControlResponseData = tempD }; |
| | | DebugPrintLog($"UI收到通知后的主题_command:0456_{ topic}"); |
| | | DebugPrintLog($"UI收到通知后的主题_command:0455_{ topic}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | /// <summary> |
| | | /// 音量发送数据 |
| | | ///<para>comandValue: 0 静音</para> |
| | | ///<para>comandValue:1 最小音量</para> |
| | | ///<para>comandValue:2~13 音量 </para> |
| | | ///<para>comandValue:14 最大音量</para> |
| | | ///<para>comandValue: 0-100 音量</para> |
| | | /// </summary> |
| | | public string VolumeData(int comandValue) |
| | | { |
| | |
| | | { |
| | | if (comandValue >= 1) |
| | | { |
| | | //comandValue = comandValue * 100; |
| | | //float v = (float)100 / 15; |
| | | //int vv = Convert.ToInt32(v * 100); |
| | | //var comandValueTemp = comandValue / vv; |
| | | //if (comandValueTemp == 0) |
| | | //{ |
| | | // comandValueTemp = 1; |
| | | //} |
| | | cValue = Convert.ToString(comandValue, 16).ToUpper(); |
| | | cValue = "F" + cValue; |
| | | if (cValue.Length == 1) |
| | | { |
| | | cValue = "0" + cValue; |
| | | } |
| | | else |
| | | { |
| | | cValue = cValue; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |