Exemple #1
0
    public void SaverCardRoleData(Tag data, Action action = null)
    {
        bool IsSuccessful = CommunicationObject.Instance.EditTag(data);

        if (IsSuccessful)
        {
            UGUIMessageBox.Show("定位卡信息已保存!", "确定", null,
                                () =>
            {
                EditPosCardInfo();
                //LocationCardManagement.Instance.ShowLocationCardManagementWindow();
                //LocationCardManagement.Instance.GetLocationCardManagementData();
                //ClosePosCardEditWindow();
            }
                                , null, null);
        }
        else
        {
            UGUIMessageBox.Show("数据保存失败!", "确定", null, null, null, null);
        }

        if (action != null)
        {
            action();
        }
    }
Exemple #2
0
    /// <summary>
    /// 显示界面
    /// </summary>
    /// <param name="kksCode"></param>
    public void Show(DevInfo devInfo)
    {
        string kksCode = devInfo.KKSCode;

        if (string.IsNullOrEmpty(kksCode))
        {
            UGUIMessageBox.Show("KKS编码为空,请录入设备KKS编码!");
            return;
        }
        //kksCode = "J0GCQ41";
        recordTime = DateTime.Now;
        Dev_Monitor monitorInfo = null;

#if UNITY_EDITOR
        monitorInfo = InitTestMonitor();
        Debug.LogError("Unity.Editor.启用测试数据");
#else
        monitorInfo = CommunicationObject.Instance.GetDevMonitor(kksCode);
#endif
        Debug.LogErrorFormat("GetDevMonitor,costTime:{0} s", (DateTime.Now - recordTime).TotalSeconds);
        recordTime = DateTime.Now;
        if (monitorInfo == null)
        {
            UGUIMessageBox.Show("设备监控数据为空...");
            return;
        }
        Bg.SetActive(true);
        TitleText.text = string.Format("{0}监控信息", devInfo.Name);
        MainInfo.InitMainDevInfo(monitorInfo.MonitorNodeList); //1.设备本身监控信息
        DevSubSystem.InitDevSubSystem(monitorInfo.ChildrenList);
        Debug.LogErrorFormat("InitDevSubSystem,costTime:{0} s", (DateTime.Now - recordTime).TotalSeconds);
        recordTime = DateTime.Now;
    }
 public void SaverCardRoleData()
 {
     EditCardRole.Name        = InputName.text;
     EditCardRole.Description = InputDetail.text;
     if (string.IsNullOrEmpty(InputDetail.text) || string.IsNullOrEmpty(InputName.text))
     {
         UGUIMessageBox.Show("角色缺少必填信息,请补充完整在进行提交!", "确定", "", null, null, null);
     }
     else
     {
         bool IsSuccessful = CommunicationObject.Instance.EditCardRole(EditCardRole);
         if (IsSuccessful)
         {
             UGUIMessageBox.Show("新建角色成功!", "确定", "", () =>
             {
                 CloseEditPersonnelRoleWindow();
                 CloseCurrentWindowAndShowOtherWindow();
             }, null, null);
         }
         else
         {
             UGUIMessageBox.Show("数据保存失败!", "确定", "", null, null, null);
         }
     }
 }
    /// <summary>
    /// 显示视屏监控
    /// </summary>
    /// <param name="camGuid"></param>
    public void ShowVideo(string camGuid)
    {
        //#if UNITY_EDITOR
        //        camGuid = "0167b420-0b29-41ff-be49-e2d45a6fb67b";
        //#endif

        if (string.IsNullOrEmpty(camGuid))
        {
            UGUIMessageBox.Show("视屏参数未设置,请配置参数!");
            return;
        }
        string Ip           = SystemSettingHelper.honeyWellSetting.Ip;
        string userName     = SystemSettingHelper.honeyWellSetting.UserName;
        string passWord     = SystemSettingHelper.honeyWellSetting.PassWord;
        string cameraGuid   = camGuid;
        string argsTransfer = string.Format("{0}|{1}|{2}|{3}", Ip, userName, passWord, cameraGuid);

        if (!IsSDKInit)
        {
            CreateNewProcess(argsTransfer);
        }
        else
        {
            StartProcess(argsTransfer);
        }
    }
Exemple #5
0
 public void ShowTreeInfo(bool b)
 {
     if (b)
     {
         if (RolePermissionsTreeView.Instance.IsSure)
         {
             UGUIMessageBox.Show("角色权限信息有更改尚未保存,切换角色前是否保存?", "保存", "不保存",
                                 () =>
             {
                 SaveAreaPermissionData();
             },
                                 () =>
             {
                 RolePermissionsTreeView.Instance.GetRolePermissionsTree();
                 RolePermissionsTreeView.Instance.GetAreaData(CurrentId);
                 RoleNameList.Instance.PreviousID = CurrentId;
             }, null);
         }
         else
         {
             RolePermissionsTreeView.Instance.GetRolePermissionsTree();
             RolePermissionsTreeView.Instance.GetAreaData(CurrentId);
             RoleNameList.Instance.PreviousID = CurrentId;
         }
     }
 }
Exemple #6
0
    // public Button CancelAllWindow;

    void Start()
    {
        CloseAddRole.onClick.AddListener(() =>
        {
            if (RolePermissionsTreeView.Instance.IsSure)
            {
                UGUIMessageBox.Show("角色权限信息有更改尚未保存,确定放弃保存直接退出吗?", "保存并退出", "直接退出",
                                    () =>
                {
                    SaveCurrentData(CurrentId);
                }, () =>
                {
                    CloseCurrentUIAndOpenPreviousUI();
                }, () =>
                {
                    CloseCurrentUIAndOpenPreviousUI();
                });
            }
            else
            {
                CloseCurrentUIAndOpenPreviousUI();
            }
        });
        SaveWindow.onClick.RemoveAllListeners();
        SaveWindow.onClick.AddListener(() =>
        {
            SaveWindow_Click();
        });
    }
