source: branches/eraser6/pluginsRewrite/Eraser.Manager/Settings.cs @ 2472

Revision 2472, 2.0 KB checked in by lowjoel, 15 months ago (diff)

Move the ForceUnlockLockedFiles? setting to Eraser.Plugins since it should be something that plugins respect and not the Eraser.Manager. We however would need a way to expose this functionality to plugins without directly providing access to Eraser.Util.Native.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1/*
2 * $Id$
3 * Copyright 2008-2010 The Eraser Project
4 * Original Author: Joel Low <lowjoel@users.sourceforge.net>
5 * Modified By:
6 *
7 * This file is part of Eraser.
8 *
9 * Eraser is free software: you can redistribute it and/or modify it under the
10 * terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
13 *
14 * Eraser is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 *
18 * A copy of the GNU General Public License can be found at
19 * <http://www.gnu.org/licenses/>.
20 */
21
22using System;
23using System.Collections.Generic;
24using System.Text;
25using System.Reflection;
26using System.Runtime.InteropServices;
27using System.Globalization;
28
29using Eraser.Util;
30using Eraser.Plugins;
31using Eraser.Plugins.ExtensionPoints;
32
33namespace Eraser.Manager
34{
35    /// <summary>
36    /// Presents an opaque type for the management of the Manager settings.
37    /// </summary>
38    public class ManagerSettings
39    {
40        /// <summary>
41        /// Constructor.
42        /// </summary>
43        /// <param name="settings">The Persistent Store for this object.</param>
44        public ManagerSettings(PersistentStore store)
45        {
46            Store = store;
47        }
48
49        /// <summary>
50        /// Whether missed tasks should be run when the program next starts.
51        /// </summary>
52        public bool ExecuteMissedTasksImmediately
53        {
54            get
55            {
56                return Store.GetValue("ExecuteMissedTasksImmediately", true);
57            }
58            set
59            {
60                Store.SetValue("ExecuteMissedTasksImmediately", value);
61            }
62        }
63
64        /// <summary>
65        /// Holds user decisions on whether the plugin will be loaded at the next
66        /// start up.
67        /// </summary>
68        public IDictionary<Guid, bool> PluginApprovals
69        {
70            get
71            {
72                return Store.GetValue("ApprovedPlugins", new Dictionary<Guid, bool>());
73            }
74        }
75
76        /// <summary>
77        /// The Persistent Store behind all these settings.
78        /// </summary>
79        private PersistentStore Store;
80    }
81}
Note: See TracBrowser for help on using the repository browser.