コード例 #1
0
        static ApplicationSettingsService()
        {
#if !WINDOWS_PHONE
            var applicationData = ApplicationData.Current;

            LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings);
            RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings);
#endif

#if !WINDOWS_APP
            LegacySettingsServiceHandlerStatic = new LegacyApplicationSettingsServiceHandler();
#endif
        }
コード例 #2
0
        static ApplicationSettingsService()
        {
            var applicationData = ApplicationData.Current;

#if WINDOWS_PHONE
            if (Version.Parse(Deployment.Current.RuntimeVersion).Major >= 6)
            {
                LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings);
                RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings);
            }
#else
            LocalSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.LocalSettings);
            RoamingSettingsServiceHandlerStatic = new ApplicationSettingsServiceHandler(applicationData.RoamingSettings);
#endif

#if !WINDOWS_APP
            LegacySettingsServiceHandlerStatic = new LegacyApplicationSettingsServiceHandler();
#endif
        }