Ejemplo n.º 1
0
        private void OnOk()
        {
            if (ShouldCacheMovies && !Directory.Exists(CachePath))
            {
                Directory.CreateDirectory(CachePath);
            }

            if (!ShouldCacheMovies)
            {
                MovieManager.CancelRunningJob();
            }

            Settings.Instance.UseTimeOfDay         = UseTimeOfDay;
            Settings.Instance.MovieWindowsMode     = MovieWindowsMode;
            Settings.Instance.ShouldCacheMovies    = ShouldCacheMovies;
            Settings.Instance.CachePath            = CachePath;
            Settings.Instance.PlayInLoop           = PlayInLoop;
            Settings.Instance.BlankOnRemoteDesktop = BlankOnRemoteDesktop;
            Settings.Instance.Save();

            CloseAction?.Invoke();
        }