Example #1
0
        void Awake()
        {
            mainWinPtr = FARDll.FindWindow(null, Application.productName);
            //ScreenManger.Instance.SetScreenState();
            screenNum = F3Device.DeviceManager.Instance.AllMonitors.Count;
            Common.AppLog.AddMsg(Common.LogLevel.DEBUG, "UISetting.Awake(): screenNum  当前屏幕数量 " + screenNum);

            //projectionState = liu.GetScreenMode.GetProjectionMode();
            projectionState = Projection.GetScreenMode.GetProjectionMode();
            //Common.AppLog.AddMsg(Common.LogLevel.DEBUG,"UISetting.Awake(): projectionState= " + projectionState);

            if (screenNum > 1 && projectionState != 2)
            {
                //Common.AppLog.AddMsg(Common.LogLevel.DEBUG,"UISetting.Awake(): 开启扩展模式 " + projectionState);

                Common.ScreenHelper.SetProjection(Common.ScreenHelper.SDC_TOPOLOGY_EXTEND);
            }

            uint id = FrameTimerHeap.AddTimer(1000, 2000, OnUpdateJudge);
            //FrameTimerHeap.DelTimer(id);  //删除定时器
            var openFildPath = transform.Find("FieldPath");

            AttributeGetValue();
            SetScreenToggleListener();
            SetOtherListener();

            versionText = transform.Find("Version/PathText").GetComponent <Text>();

            Invoke("DelayCall", 0.2f);

            nonARCameraWarnning     = aRToggle.transform.Find("NonARCameraWarnning").gameObject;
            nonARCameraWarnningText = nonARCameraWarnning.GetComponent <Text>();
            nonARCameraWarnning.SetActive(false);
            UGUIEventListener.Get(aRToggle.gameObject).onClick += ClickARToggle;
        }
Example #2
0
        void DelayCall()
        {
            thisPanelShowState(false);
            //先获取投屏状态
            RecordScreenInfo.SetLocalScreenMode(GlobalConfig.config3DPath);
            //设置toggle的颜色
            //EnableScreenMode(isScreen);
            //开启投屏
            //SetScreenMode();

            if (isScreen && screenNum > 1)
            {
                //在有外接屏幕情况下,默认识别到我司3D大屏自动投屏3D - VR投屏
                IntPtr ptr    = FARDll.FindWindow(null, "ClientWinCpp");
                var    device = F3Device.DeviceManager.Instance.FindHidDevice(ptr);
                if (device != null && device is F3Device.IGraph3Device)
                {
                    canUseVR3D = true;
                    StartCoroutine(ShortcutKeySetVR3D());
                }
                else
                {
                    canUseVR3D = false;
                    StartCoroutine(ShortcutKeySetVR2D());
                }
            }

            versionText.text = GlobalConfig.Instance.versionNO;
            FindObjectOfType <Direct3DWin>().TargetDisplayName = GlobalConfig.Instance.displayName;
        }