| 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 | |
|---|
| 22 | using System; |
|---|
| 23 | using System.Collections.Generic; |
|---|
| 24 | using System.Text; |
|---|
| 25 | using System.Reflection; |
|---|
| 26 | using System.Runtime.InteropServices; |
|---|
| 27 | using System.Globalization; |
|---|
| 28 | |
|---|
| 29 | using Eraser.Util; |
|---|
| 30 | using Eraser.Plugins; |
|---|
| 31 | using Eraser.Plugins.ExtensionPoints; |
|---|
| 32 | |
|---|
| 33 | namespace 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 | } |
|---|