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); } }
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; } }