/// <summary> /// Saves all User preferences to the specified file. /// </summary> /// <param name="filename">Required. The name of the file to which preferences are saved. May not be null.</param> static public void Save(string filename) { if (string.IsNullOrEmpty(filename)) { throw new ArgumentNullException("filename"); } _prefService.Instance.SavePrefFile((nsIFile)Xpcom.NewNativeLocalFile(filename)); }
/// <summary> /// Reads all User preferences from the specified file. /// </summary> /// <param name="filename">Required. The name of the file from which preferences are read. May not be null.</param> static public void Load(string filename) { if (string.IsNullOrEmpty(filename)) { throw new ArgumentNullException("filename"); } else if (!File.Exists(filename)) { throw new FileNotFoundException(); } _prefService.Instance.ReadUserPrefs((nsIFile)Xpcom.NewNativeLocalFile(filename)); }
public static void ImportCookies(string filename) { _cookieManager.Instance.ImportCookies((nsIFile)Xpcom.NewNativeLocalFile(filename)); }