Example #1
0
        public AppContext(string[] args)
        {
            DebugLogger.WriteLogFile();
            JsonConfig.LoadConfig();
            Localization.Initialize();

            ThemeManager.importPaths = args.Where(System.IO.File.Exists).ToList();
            HandleMultiInstance();

            InitializeTrayIcon();
            LocationManager.Initialize();
            ThemeManager.Initialize();
            ScriptManager.Initialize();

            wpEngine.RunScheduler();
            LaunchSequence.NextStep();
            UpdateChecker.Initialize();
        }
Example #2
0
        public AppContext()
        {
            EnforceSingleInstance();

            JsonConfig.LoadConfig();
            InitializeGui();

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

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

            UpdateChecker.Initialize();
        }
Example #3
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();
        }
        public static void NextStep(bool themeReadyOverride = false)
        {
            if (!IsLocationReady())
            {
                LocationManager.ChangeLocation();

                if (JsonConfig.firstRun)
                {
                    AppContext.ShowPopup(_("Welcome! Please enter your location so the app can " +
                                           "determine sunrise and sunset times."));
                }
            }
            else if (!IsThemeReady() && !themeReadyOverride)  // Override if theme=None chosen
            {
                ThemeManager.SelectTheme();
            }
            else if (JsonConfig.firstRun)
            {
                AppContext.ShowPopup(_("The app is still running in the background. You can " +
                                       "access it at any time by clicking on the icon in the system tray."));

                JsonConfig.firstRun = false;  // Don't show this message again
            }
        }
 private static void OnLocationItemClick(object sender, EventArgs e)
 {
     LocationManager.UpdateLocation();
 }
Example #6
0
 private static void OnScheduleItemClick(object sender, EventArgs e)
 {
     LocationManager.ChangeLocation();
 }