void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (InitializingLabel != null)
            {
                InitializingLabel.Dispose();
                InitializingLabel = null;
            }

            if (InitPrepView != null)
            {
                InitPrepView.Dispose();
                InitPrepView = null;
            }

            if (ProgressBar != null)
            {
                ProgressBar.Dispose();
                ProgressBar = null;
            }

            if (WarningSymbol != null)
            {
                WarningSymbol.Dispose();
                WarningSymbol = null;
            }
        }
Beispiel #2
0
        private void ObserveMeshPrep(RMModel model, MeshPreparationProgress progress)
        {
            // Success
            if (progress.PreparationDidSucceed)
            {
                InitPrepView.InvokeOnMainThread(delegate {
                    InitPrepView.Hidden = true;
                    SetupCamera();
                    EnableAllGestureRecognizers();
                    App.Manager.CurrentModel.MeshPrep -= new MeshPreparationHandler(ObserveMeshPrep);
                    PerformSelector(new Selector("RedrawDetailed"), null, 0.25);
                });
            }

            // Still working
            if (!progress.PreparationDidSucceed && progress.FailException == null)
            {
                ProgressBar.BeginInvokeOnMainThread(delegate {
                    ProgressBar.SetProgress((float)progress.MeshProgress, true);
                });
            }

            // Failure or Cancellation
            if (progress.FailException != null)
            {
                ProgressBar.BeginInvokeOnMainThread(delegate {
                    ProgressBar.Hidden = true;
                });

                WarningSymbol.BeginInvokeOnMainThread(delegate {
                    WarningSymbol.Hidden = false;
                });

                InitializingLabel.BeginInvokeOnMainThread(delegate {
                    InitializingLabel.Text = progress.FailException.Message;
                });
            }
        }