public AppSettings GetCopy() { System.Diagnostics.Debug.WriteLine("Copying AppSettings"); AppSettings settings = new AppSettings(); settings.IsDirtyEnabled = false; CopyTo(settings); settings.IsDirtyEnabled = true; return settings; }
private void LoadSettings() { AppSettings settings; try { settings = AppSettings.Load(Path.Combine(AppFolder, "settings.xml")); } catch (FileNotFoundException) { settings = new AppSettings { AlwaysOnTop = false, ItemNumberLimit = 0, TimeLimitInMinutes = 0 }; } settings.CopyTo(Settings); }
public void CopyTo(AppSettings settings) { System.Diagnostics.Debug.WriteLine(" AlwaysOnTop: " + AlwaysOnTop.ToString()); settings.AlwaysOnTop = AlwaysOnTop; settings.TimeLimitInMinutes = TimeLimitInMinutes; settings.ItemNumberLimit = ItemNumberLimit; settings.IsTextCopyEnabled = IsTextCopyEnabled; settings.IsFileCopyEnabled = IsFileCopyEnabled; settings.IsImageCopyEnabled = IsImageCopyEnabled; }