context: /*
    KeePass Password Safe - The Open-Source Password Manager
    Copyright (C) 2003-2015 Dominik Reichl <dominik.reichl@t-online.de>
  
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
  
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
  
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
  
  using System;
  using System.Collections.Generic;
  using System.Text;
  using System.Windows.Forms;
  using System.Xml.Serialization;
  using System.ComponentModel;
  using System.Diagnostics;
  
  using KeePassLib;
  using KeePassLib.Interfaces;
  using KeePassLib.Utility;
  
  namespace KeePass.App.Configuration
  {
  	public sealed class AceIntegration
  	{
  		private ulong m_hkAutoType = (ulong)(Keys.Control | Keys.Alt | Keys.A);
  		public ulong HotKeyGlobalAutoType
  		{
  			get { return m_hkAutoType; }
  			set { m_hkAutoType = value; }
  		}
  
  		private ulong m_hkAutoTypeSel = (ulong)Keys.None;
  		public ulong HotKeySelectedAutoType
  		{
  			get { return m_hkAutoTypeSel; }
  			set { m_hkAutoTypeSel = value; }
  		}
  
  		private ulong m_hkShowWindow = (ulong)(Keys.Control | Keys.Alt | Keys.K);
  		public ulong HotKeyShowWindow
  		{
  			get { return m_hkShowWindow; }
  			set { m_hkShowWindow = value; }
  		}
  
  		private ulong m_hkEntryMenu = (ulong)Keys.None;
  		public ulong HotKeyEntryMenu
  		{
  			get { return m_hkEntryMenu; }
  			set { m_hkEntryMenu = value; }
  		}
  
  		private string m_strUrlOverride = string.Empty;
  		[DefaultValue("")]
  		public string UrlOverride
  		{
  			get { return m_strUrlOverride; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_strUrlOverride = value;
  			}
  		}
  
  		private AceUrlSchemeOverrides m_vSchemeOverrides = new AceUrlSchemeOverrides();
  		public AceUrlSchemeOverrides UrlSchemeOverrides
  		{
  			get { return m_vSchemeOverrides; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_vSchemeOverrides = value;
  			}
  		}
  
  		private bool m_bSearchKeyFiles = true;
  		[DefaultValue(true)]
  		public bool SearchKeyFiles
  		{
  			get { return m_bSearchKeyFiles; }
  			set { m_bSearchKeyFiles = value; }
  		}
  
  		private bool m_bSearchKeyFilesOnRemovable = false;
  		[DefaultValue(false)]
  		public bool SearchKeyFilesOnRemovableMedia
  		{
  			get { return m_bSearchKeyFilesOnRemovable; }
  			set { m_bSearchKeyFilesOnRemovable = value; }
  		}
  
  		private bool m_bSingleInstance = true;
  		[DefaultValue(true)]
  		public bool LimitToSingleInstance
  		{
  			get { return m_bSingleInstance; }
  			set { m_bSingleInstance = value; }
  		}
  
  		private bool m_bMatchByTitle = true;
  		[DefaultValue(true)]
  		public bool AutoTypeMatchByTitle
  		{
  			get { return m_bMatchByTitle; }
  			set { m_bMatchByTitle = value; }
  		}
  
  		private bool m_bMatchByUrlInTitle = false;
  		[DefaultValue(false)]
  		public bool AutoTypeMatchByUrlInTitle
  		{
  			get { return m_bMatchByUrlInTitle; }
  			set { m_bMatchByUrlInTitle = value; }
  		}
  
  		private bool m_bMatchByUrlHostInTitle = false;
  		[DefaultValue(false)]
  		public bool AutoTypeMatchByUrlHostInTitle
  		{
  			get { return m_bMatchByUrlHostInTitle; }
  			set { m_bMatchByUrlHostInTitle = value; }
  		}
  
  		private bool m_bMatchByTagInTitle = false;
  		[DefaultValue(false)]
  		public bool AutoTypeMatchByTagInTitle
  		{
  			get { return m_bMatchByTagInTitle; }
  			set { m_bMatchByTagInTitle = value; }
  		}
  
  		private bool m_bPrependInitSeqIE = true;
  		[DefaultValue(true)]
  		public bool AutoTypePrependInitSequenceForIE
  		{
  			get { return m_bPrependInitSeqIE; }
  			set { m_bPrependInitSeqIE = value; }
  		}
  
  		private bool m_bSpecialReleaseAlt = true;
  		[DefaultValue(true)]
  		public bool AutoTypeReleaseAltWithKeyPress
  		{
  			get { return m_bSpecialReleaseAlt; }
  			set { m_bSpecialReleaseAlt = value; }
  		}
  
  		private bool m_bAdjustKeybLayout = true;
  		[DefaultValue(true)]
  		public bool AutoTypeAdjustKeyboardLayout
  		{
  			get { return m_bAdjustKeybLayout; }
  			set { m_bAdjustKeybLayout = value; }
  		}
  
  		private bool m_bAllowInterleaved = false;
  		[DefaultValue(false)]
  		public bool AutoTypeAllowInterleaved
  		{
  			get { return m_bAllowInterleaved; }
  			set { m_bAllowInterleaved = value; }
  		}
  
  		private bool m_bCancelOnWindowChange = false;
  		[DefaultValue(false)]
  		public bool AutoTypeCancelOnWindowChange
  		{
  			get { return m_bCancelOnWindowChange; }
  			set { m_bCancelOnWindowChange = value; }
  		}
  
  		private bool m_bCancelOnTitleChange = false;
  		[DefaultValue(false)]
  		public bool AutoTypeCancelOnTitleChange
  		{
  			get { return m_bCancelOnTitleChange; }
  			set { m_bCancelOnTitleChange = value; }
  		}
  
  		private int m_iInterKeyDelay = -1;
  		[DefaultValue(-1)]
  		public int AutoTypeInterKeyDelay
  		{
  			get { return m_iInterKeyDelay; }
  			set { m_iInterKeyDelay = value; }
  		}
  
  		private ProxyServerType m_pstProxyType = ProxyServerType.System;
  		public ProxyServerType ProxyType
  		{
  			get { return m_pstProxyType; }
  			set { m_pstProxyType = value; }
  		}
  
  		private string m_strProxyAddr = string.Empty;
  		[DefaultValue("")]
  		public string ProxyAddress
  		{
  			get { return m_strProxyAddr; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_strProxyAddr = value;
  			}
  		}
  
  		private string m_strProxyPort = string.Empty;
  		[DefaultValue("")]
  		public string ProxyPort
  		{
  			get { return m_strProxyPort; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_strProxyPort = value;
  			}
  		}
  
  		private ProxyAuthType m_pstProxyAuthType = ProxyAuthType.Auto;
  		public ProxyAuthType ProxyAuthType
  		{
  			get { return m_pstProxyAuthType; }
  			set { m_pstProxyAuthType = value; }
  		}
  
  		private string m_strProxyUser = string.Empty;
  		[DefaultValue("")]
  		public string ProxyUserName
  		{
  			get { return m_strProxyUser; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_strProxyUser = value;
  			}
  		}
  
  		private string m_strProxyPassword = string.Empty;
  		[DefaultValue("")]
  		public string ProxyPassword
  		{
  			get { return m_strProxyPassword; }
  			set
  			{
  				if(value == null) throw new ArgumentNullException("value");
  				m_strProxyPassword = value;
  			}
  		}
  
  		public AceIntegration()
  		{
  		}
  	}
  
  	public sealed class AceUrlSchemeOverrides : IDeepCloneable<AceUrlSchemeOverrides>
  	{
  		private List<AceUrlSchemeOverride> m_lBuiltInOverrides =
  			new List<AceUrlSchemeOverride>();
  		[XmlIgnore]
  		public List<AceUrlSchemeOverride> BuiltInOverrides
  		{
  
gt: 			get { return m_lBuiltInOverrides; }