Example #1
0
        void ChangeMode(ViewMode mode)
        {
            ViewModel.ViewerViewModel.ViewMode = mode;

            if (ViewMode.Camera == mode)
            {
                if (directionalLightWindow != null && directionalLightWindow.Visible)
                {
                    directionalLightWindow.Close();
                }
            }
            else
            {
                if (directionalLightWindow == null)
                {
                    directionalLightWindow = new DirectionalLightWindow(Screen)
                    {
                        DataContext = ViewModel.ViewerViewModel.DirectionalLightViewModel
                    };
                }
                directionalLightWindow.Show();
            }

            tab.SelectedIndex = mainMenuIndex;
            modeButton.Focus();
            Close();
        }
Example #2
0
        void ChangeMode(ViewMode mode)
        {
            ViewModel.ViewerViewModel.ViewMode = mode;

            if (ViewMode.Camera == mode)
            {
                if (directionalLightWindow != null && directionalLightWindow.Visible) directionalLightWindow.Close();
            }
            else
            {
                if (directionalLightWindow == null)
                {

                    directionalLightWindow = new DirectionalLightWindow(Screen)
                    {
                        DataContext = ViewModel.ViewerViewModel.DirectionalLightViewModel
                    };
                }
                directionalLightWindow.Show();
            }

            tab.SelectedIndex = mainMenuIndex;
            modeButton.Focus();
            Close();
        }