| | |
| | | using HDL_ON.UI.Music; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | using HDL_ON.Stan; |
| | | using ZXing.QrCode.Internal; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | | public class VideoMainView : FrameLayout |
| | | { |
| | | |
| | | List<Video> ximoVideoList = new List<Video>(); |
| | | |
| | | List<Video> xiMoVideoList = new List<Video>(); |
| | | |
| | | /// <summary> |
| | | /// 加载可视对讲UI |
| | |
| | | /// <param name="videoList">可视对讲列表</param> |
| | | public void Show(List<CallView> listCall, List<Video> videoList) |
| | | { |
| | | ximoVideoList = videoList.FindAll((obj) => obj.spk == "door.gate"); |
| | | |
| | | xiMoVideoList = videoList.FindAll((obj) => obj.spk == "door.gate"); |
| | | #region 布局界面 |
| | | this.BackgroundColor = MusicColor.ViewColor; |
| | | var topView = new TopView(); |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | topView.topNameBtn.TextID = StringId.keshiduijiang; |
| | | |
| | | |
| | | var pageView = new PageLayout() |
| | | { |
| | |
| | | var view1 = new FrameLayout(); |
| | | pageView.AddChidren(view1); |
| | | var view2 = new FrameLayout(); |
| | | pageView.AddChidren(view2); |
| | | if (!Entity.DB_ResidenceData.Instance.SupportFVDevice) {//非全视通展示通话记录 |
| | | pageView.AddChidren(view2); |
| | | } |
| | | View1(view1, videoList); |
| | | View2(view2, listCall, videoList); |
| | | Button btn11 = new Button |
| | |
| | | BackgroundColor = MusicColor.SelectedColor, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view1.AddChidren(btn11); |
| | | //view1.AddChidren(btn11); |
| | | |
| | | Button btn12 = new Button |
| | | { |
| | |
| | | BackgroundColor = 0x404484F4, |
| | | Radius = (uint)Application.GetRealHeight(4), |
| | | }; |
| | | view1.AddChidren(btn12); |
| | | //view1.AddChidren(btn12); |
| | | if (!Entity.DB_ResidenceData.Instance.SupportFVDevice) |
| | | {//非全视通展示下方选择按钮 |
| | | view1.AddChidren(btn11); |
| | | view1.AddChidren(btn12); |
| | | } |
| | | |
| | | Button btn21 = new Button |
| | | { |
| | | X = Application.GetRealWidth(170), |
| | |
| | | if (bol) |
| | | { |
| | | //门禁二维码固定有的,虚拟一个出来 |
| | | videoList.Add(new Video { deviceName = Language.StringByID(StringId.menjinerweima), interphoneType = "100",devType = "100" }); |
| | | videoList.Add(new Video { deviceName = Language.StringByID(StringId.menjinerweima), interphoneType = "100" ,devType = "100" }); |
| | | } |
| | | if (ximoVideoList.Count > 0) |
| | | if (xiMoVideoList.Count > 0) |
| | | { |
| | | //徘徊报警 |
| | | videoList.Add(new Video { deviceName = Language.StringByID(StringId.WanderingAlarm), interphoneType = "222", devType = "222" }); |
| | | |
| | | |
| | | } |
| | | //数组个数 |
| | | //int value = 15; |
| | |
| | | }; |
| | | vv.AddChidren(fL); |
| | | int line = 0; |
| | | |
| | | |
| | | #endregion |
| | | for (int i = 1, j = 0; i <= videoList.Count; i++, j++) |
| | | { |
| | | var video = videoList[i - 1]; |
| | | |
| | | #region |
| | | var fLayout = new FrameLayout |
| | | { |
| | |
| | | UnSelectedImagePath = "VideoIcon/weiqiangji.png", |
| | | }; |
| | | fLayout.AddChidren(iconBtn); |
| | | |
| | | |
| | | var deviceNameBtn = new Button |
| | | { |
| | |
| | | //门口机的点击事件 |
| | | clickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (video.devType == "VisitorQrCode") |
| | | { |
| | | |
| | | return; |
| | | } |
| | | else if (video.devType == "FaceManagement") |
| | | { |
| | | |
| | | return; |
| | | } |
| | | |
| | | var video2 = clickBtn.Tag as Video; |
| | | if (video2.devType == "100") |
| | | { |
| | | ChooseVideoShowQRCode(); |
| | | |
| | | ////门禁二维码固定有的 |
| | | //VideoSend.GetQRcode(this, video2, (tag, paw) => |
| | | //{ |
| | | // if (tag) |
| | | // { |
| | | // //注意:密码有可能延时1分钟生效 |
| | | // View.ShowDialog showDialog = new View.ShowDialog(); |
| | | // showDialog.QRcode(paw); |
| | | // } |
| | | //}); |
| | | } |
| | | else if(video2.devType == "222") |
| | | else if (video2.devType == "222") |
| | | { |
| | | ChooseAlarmShow(); |
| | | |
| | |
| | | Lc_Psk = video.deviceId,//2021-10-15 PSK字段不能取deviceName |
| | | Lc_PlayToken = video.playToken, |
| | | deviceSipAccount = video.deviceSipAccount, |
| | | HomeId = video.homeId |
| | | HomeId = video.homeId, |
| | | deviceCode=video.deviceCode |
| | | }; |
| | | |
| | | ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo, video.interphoneType); |
| | | } |
| | | }; |
| | |
| | | for (int i = 0; i < videoList.Count; i++) |
| | | { |
| | | var _video = videoList[i]; |
| | | if (_video.interphoneType == "FLVI"|| _video.spk == "door.gate") |
| | | { |
| | | if (_video.interphoneType == "FLVI" || _video.spk == "door.gate") |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | return bol; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取门禁二维码 |
| | |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(280), |
| | | Height = Application.GetRealHeight(200), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | |
| | | |
| | | // if (v.spk == "door.gate") |
| | | // { |
| | | |
| | | |
| | | // return; |
| | | // } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择徘徊报警列表显示 |
| | | /// </summary> |
| | | public void ChooseAlarmShow() |
| | | { |
| | | if (ximoVideoList.Count == 1) |
| | | if (xiMoVideoList.Count == 1) |
| | | { |
| | | var wanderingAlarmPage = new WanderingAlarmPage(ximoVideoList[0].deviceId); |
| | | var wanderingAlarmPage = new WanderingAlarmPage(xiMoVideoList[0].deviceId); |
| | | MainPage.BasePageView.AddChidren(wanderingAlarmPage); |
| | | wanderingAlarmPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | contentView.AddChidren(listView); |
| | | |
| | | |
| | | foreach (var v in ximoVideoList) |
| | | foreach (var v in xiMoVideoList) |
| | | { |
| | | Button btnMsg = new Button() |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 门禁二维码数据 |
| | | /// </summary> |
| | | public class AccessControlQRode |
| | | { |
| | | public string title = string.Empty; |