2
KeePass Password Safe - The Open-Source Password Manager
3
Copyright (C) 2003-2012 Dominik Reichl <dominik.reichl@t-online.de>
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
using System.Collections.Generic;
23
using System.Xml.Serialization;
24
using System.ComponentModel;
28
using KeePassLib.Serialization;
30
namespace KeePass.App.Configuration
32
public sealed class AceApplication
34
public AceApplication()
38
private string m_strLanguageFile = string.Empty; // = English
40
public string LanguageFile
42
get { return m_strLanguageFile; }
45
if(value == null) throw new ArgumentNullException("value");
46
m_strLanguageFile = value;
50
private bool m_bHelpUseLocal = false;
52
public bool HelpUseLocal
54
get { return m_bHelpUseLocal; }
55
set { m_bHelpUseLocal = value; }
58
// Serialize DateTime with TimeUtil
59
private string m_strLastUpdChk = string.Empty;
61
public string LastUpdateCheck
63
get { return m_strLastUpdChk; }
66
if(value == null) throw new ArgumentNullException("value");
67
m_strLastUpdChk = value;
71
private IOConnectionInfo m_ioLastDb = new IOConnectionInfo();
72
public IOConnectionInfo LastUsedFile
74
get { return m_ioLastDb; }
77
if(value == null) throw new ArgumentNullException("value");
82
private AceMru m_mru = new AceMru();
83
public AceMru MostRecentlyUsed
88
if(value == null) throw new ArgumentNullException("value");
93
private AceStartUp m_su = new AceStartUp();
94
public AceStartUp Start
99
if(value == null) throw new ArgumentNullException("value");
104
private AceOpenDb m_fo = new AceOpenDb();
105
public AceOpenDb FileOpening
110
if(value == null) throw new ArgumentNullException("value");
115
private bool m_bVerifyFile = true;
117
public bool VerifyWrittenFileAfterSaving
119
get { return m_bVerifyFile; }
120
set { m_bVerifyFile = value; }
123
private bool m_bTransactedWrites = true;
125
public bool UseTransactedFileWrites
127
get { return m_bTransactedWrites; }
128
set { m_bTransactedWrites = value; }
131
private bool m_bFileLocks = false;
132
[DefaultValue(false)]
133
public bool UseFileLocks
135
get { return m_bFileLocks; }
136
set { m_bFileLocks = value; }
139
private AceCloseDb m_fc = new AceCloseDb();
140
public AceCloseDb FileClosing
145
if(value == null) throw new ArgumentNullException("value");
150
private EcasTriggerSystem m_triggers = new EcasTriggerSystem();
151
public EcasTriggerSystem TriggerSystem
153
get { return m_triggers; }
156
if(value == null) throw new ArgumentNullException("value");
161
private string m_strPluginCachePath = string.Empty;
163
public string PluginCachePath
165
get { return m_strPluginCachePath; }
168
if(value == null) throw new ArgumentNullException("value");
169
m_strPluginCachePath = value;
174
public sealed class AceStartUp
180
private bool m_bOpenLastDb = true;
182
public bool OpenLastFile
184
get { return m_bOpenLastDb; }
185
set { m_bOpenLastDb = value; }
188
private bool m_bCheckForUpdate = false;
189
// [DefaultValue(false)] // Avoid user confusion with 'Configured' setting
190
public bool CheckForUpdate
192
get { return m_bCheckForUpdate; }
193
set { m_bCheckForUpdate = value; }
196
private bool m_bCheckForUpdateCfg = false;
197
[DefaultValue(false)]
198
public bool CheckForUpdateConfigured
200
get { return m_bCheckForUpdateCfg; }
201
set { m_bCheckForUpdateCfg = value; }
204
private bool m_bMinimizedAndLocked = false;
205
[DefaultValue(false)]
206
public bool MinimizedAndLocked
208
get { return m_bMinimizedAndLocked; }
209
set { m_bMinimizedAndLocked = value; }
212
private bool m_bPlgDeleteOld = true;
214
public bool PluginCacheDeleteOld
216
get { return m_bPlgDeleteOld; }
217
set { m_bPlgDeleteOld = value; }
220
private bool m_bClearPlgCache = false;
221
[DefaultValue(false)]
222
public bool PluginCacheClearOnce
224
get { return m_bClearPlgCache; }
225
set { m_bClearPlgCache = value; }
229
public sealed class AceOpenDb
235
private bool m_bShowExpiredEntries = false;
236
[DefaultValue(false)]
237
public bool ShowExpiredEntries
239
get { return m_bShowExpiredEntries; }
240
set { m_bShowExpiredEntries = value; }
243
private bool m_bShowSoonToExpireEntries = false;
244
[DefaultValue(false)]
245
public bool ShowSoonToExpireEntries
247
get { return m_bShowSoonToExpireEntries; }
248
set { m_bShowSoonToExpireEntries = value; }
252
public sealed class AceCloseDb
258
private bool m_bAutoSave = false;
259
[DefaultValue(false)]
262
get { return m_bAutoSave; }
263
set { m_bAutoSave = value; }
267
public sealed class AceMru
269
public const uint DefaultMaxItemCount = 12;
275
private uint m_uMaxItems = DefaultMaxItemCount;
276
public uint MaxItemCount
278
get { return m_uMaxItems; }
279
set { m_uMaxItems = value; }
282
private List<IOConnectionInfo> m_vItems = new List<IOConnectionInfo>();
283
[XmlArrayItem("ConnectionInfo")]
284
public List<IOConnectionInfo> Items
286
get { return m_vItems; }
287
set { m_vItems = value; }