old mode 100755
new mode 100644
| | |
| | | //底线
|
| | | btnRow.AddBottomLine();
|
| | |
|
| | | var doorLock = (ZigBee.Device.DoorLock)listNewDevice[0];
|
| | | var doorLock = (ZigBee.Device.DoorLock)listNewDevice[0]; |
| | | ///值为空再去读取本地 |
| | | if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword))
|
| | | { |
| | | ///读取本地远程开锁密码,看看之前是否配置过 |
| | | doorLock.RemoteUnlockPassword = ReadLocalPassword();
|
| | | } |
| | | if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword) == false)
|
| | | {
|
| | | btnswitch.IsSelected = true;
|
| | |
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 保存远程门锁密码 |
| | | /// </summary> |
| | | /// <param name="password">密码</param>
|
| | | public void SaveLocalPassword(string password) {
|
| | | var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(password));
|
| | | IO.FileUtils.WriteFileByBytes(Config.Instance.HomeId + "_" + Config.Instance.Guid, bytes);
|
| | | } |
| | | /// <summary> |
| | | /// 读取远程门锁密码 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string ReadLocalPassword() |
| | | { |
| | | var str = System.Text.Encoding.UTF8.GetString(IO.FileUtils.ReadFile(Config.Instance.HomeId + "_" + Config.Instance.Guid));
|
| | | //Newtonsoft.Json.JsonConvert.DeserializeObject<对像>(str); |
| | | return str; |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ 门锁时间(门锁)_____________________
|