FSClient.Account.SaveSettings C# (CSharp) Method

SaveSettings() public static method

public static SaveSettings ( ) : void
return void
        public static void SaveSettings()
        {
            SettingsAccounts accts = new SettingsAccounts();
            accts.accounts = (from a in accounts select new SettingsAccount(a)).ToArray();
            Properties.Settings.Default.Accounts = accts;
        }

Usage Example

Example #1
0
 public void SaveSettings()
 {
     try {
         SaveAudioSettings();
         Account.SaveSettings();
         Properties.Settings.Default.IncomingBalloons          = IncomingBalloons;
         Properties.Settings.Default.CheckForUpdates           = CheckForUpdates;
         Properties.Settings.Default.GuiStartup                = GUIStartup;
         Properties.Settings.Default.FrontOnIncoming           = IncomingTopMost;
         Properties.Settings.Default.KeyboardFocusIncomingCall = IncomingKeyboardFocus;
         Properties.Settings.Default.ClearDTMFS                = ClearDTMFS;
         Properties.Settings.Default.UPNPNAT            = UPNPNAT;
         Properties.Settings.Default.DirectSipDial      = DirectSipDial;
         Properties.Settings.Default.UseNumberOnlyInput = UseNumberOnlyInput;
         Properties.Settings.Default.RecordingPath      = recordings_folder;
         Properties.Settings.Default.Theme          = theme;
         Properties.Settings.Default.Sofia          = new SettingsSofia(sofia);
         Properties.Settings.Default.ContactPlugins = contact_plugin_manager.GetSettings();
         Properties.Settings.Default.HeadsetPlugins = headset_plugin_manager.GetSettings();
         Properties.Settings.Default.EventSocket    = new SettingsEventSocket(event_socket);
         Properties.Settings.Default.Conference     = new SettingsConference(conference);
         Properties.Settings.Default.Save();
     }
     catch (Exception e) {            //if there is an error doing saving lets skip saving any settings to avoid overriding something else
         MessageBox.Show("Error saving settings out: " + e.Message + "\n" + e.StackTrace);
     }
 }