Ejemplo n.º 1
0
        public WallpaperChangeScheduler()
        {
            fullScreenChecker = new FullScreenApi(this);

            backgroundTimer.AutoReset = true;
            backgroundTimer.Interval  = 60e3;
            backgroundTimer.Elapsed  += OnBackgroundTimerElapsed;
            backgroundTimer.Start();

            schedulerTimer.Elapsed        += OnSchedulerTimerElapsed;
            SystemEvents.PowerModeChanged += OnPowerModeChanged;
            SystemEvents.TimeChanged      += OnTimeChanged;
        }
Ejemplo n.º 2
0
        public WallpaperChangeScheduler()
        {
            fullScreenChecker = new FullScreenApi(this);

            if (Environment.OSVersion.Version.Build >= 21337)
            {
                VirtualDesktopProvider.Default.ComInterfaceAssemblyPath = Path.Combine(Environment.CurrentDirectory, "assemblies");
                virtualDesktopInit = VirtualDesktopProvider.Default.Initialize();
            }

            backgroundTimer.AutoReset = true;
            backgroundTimer.Interval  = 60e3;
            backgroundTimer.Elapsed  += OnBackgroundTimerElapsed;
            backgroundTimer.Start();

            schedulerTimer.Elapsed        += OnSchedulerTimerElapsed;
            SystemEvents.PowerModeChanged += OnPowerModeChanged;
            SystemEvents.TimeChanged      += OnTimeChanged;
        }