Inheritance: System.Windows.Window
Beispiel #1
0
        public bool OpenRetrospection()
        {
            try
            {
                // new window
                if (_retrospection == null)
                {
                    _retrospection             = new RetrospectionWindow();
                    _retrospection.WindowState = (OpenRetrospectionInFullScreen) ? WindowState.Maximized : WindowState.Normal;
                    _retrospection.Topmost     = true;
                    _retrospection.Topmost     = false;
                    _retrospection.Show();
                }
                // open again if it lost focus, is minimized or was in the background
                else
                {
                    _retrospection.ForceRefreshWindow();
                    _retrospection.WindowState = (OpenRetrospectionInFullScreen) ? WindowState.Maximized : WindowState.Normal;
                    _retrospection.Activate();
                    _retrospection.Topmost = true;
                    _retrospection.Topmost = false;
                    _retrospection.Focus();
                    _retrospection.Show();
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Beispiel #2
0
        public bool OpenRetrospection()
        {
            try
            {
                // new window
                if (_retrospection == null)
                {
                    _retrospection = new RetrospectionWindow();
                    _retrospection.WindowState = (OpenRetrospectionInFullScreen) ? WindowState.Maximized : WindowState.Normal;
                    _retrospection.Topmost = true;
                    _retrospection.Topmost = false;
                    _retrospection.Show();
                }
                // open again if it lost focus, is minimized or was in the background
                else
                {
                    _retrospection.ForceRefreshWindow();
                    _retrospection.WindowState = (OpenRetrospectionInFullScreen) ? WindowState.Maximized : WindowState.Normal;
                    _retrospection.Activate();
                    _retrospection.Topmost = true;
                    _retrospection.Topmost = false;
                    _retrospection.Focus();
                    _retrospection.Show();
                }

                return true;
            }
            catch
            {
                return false;
            }
        }