Source code for the CoDocker CSharp to HTML converter from OfItselfSo.com
using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Text; using System.Drawing; /// +------------------------------------------------------------------------------------------------------------------------------+ /// ¦ TERMS OF USE: MIT License ¦ /// +------------------------------------------------------------------------------------------------------------------------------¦ /// ¦Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ¦ /// ¦files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, ¦ /// ¦modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software¦ /// ¦is furnished to do so, subject to the following conditions: ¦ /// ¦ ¦ /// ¦The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.¦ /// ¦ ¦ /// ¦THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE ¦ /// ¦WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR ¦ /// ¦COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ¦ /// ¦ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ¦ /// +------------------------------------------------------------------------------------------------------------------------------+ namespace CoDocker { /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// A class to persist the settings of the CoDocker app. /// </summary> /// <remarks> /// The ApplicationSettingsBase class does not write to the registry. It /// persists the configuration settings by leaving an XML file on disk in the location /// below. /// /// <document and settings folder>\<userfolder>\Local Settings\Application /// Data\<companyname>\<applicationname>_StrongName\<applicationversion>\user.config /// /// This code uses the techniques discussed here /// http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase%28VS.80%29.aspx /// </remarks> /// <history> /// 02 Jan 11 Cynic - Started /// </history> public sealed class ApplicationImplicitSettings : ApplicationSettingsBase { // #################################################################### // ##### Config Items Actively Set By the User // #################################################################### #region Config Items Actively Set By the User [UserScopedSetting()] [DefaultSettingValueAttribute("false")] public bool OKWithDisclaimer { get { return (bool)this["OKWithDisclaimer"]; } set { this["OKWithDisclaimer"] = value; } } #endregion // #################################################################### // ##### Config Items Set By the User without their knowing it // #################################################################### #region Config Items Set By the User without their knowing it [UserScopedSetting()] [DefaultSettingValueAttribute("800, 600")] public Size FormSize { get { return (Size)this["FormSize"]; } set { this["FormSize"] = value; } } // the most recently used file list [UserScopedSettingAttribute()] public List<string> MRUFileList { get { return (List<string>)this["MRUFileList"]; } set { this["MRUFileList"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenCSFileDirectory { get { return (String)this["LastOpenCSFileDirectory"];} set { this["LastOpenCSFileDirectory"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenCSFileName { get { return (String)this["LastOpenCSFileName"]; } set { this["LastOpenCSFileName"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenCSPROJFileDirectory { get { return (String)this["LastOpenCSPROJFileDirectory"]; } set { this["LastOpenCSPROJFileDirectory"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenCSPROJFileName { get { return (String)this["LastOpenCSPROJFileName"]; } set { this["LastOpenCSPROJFileName"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenSLNFileDirectory { get { return (String)this["LastOpenSLNFileDirectory"]; } set { this["LastOpenSLNFileDirectory"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String LastOpenSLNFileName { get { return (String)this["LastOpenSLNFileName"]; } set { this["LastOpenSLNFileName"] = value; } } [UserScopedSettingAttribute()] [DefaultSettingValueAttribute(null)] public String ConfigFileNameAndPath { get { return (String)this["ConfigFileNameAndPath"]; } set { this["ConfigFileNameAndPath"] = value; } } #endregion } }