/// <summary> /// Saves the specified settings. /// </summary> /// <param name="settings">The settings.</param> /// <exception cref="System.ArgumentNullException"></exception> public static void Save(ClientSettings settings) { if (settings == null) throw new ArgumentNullException(nameof(settings)); try { var serializer = new XmlSerializer(typeof (ClientSettings)); using (var writer = new StreamWriter(GetFilePath())) serializer.Serialize(writer, settings); } catch { } }
public object Clone() { var settings = new ClientSettings { ApiKey = this.ApiKey, EQFolder = this.EQFolder, IgnoreList = this.IgnoreList, MinimizeToTray = this.MinimizeToTray, EnableToasts = this.EnableToasts, ToastDisplayForSeconds = this.ToastDisplayForSeconds, StartWithWindows = this.StartWithWindows, TodayAuctionCount = this.TodayAuctionCount, LifetimeAuctionCount = this.LifetimeAuctionCount, LastDateCounted = this.LastDateCounted, TrackStateInSystemTray = this.TrackStateInSystemTray }; return settings; }