Beispiel #1
0
        public void ShowCameraUi()
        {
            var glueProject = ProjectManager.GlueProjectSave;

            if (glueProject != null)
            {
                bool shouldShowNewUi = glueProject.DisplaySettings != null;

                if (shouldShowNewUi)
                {
                    if (control == null)
                    {
                        control = new CameraSettingsControl();
                        base.AddToTab(PluginManager.LeftTab, control, "Display Settings");
                    }
                    else
                    {
                        base.AddTab();
                    }

                    respondToViewModelChanges = false;
                    {
                        viewModel.SetFrom(glueProject.DisplaySettings);

                        bool showSupportedOrientationLink =
                            GetIfSupportsOrientation(GlueState.Self.CurrentMainProject) ||
                            GlueState.Self.SyncedProjects.Any(item => GetIfSupportsOrientation(item));

                        if (showSupportedOrientationLink)
                        {
                            viewModel.SupportedOrientationsLinkVisibility = System.Windows.Visibility.Visible;
                        }
                        else
                        {
                            viewModel.SupportedOrientationsLinkVisibility = System.Windows.Visibility.Collapsed;
                        }

                        control.DataContext = viewModel;
                    }
                    respondToViewModelChanges = true;
                }

                else
                {
                    CameraSettingsWindow cameraSettingsWindow = new CameraSettingsWindow();
                    cameraSettingsWindow.ShowDialog();
                }
            }
            else
            {
                GlueGui.ShowMessageBox("You must load or create a project first to set the camera settings.");
            }
        }
Beispiel #2
0
        public void ShowCameraUi()
        {
            var glueProject = ProjectManager.GlueProjectSave;

            if (glueProject != null)
            {
                bool shouldShowNewUi = glueProject.DisplaySettings != null;

                if (shouldShowNewUi)
                {
                    if (control == null)
                    {
                        control = new CameraSettingsControl();
                        base.AddToTab(PluginManager.LeftTab, control, "Display Settings");
                    }
                    else
                    {
                        base.AddTab();
                    }

                    respondToViewModelChanges = false;
                    {
                        viewModel.SetFrom(glueProject.DisplaySettings);

                        control.DataContext = viewModel;
                    }
                    respondToViewModelChanges = true;
                }

                else
                {
                    CameraSettingsWindow cameraSettingsWindow = new CameraSettingsWindow();
                    cameraSettingsWindow.ShowDialog();
                }
            }
            else
            {
                GlueGui.ShowMessageBox("You must load or create a project first to set the camera settings.");
            }
        }