Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>

        public App()
        {
            Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
                Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
                Microsoft.ApplicationInsights.WindowsCollectors.Session);
            Windows.Storage.ApplicationDataContainer localSettings =
                Windows.Storage.ApplicationData.Current.LocalSettings;
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            createFile("theme");
            createFile("listaRadio");
            createFile("language");
            createFile("Freq");

            System.Threading.Tasks.Task <String> theme  = readFile("theme");
            System.Threading.Tasks.Task <String> lista  = readFile("listaRadio");
            System.Threading.Tasks.Task <String> lingua = readFile("language");
            System.Threading.Tasks.Task <String> freq   = readFile("Freq");

            if (theme.Equals(""))
            {
                writeFile("theme", "Light");
            }

            if (lingua.Equals(""))
            {
                writeFile("language", "en");
            }
            if (freq.Equals(""))
            {
                writeFile("Freq", "" + 0 + "");
            }
        }