public void LoadLocationData()
        {
            Loading = true;
            AdmLocationData deser = Deserialize <AdmLocationData>(LocationDataPath, LocationData);

            LocationData = deser ?? LocationData;
            Loading      = false;
        }
 protected AdmConfigBuilder()
 {
     if (instance == null)
     {
         Config           = new AdmConfig();
         LocationData     = new AdmLocationData();
         UpdaterData      = new UpdaterData();
         ConfigDir        = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "AutoDarkMode");
         ConfigFilePath   = Path.Combine(ConfigDir, "config.yaml");
         LocationDataPath = Path.Combine(ConfigDir, "location_data.yaml");
         UpdaterDataPath  = Path.Combine(ConfigDir, "update.yaml");
     }
 }
 public void OnLocationDataUpdated(AdmLocationData old)
 {
     locationDataUpdatedHandler?.Invoke(old, LocationData);
 }