Ejemplo n.º 1
0
        public FormWrapper()
        {
            Application.ApplicationExit   += new EventHandler(OnApplicationExit);
            SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(OnPowerModeChanged);

            JsonConfig.LoadConfig();
            wcsService = new WallpaperChangeScheduler();

            RegistryKey startupKey = Registry.CurrentUser.OpenSubKey(registryStartupLocation);

            startOnBoot = startupKey.GetValue("WinDynamicDesktop") != null;
            startupKey.Close();

            InitializeComponent();

            if (!Directory.Exists("images"))
            {
                DownloadImages();
            }
            else if (JsonConfig.firstRun)
            {
                UpdateLocation();
            }
            else
            {
                wcsService.StartScheduler();
            }
        }
Ejemplo n.º 2
0
        public FormWrapper()
        {
            Application.ApplicationExit += new EventHandler(OnApplicationExit);
            EnforceSingleInstance();
            SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(OnPowerModeChanged);

            JsonConfig.LoadConfig();
            _wcsService = new WallpaperChangeScheduler();

            InitializeComponent();
            _startupManager = UwpDesktop.GetStartupManager(notifyIcon.ContextMenu.MenuItems[6]);

            if (!Directory.Exists("images"))
            {
                DownloadImages();
            }
            else if (JsonConfig.firstRun)
            {
                UpdateLocation();
            }
            else
            {
                _wcsService.StartScheduler();
            }
        }
Ejemplo n.º 3
0
        public AppContext()
        {
            EnforceSingleInstance();

            JsonConfig.LoadConfig();
            InitializeComponent();

            _startupManager = UwpDesktop.GetStartupManager(notifyIcon.ContextMenu.MenuItems[6]);
            _wcsService     = new WallpaperChangeScheduler();

            if (!Directory.Exists("images"))
            {
                DownloadImages();
            }
            else if (JsonConfig.settings.location == null)
            {
                UpdateLocation();
            }
            else
            {
                _wcsService.RunScheduler();
            }

            UpdateChecker.Initialize(notifyIcon);
        }
Ejemplo n.º 4
0
        public FullScreenApi(WallpaperChangeScheduler wcs)
        {
            timerEventHandler = new Action(() => wcs.HandleTimerEvent(true));

            if (JsonConfig.settings.fullScreenPause)
            {
                SetFullScreenPause(true);
            }
        }
Ejemplo n.º 5
0
        public AppContext()
        {
            EnforceSingleInstance();

            JsonConfig.LoadConfig();
            InitializeGui();

            ThemeManager.Initialize();
            LocationManager.Initialize();
            wcsService = new WallpaperChangeScheduler();

            if (LocationManager.isReady && ThemeManager.isReady)
            {
                wcsService.RunScheduler();
            }

            UpdateChecker.Initialize();
        }
Ejemplo n.º 6
0
        public AppContext(string[] args)
        {
            ThemeManager.importPaths = args.Where(System.IO.File.Exists).ToList();
            HandleMultiInstance();

            JsonConfig.LoadConfig();
            InitializeTrayIcon();

            ThemeManager.Initialize();
            LocationManager.Initialize();
            wpEngine = new WallpaperChangeScheduler();

            if (LocationManager.isReady && ThemeManager.isReady)
            {
                wpEngine.RunScheduler();
            }

            UpdateChecker.Initialize();
        }