/// <summary> /// Checks the initialization state of the TargetFinder. /// If the initialization was successful, the recognition can be started. /// </summary> private void CheckInitialization() { TargetFinder.InitState initState = mImageTracker.TargetFinder.GetInitState(); if (initState == TargetFinder.InitState.INIT_SUCCESS) { // notify the event handlers that initialization was successful foreach (ICloudRecoEventHandler cloudRecoEventHandler in mHandlers) { cloudRecoEventHandler.OnInitialized(); } // set colors: mImageTracker.TargetFinder.SetUIScanlineColor(ScanlineColor); mImageTracker.TargetFinder.SetUIPointColor(FeaturePointColor); mCurrentlyInitializing = false; mInitSuccess = true; // init was successfull, start reco: StartCloudReco(); } else if (initState < 0) // there has been an initialization error { // notify the event handlers of the init error foreach (ICloudRecoEventHandler cloudRecoEventHandler in mHandlers) { cloudRecoEventHandler.OnInitError(initState); } mCurrentlyInitializing = false; } }
private void CheckInitialization() { TargetFinder.InitState initState = this.mObjectTracker.TargetFinder.GetInitState(); if (initState == TargetFinder.InitState.INIT_SUCCESS) { using (List <ICloudRecoEventHandler> .Enumerator enumerator = this.mHandlers.GetEnumerator()) { while (enumerator.MoveNext()) { enumerator.Current.OnInitialized(); } } this.mCurrentlyInitializing = false; this.mInitSuccess = true; this.StartCloudReco(); return; } if (initState < TargetFinder.InitState.INIT_DEFAULT) { using (List <ICloudRecoEventHandler> .Enumerator enumerator = this.mHandlers.GetEnumerator()) { while (enumerator.MoveNext()) { enumerator.Current.OnInitError(initState); } } this.mCurrentlyInitializing = false; } }
/// <summary> /// Called if Cloud Reco initialization fails /// </summary> public void OnInitError(TargetFinder.InitState initError) { switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: mustRestartApp = true; errorTitle = "Network Unavailable"; errorMsg = "Please check your Internet connection and try again."; break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: errorTitle = "Service Unavailable"; errorMsg = "Failed to initialize app because the service is not available."; break; } // Prepend the error code in red errorMsg = "<color=red>" + initError.ToString().Replace("_", " ") + "</color>\n\n" + errorMsg; // Remove rich text tags for console logging var errorTextConsole = errorMsg.Replace("<color=red>", "").Replace("</color>", ""); Debug.LogError("OnInitError() - Initialization Error: " + initError + "\n\n" + errorTextConsole); MessageBox.DisplayMessageBox(errorTitle, errorMsg, true, CloseDialog); }
/// <summary> /// visualize initialization errors /// </summary> public void OnInitError(TargetFinder.InitState initError) { // Reset target finder reference mTargetFinder = null; Debug.LogError("Model Reco init error: " + initError.ToString()); ShowErrorMessageInUI(initError.ToString()); }
internal static bool StopCameraIfPossible(out bool objectTrackerWasStopped) { bool flag = false; bool flag2 = false; if (CameraDevice.Instance.IsActive()) { SmartTerrainTracker tracker = TrackerManager.Instance.GetTracker <SmartTerrainTracker>(); TextTracker tracker2 = TrackerManager.Instance.GetTracker <TextTracker>(); if ((tracker == null || !tracker.IsActive) && (tracker2 == null || !tracker2.IsActive)) { bool flag3 = false; ObjectTracker tracker3 = TrackerManager.Instance.GetTracker <ObjectTracker>(); if (tracker3 != null && tracker3.IsActive) { if (tracker3.GetActiveDataSets().Any <DataSet>()) { flag3 = true; } else { TargetFinder.InitState initState = tracker3.TargetFinder.GetInitState(); if (initState == TargetFinder.InitState.INIT_RUNNING || initState == TargetFinder.InitState.INIT_SUCCESS) { flag3 = true; } else if (tracker3.TargetFinder.GetImageTargets().Any <ImageTarget>()) { flag3 = true; } else if (tracker3.ImageTargetBuilder.IsScanning()) { flag3 = true; } else { flag2 = true; } } } if (!flag3) { flag = true; } } } if (flag2) { TrackerManager.Instance.GetTracker <ObjectTracker>().Stop(); } if (flag) { CameraDevice.Instance.Stop(); } objectTrackerWasStopped = flag2; return(flag); }
// <summary> /// visualize initialization errors /// </summary> public void OnInitError(TargetFinder.InitState initError) { switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: Debug.Log("NetWorkError"); break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: Debug.Log("ServerError"); break; } }
/// <summary> /// visualize initialization errors /// </summary> public void OnInitError(TargetFinder.InitState initError) { switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: ErrorMsg.New("Network Unavailable", "Please check your internet connection and try again.", RestartApplication); break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: ErrorMsg.New("Service Unavailable", "Failed to initialize app because the service is not available."); break; } }
public void OnInitError(TargetFinder.InitState initError) { Debug.Log("Cloud Reco init error " + initError.ToString()); switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: Debug.Log("Network unavailable. Please check your internet connection"); break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: Debug.Log("Service unavailable. Failed to initialize."); break; } }
public void OnInitError(TargetFinder.InitState initError) { switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: Debug.Log("Network Unavailable! Failed to initialize CloudReco because the device has no network connection."); break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: Debug.Log("Service Unavailable! Failed to initialize CloudReco because the service is not available."); break; } Debug.Log("Cloud Reco init error " + initError.ToString()); }
/// <summary> /// Called if Cloud Reco initialization fails /// </summary> public void OnInitError(TargetFinder.InitState initError) { Debug.Log("Cloud Reco initialization error: " + initError.ToString()); switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: { m_MustRestartApp = true; ShowError("Network Unavailable", "Please check your internet connection and try again."); break; } case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: ShowError("Service Unavailable", "Failed to initialize app because the service is not available."); break; } }
public void OnInitError(TargetFinder.InitState initError) { switch (initError) { case TargetFinder.InitState.INIT_ERROR_NO_NETWORK_CONNECTION: errorTitle = "Network Unavailble"; errorMsg = "Check internet connection and try again"; break; case TargetFinder.InitState.INIT_ERROR_SERVICE_NOT_AVAILABLE: errorTitle = "Service not availble"; errorMsg = "Failed to initialize beacause service is unavailble"; break; } errorMsg = "<color=red>" + initError.ToString().Replace("_", " ") + "</color>\n\n" + errorMsg; ErrorTxt.text = "Cloud Reco - Update Error: " + initError + "\n\n" + errorMsg; }
private void CheckInitialization() { TargetFinder.InitState initState = this.mImageTracker.TargetFinder.GetInitState(); if (initState == TargetFinder.InitState.INIT_SUCCESS) { foreach (ICloudRecoEventHandler handler in this.mHandlers) { handler.OnInitialized(); } this.mImageTracker.TargetFinder.SetUIScanlineColor(this.ScanlineColor); this.mImageTracker.TargetFinder.SetUIPointColor(this.FeaturePointColor); this.mCurrentlyInitializing = false; this.mInitSuccess = true; this.StartCloudReco(); } else if (initState < TargetFinder.InitState.INIT_DEFAULT) { foreach (ICloudRecoEventHandler handler2 in this.mHandlers) { handler2.OnInitError(initState); } this.mCurrentlyInitializing = false; } }
public void OnInitError(TargetFinder.InitState initError) // si il y a une erreur { }
public void OnInitError(TargetFinder.InitState initError) { //throw new System.NotImplementedException(); controller.ShowPopup(null, "Проблемы запуска AR. Причина: " + initError.ToString(), "Ok"); }
public void OnInitError(TargetFinder.InitState initError) { Debug.Log("Cloud Reco init error " + initError.ToString()); }
public void OnInitError(TargetFinder.InitState initError) { throw new System.NotImplementedException(); }
// Error callback methods implemented in CloudErrorHandler public void OnInitError(TargetFinder.InitState initError) { }