Example #1
0
        public AppSettings GetCopy()
        {
            System.Diagnostics.Debug.WriteLine("Copying AppSettings");

            AppSettings settings = new AppSettings();

            settings.IsDirtyEnabled = false;

            CopyTo(settings);

            settings.IsDirtyEnabled = true;

            return settings;
        }
Example #2
0
        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);
        }
Example #3
0
        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;
        }