Beispiel #1
0
        public ManualVM(Action succeededAction, Action closeAction, DeviceARRequirementsAccess deviceARRequirementsAccess)
        {
            m_SucceededAction = succeededAction;

            bool needCameraAccess = !deviceARRequirementsAccess.CameraPermissionProvider.HaveCameraPermission();
            bool needInstall      = deviceARRequirementsAccess.ARSupportProvider.NeedInstall.Value;

            int count = (needCameraAccess ? 1 : 0) + (needInstall ? 1 : 0);

            m_ManualPageVMs = new List <ManualPageVM>(count);

            int num = 0;

            if (needCameraAccess)
            {
                ManualPageVM pageVM = new CameraPermissionManualPageVM(num, count,
                                                                       closeAction, GoToNextPage, deviceARRequirementsAccess.CameraPermissionProvider);
                AddDisposable(pageVM);
                m_ManualPageVMs.Add(pageVM);
                num++;
            }

            if (needInstall)
            {
                ManualPageVM pageVM = new InstallARSoftwareManualPageVM(num, count,
                                                                        closeAction, GoToNextPage, deviceARRequirementsAccess.ARSupportProvider);
                AddDisposable(pageVM);
                m_ManualPageVMs.Add(pageVM);
            }
        }
Beispiel #2
0
        private RootAccess(ApplicationConfig applicationConfig)
        {
            AddDisposable(ApplicationModeAccess      = new ApplicationModeAccess(applicationConfig));
            AddDisposable(LessonAccess               = new LessonAccess(applicationConfig.RootFolder));
            AddDisposable(ARLessonAccess             = new ARLessonAccess());
            AddDisposable(DeviceARRequirementsAccess = new DeviceARRequirementsAccess());
            AddDisposable(CameraAccess               = new CameraAccess());

            s_Instance = this;
        }