Esempio n. 1
0
 private static NotificationsSettingsSection getNotificationSettings()
 {
     Configuration appConfig = _getAppConfig();
     NotificationsSettingsSection notificationSettings = null;
     notificationSettings = (NotificationsSettingsSection)appConfig.Sections.Get("NotificationSettings");
     if (notificationSettings == null)
     {
         notificationSettings = new NotificationsSettingsSection();
         NotificationSoundsSettings settings = new NotificationSoundsSettings();
         notificationSettings.Sounds = settings;
     }
     return notificationSettings;
 }
Esempio n. 2
0
 public static void updateNotificationPath(string newpath)
 {
     NotificationsSettingsSection newSection = new NotificationsSettingsSection();
     newSection.Sounds.WavFile = newpath;
     Configuration appConfig = _getAppConfig();
     appConfig.Sections.Remove("NotificationSettings");
     appConfig.Sections.Add("NotificationSettings", newSection);
     appConfig.Save();
 }