コード例 #1
0
        /// <summary>
        /// Maximize and removes Interface and start timer for slideshow.
        /// </summary>
        internal static void StartSlideshow()
        {
            if (Pics.Count == 0)
            {
                return;
            }

            UC.Close_UserControls();

            if (SlideTimer == null)
            {
                SlideTimer = new Timer()
                {
                    Interval = Properties.Settings.Default.SlideTimer,
                    Enabled  = true
                };
                SlideTimer.Elapsed += SlideTimer_Elapsed;
                SlideTimer.Start();
            }
            else
            {
                SlideTimer.Start();
            }

            if (ConfigureWindows.GetMainWindow.WindowState == WindowState.Normal)
            {
                ConfigureWindows.RenderFullscreen();
            }

            _ = NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS | NativeMethods.ES_DISPLAY_REQUIRED); // Stop screensaver when running

            HideInterfaceLogic.ShowNavigation(false);
            HideInterfaceLogic.ShowShortcuts(false);
        }
コード例 #2
0
        internal static void Bar_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (ConfigureWindows.GetMainWindow.TitleText.IsFocused)
            {
                return;
            }

            ConfigureWindows.Move(sender, e);
            Refocus();
            e.Handled = true; // Disable text clicking
        }
コード例 #3
0
        internal static void StopSlideshow()
        {
            SlideTimer.Stop();

            if (!Properties.Settings.Default.Fullscreen)
            {
                ConfigureWindows.Fullscreen_Restore();
            }

            _ = NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS); // Allow screensaver again
        }