| | |
| | | btnShortCut.UnSelectedImagePath = "Safeguard/SafetyShortcut.png";
|
| | | btnShortCut.SelectedImagePath = "Safeguard/SafetyShortcutSelected.png";
|
| | |
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2)
|
| | | {
|
| | | //快捷方式向左移动
|
| | | btnShortCut.X = Application.GetRealWidth(855);
|
| | |
| | |
|
| | | topFrameLayout.AddChidren(btnShortCut);
|
| | | btnShortCut.InitControl();
|
| | | if (UserCenterResourse.ResidenceOption.SafetyShortcut == true)
|
| | | if (HdlUserCenterResourse.ResidenceOption.SafetyShortcut == true)
|
| | | {
|
| | | //使用快捷方式
|
| | | btnShortCut.IsSelected = true;
|
| | |
| | | //确定取消主页的「安防」捷径?
|
| | | this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCancelSafetyShortcutMsg), () =>
|
| | | {
|
| | | UserCenterResourse.ResidenceOption.SafetyShortcut = false;
|
| | | UserCenterResourse.ResidenceOption.Save();
|
| | | HdlUserCenterResourse.ResidenceOption.SafetyShortcut = false;
|
| | | HdlUserCenterResourse.ResidenceOption.Save();
|
| | | btnShortCut.IsSelected = false;
|
| | | //取消主页的「安防」捷径的话,主页需要重新刷新
|
| | | UserView.UserPage.Instance.RefreshAllForm = true;
|
| | |
| | | //确定创建「安防」捷径到主页?
|
| | | this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCreatSafetyShortcutMsg), () =>
|
| | | {
|
| | | UserCenterResourse.ResidenceOption.SafetyShortcut = true;
|
| | | UserCenterResourse.ResidenceOption.Save();
|
| | | HdlUserCenterResourse.ResidenceOption.SafetyShortcut = true;
|
| | | HdlUserCenterResourse.ResidenceOption.Save();
|
| | | btnShortCut.IsSelected = true;
|
| | | //创建主页的「安防」捷径的话,主页需要重新刷新
|
| | | UserView.UserPage.Instance.RefreshAllForm = true;
|
| | |
| | | this.AddSensorStatuRow(listView, zoneId, Info);
|
| | |
|
| | | //收集传感器
|
| | | var tempDevice = Common.LocalDevice.Current.GetDevice(Info.MacAddr, Info.Epoint);
|
| | | var tempDevice = HdlDeviceCommonLogic.Current.GetDevice(Info.MacAddr, Info.Epoint);
|
| | | if (tempDevice != null)
|
| | | {
|
| | | listDevice.Add(tempDevice);
|
| | |
| | | /// <param name="sensorInfo">传感器的信息</param>
|
| | | private void AddSensorStatuRow(VerticalFrameControl listView, int zoneID, Safeguard.ZoneDeviceListData sensorInfo)
|
| | | {
|
| | | CommonDevice device = Common.LocalDevice.Current.GetDevice(sensorInfo.MacAddr, sensorInfo.Epoint);
|
| | | CommonDevice device = HdlDeviceCommonLogic.Current.GetDevice(sensorInfo.MacAddr, sensorInfo.Epoint);
|
| | | if (device == null)
|
| | | {
|
| | | return;
|
| | |
| | | //添加阴影特效
|
| | | frameDevice.SetViewShadow(true);
|
| | |
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | this.dicSensorStatuView[mainkeys] = frameDevice;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | //传感器状态
|
| | | string mainkey = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainkey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (this.dicSensorStatuView.ContainsKey(mainkey) == false)
|
| | | {
|
| | | return;
|
| | |
| | | //界面关闭
|
| | | return;
|
| | | }
|
| | | var deviceInfo = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(device);
|
| | | var deviceInfo = HdlDeviceCommonLogic.Current.ReadDeviceEpointDeviceInfo(device);
|
| | | if (deviceInfo != null)
|
| | | {
|
| | | //设置设备在线状态
|
| | |
| | | //界面关闭
|
| | | return;
|
| | | }
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (this.dicSensorStatuView.ContainsKey(mainkeys) == true)
|
| | | {
|
| | | CommonDevice Loacldevice = Common.LocalDevice.Current.GetDevice(mainkeys);
|
| | | CommonDevice Loacldevice = HdlDeviceCommonLogic.Current.GetDevice(mainkeys);
|
| | | if (Loacldevice == null)
|
| | | {
|
| | | return;
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //设置控件的在线状态文本效果
|
| | | bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
|
| | | bool bolOnline = HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(device);
|
| | | control?.SetOnlineStatu(bolOnline);
|
| | | });
|
| | | }
|
| | |
| | | var info = HdlAlarmsLogic.Current.listSafetyAlarmInfo[0];
|
| | | if (device != null)
|
| | | {
|
| | | string mainkey1 = Common.LocalDevice.Current.GetDeviceMainKeys(info.DeviceAddr, info.DeviceEpoint);
|
| | | string mainkey2 = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainkey1 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(info.DeviceAddr, info.DeviceEpoint);
|
| | | string mainkey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (mainkey1 != mainkey2)
|
| | | {
|
| | | //不是同一个东西
|