Exemple #7
0
 /// <summary>
 /// 显示视屏(通过Rtsp地址)
 /// </summary>
 /// <param name="rtspUrl"></param>
 public void ShowVideo(string rtspUrl, DevInfo devInfo)
 {
     if (window)
     {
         window.SetActive(true);
     }
     if (connectBg)
     {
         connectBg.SetActive(true);
     }
     tempDevInfo = devInfo;
     if (string.IsNullOrEmpty(rtspUrl))
     {
         Debug.LogError("Error : RtspVideo.ShowVideo-> rtspURL is null!");
         UGUIMessageBox.Show("Rtsp地址未输入,是否启用霍尼韦尔视频?", "确定", "取消", ShowHoneyWellVideo, Close, Close);
         return;
     }
     if (player)
     {
         if (player.IsPlaying)
         {
             player.Stop();
         }
         player.Path = rtspUrl;
         player.Play();
     }
     else
     {
         Debug.LogError("Error : RtspVideo.ShowVideo-> UniversalMediaPlayer is null!");
     }
 }
Exemple #8
0
 void Start()
 {
     CloseBut.onClick.RemoveAllListeners();
     CloseBut.onClick.AddListener(() =>
     {
         if (AddRolePermissionsTreeView.Instance.IsAddSure)
         {
             UGUIMessageBox.Show("角色权限信息有更改尚未保存,确定放弃保存直接退出吗?", "保存并退出", "直接退出",
                                 () =>
             {
                 SaveAreaPermissionData();
             },
                                 () =>
             {
                 AddPosCard.Instance.ShowAddPosCardWindow();
                 AddPerCardPermission.Instance.CloseRoleWindow();
             },
                                 () =>
             {
                 AddPosCard.Instance.ShowAddPosCardWindow();
                 AddPerCardPermission.Instance.CloseRoleWindow();
             });
         }
         else
         {
             AddPosCard.Instance.ShowAddPosCardWindow();
             AddPerCardPermission.Instance.CloseRoleWindow();
         }
     });
     SureBut.onClick.RemoveAllListeners();
     SureBut.onClick.AddListener(() =>
     {
         SaveAreaPermissionData_Click();
     });
 }
 public void SaveJobEditData(Post post)
 {
     UGUIMessageBox.Show("删除岗位信息!",
                         () =>
     {
         CommunicationObject.Instance.AddPost(post);
     }, null);
 }
Exemple #10
0
    public void JudgePerOnLine(int tagNum, LocationAlarm per)
    {
        List <LocationObject> listT           = LocationManager.Instance.GetPersonObjects();
        LocationObject        locationObjectT = listT.Find((item) => item.personnel.TagId == tagNum);

        if (per.Tag == null || locationObjectT == null || per.Tag.IsActive == false)
        {
            UGUIMessageBox.Show("当前人员已离线或者不在监控区域!");
        }
    }
 /// <summary>
 /// 退出当前程序
 /// </summary>
 private void ExitApplication()
 {
     UGUIMessageBox.Show("是否确定退出软件?", () =>
     {
         Log.Info("FVIntroduce.Application.Quit->退出程序");
         Application.Quit();
     }, () =>
     {
     });
     //Application.Quit();
 }
    public void GetCameraAlarmData(AlarmPushInfo cameraAlarm)
    {
        if (string.IsNullOrEmpty(cameraAlarm.CameraAlarmInfor.cid_url))
        {
            CameraAlarmInfo aa = cameraAlarm.CameraAlarmInfor;
        }

        string devName = null;

        CurrentAlarmPushInfo = new global::AlarmPushInfo();
        CurrentAlarmPushInfo = cameraAlarm;
        if (cameraAlarm.CameraAlarmInfor.AlarmType == 1)
        {
            AlarmTypeImage.sprite = Safety;
            message.text          = "没戴安全帽!";
        }
        else if (cameraAlarm.CameraAlarmInfor.AlarmType == 2)
        {
            AlarmTypeImage.sprite = Fire;
            message.text          = "火警";
        }
        else if (cameraAlarm.CameraAlarmInfor.AlarmType == 3)
        {
            AlarmTypeImage.sprite = smogInfo;
            message.text          = "烟雾";
        }
        cid.text = cameraAlarm.CameraAlarmInfor.cid.ToString();
        Button but = AlarmObj.transform.GetComponent <Button>();

        but.onClick.RemoveAllListeners();
        but.onClick.AddListener(() =>
        {
            if (ScreenFlashesRedAndAudio.Instance != null)
            {
                ScreenFlashesRedAndAudio.Instance.FlashesRedTweenerStop_Click();
            }
            int?DevID = CommunicationObject.Instance.GetCameraDevIdByURL(cameraAlarm.CameraAlarmInfor.cid_url);
            if (DevID == null)
            {
                UGUIMessageBox.Show("视频ID未找到,URL:" + cameraAlarm.CameraAlarmInfor.cid_url);
                Log.Error("Dev.ParentId is null...");
                return;
            }

            DevInfo Dev = GetDevInfoByid((int)DevID);
            if (Dev == null)
            {
                Debug.LogError("Dev is null...");
                return;
            }
            LocationDev(DevID.ToString(), (int)Dev.ParentId, devName, cameraAlarm);
        });
    }