void OnStateDataChanged(UIStateData stateData)
        {
            if (m_CurrentActiveDialog != stateData.activeDialog)
            {
                m_FiltersDialog.Close();
                m_OrbitSelectDialog.Close();
                m_ClippingToolDialog.Close();
                m_MeasureToolDialog.Close();
                m_CameraOptionsDialog.Close();
                m_SceneOptionsDialog.Close();
                m_SunStudyDialog.Close();
                m_SequenceDialog.Close();
                m_LandingScreenDialog.Close();
                m_NavigationModeFanOut.Close();
                m_StatsInfoDialog.Close();

                switch (stateData.activeDialog)
                {
                case DialogType.None:
                    break;

                case DialogType.Projects:
                    // TODO remove this type and ProjectsUIController class
                    // m_ProjectsDialog.Open();
                    break;

                case DialogType.Filters:
                    m_FiltersDialog.Open();
                    break;

                case DialogType.OrbitSelect:
                    m_OrbitSelectDialog.Open();
                    break;

                case DialogType.ClippingTool:
                    m_ClippingToolDialog.Open();
                    break;

                case DialogType.MeasureTool:
                    m_MeasureToolDialog.Open();
                    break;

                case DialogType.CameraOptions:
                    m_CameraOptionsDialog.Open();
                    break;

                case DialogType.SceneOptions:
                    m_SceneOptionsDialog.Open();
                    break;

                case DialogType.SunStudy:
                    m_SunStudyDialog.Open();
                    break;

                case DialogType.Sequence:
                    m_SequenceDialog.Open();
                    break;

                case DialogType.SelectTool:
                    // TODO
                    break;

                case DialogType.LandingScreen:
                    m_LandingScreenDialog.Open();
                    break;

                case DialogType.NavigationMode:
                    m_NavigationModeFanOut.Open();
                    break;

                case DialogType.StatsInfo:
                    m_StatsInfoDialog.Open();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }

                m_CurrentActiveDialog = stateData.activeDialog;
            }

            if (m_CurrentSubDialog != stateData.activeSubDialog)
            {
                m_NavigationModeFanOut.Close();
                m_BimDialog.Close();
                m_AccountDialog.Close();
                switch (stateData.activeSubDialog)
                {
                case DialogType.BimInfo:
                    m_BimDialog.Open();
                    break;

                case DialogType.Account:
                    m_AccountDialog.Open();
                    break;
                }

                m_CurrentSubDialog = stateData.activeSubDialog;
            }

            if (m_CurrentActiveOptionDialog != stateData.activeOptionDialog)
            {
                switch (stateData.activeOptionDialog)
                {
                case OptionDialogType.None:
                    break;

                case OptionDialogType.ProjectOptions:
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
                m_CurrentActiveOptionDialog = stateData.activeOptionDialog;
            }

            if (stateData.statusMessage != String.Empty)
            {
                m_StatusDialog.Open();
            }
            else
            {
                m_StatusDialog.Close();
            }

            if (m_CurrentProgressData != stateData.progressData)
            {
                if (stateData.progressData.progressState == ProgressData.ProgressState.NoPendingRequest)
                {
                    m_ProgressIndicatorDialog.Close();
                }
                else
                {
                    m_ProgressIndicatorDialog.Open(true);
                }

                m_CurrentProgressData = stateData.progressData;
            }
        }
Example #2
0
        void OnStateDataChanged(UIStateData stateData)
        {
            if (m_CurrentActiveDialog != stateData.activeDialog)
            {
                m_CurrentActiveDialog = stateData.activeDialog;

                m_FiltersDialog.Close();
                m_OrbitSelectDialog.Close();
                m_ClippingToolDialog.Close();
                m_CameraOptionsDialog.Close();
                m_SceneOptionsDialog.Close();
                m_SunStudyDialog.Close();
                m_SequenceDialog.Close();
                m_LandingScreenDialog.Close();
                m_NavigationModeFanOut.Close();
                m_NavigationGizmoModeFanOut.Close();
                m_StatsInfoDialog.Close();
                m_InfoSelectDialog.Close();
                m_DebugOptionsDialog.Close();
                m_ARCardSelectionDialog.Close();
                m_CollaborationUserListDialog.Close();
                m_CollaborationUserInfoDialog.Close();
                m_LoginScreenDialog.Close();

                if (stateData.dialogMode == DialogMode.Help)
                {
                    m_HelpDialogController.Display(m_CurrentActiveDialog);
                    return;
                }

                switch (stateData.activeDialog)
                {
                case DialogType.None:
                    break;

                case DialogType.Projects:
                    // TODO remove this type and ProjectsUIController class
                    // m_ProjectsDialog.Open();
                    break;

                case DialogType.Filters:
                    m_FiltersDialog.Open();
                    break;

                case DialogType.OrbitSelect:
                    m_OrbitSelectDialog.Open();
                    break;

                case DialogType.ClippingTool:
                    m_ClippingToolDialog.Open();
                    break;

                case DialogType.CameraOptions:
                    m_CameraOptionsDialog.Open();
                    break;

                case DialogType.SceneOptions:
                    m_SceneOptionsDialog.Open();
                    break;

                case DialogType.SunStudy:
                    m_SunStudyDialog.Open();
                    break;

                case DialogType.Sequence:
                    m_SequenceDialog.Open();
                    break;

                case DialogType.SelectTool:
                    // TODO
                    break;

                case DialogType.LandingScreen:
                    m_LandingScreenDialog.Open();
                    break;

                case DialogType.NavigationMode:
                    m_NavigationModeFanOut.Open();
                    break;

                case DialogType.GizmoMode:
                    m_NavigationGizmoModeFanOut.Open();
                    break;

                case DialogType.StatsInfo:
                    m_StatsInfoDialog.Open();
                    break;

                case DialogType.InfoSelect:
                    m_InfoSelectDialog.Open();
                    break;

                case DialogType.DebugOptions:
                    m_DebugOptionsDialog.Open();
                    break;

                case DialogType.ARCardSelection:
                    m_ARCardSelectionDialog.Open();
                    break;

                case DialogType.CollaborationUserList:
                    m_CollaborationUserListDialog.Open();
                    break;

                case DialogType.CollaborationUserInfo:
                    m_CollaborationUserInfoDialog.Open();
                    break;

                case DialogType.LoginScreen:
                    m_LoginScreenDialog.Open();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            if (m_CurrentSubDialog != stateData.activeSubDialog)
            {
                m_CurrentSubDialog = stateData.activeSubDialog;

                m_NavigationModeFanOut.Close();
                m_BimDialog.Close();
                m_AccountDialog.Close();
                m_LinkSharingDialog.Close();

                if (stateData.dialogMode == DialogMode.Help)
                {
                    m_HelpDialogController.Display(m_CurrentSubDialog);
                    return;
                }

                switch (stateData.activeSubDialog)
                {
                case DialogType.BimInfo:
                    m_BimDialog.Open();
                    break;

                case DialogType.Account:
                    m_AccountDialog.Open();
                    break;

                case DialogType.LinkSharing:
                    m_LinkSharingDialog.Open();
                    break;
                }
            }

            if (m_CurrentActiveOptionDialog != stateData.activeOptionDialog)
            {
                switch (stateData.activeOptionDialog)
                {
                case OptionDialogType.None:
                    break;

                case OptionDialogType.ProjectOptions:
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
                m_CurrentActiveOptionDialog = stateData.activeOptionDialog;
            }

            if (m_CurrentProgressData != stateData.progressData)
            {
                if (stateData.progressData.progressState == ProgressData.ProgressState.NoPendingRequest)
                {
                    m_ProgressIndicatorDialog.Close(true);
                }
                else
                {
                    m_ProgressIndicatorDialog.Open(true);
                }

                m_CurrentProgressData = stateData.progressData;
            }
        }