コード例 #1
0
ファイル: UserSettingsBase.cs プロジェクト: romeobk/HRMS_7Cua
        /// <summary>
        /// Creates a UserSettings object that stores its settings
        /// in the specified storage location in a section based
        /// on the class name.
        /// </summary>
        /// <param name="StorageOption">The storage location for the settings.</param>
        public UserSettingsBase(UserStorageOption StorageOption)
        {
            //mOption = UserStorageOption.IsolatedStorage;

            mOption = StorageOption;
            mSection = this.GetType().Name;
        }
コード例 #2
0
        /// <summary>
        /// Creates a UserSettings object that stores its settings
        /// in the specified storage location in a section named
        /// per the parameter value.
        /// </summary>
        /// <param name="StorageOption">The storage location for the settings.</param>
        /// <param name="Section">The section name in which the settings should be stored.</param>
        public UserSettingsBase(UserStorageOption StorageOption, string Section)
        {
            //mOption = UserStorageOption.IsolatedStorage;

            mOption  = StorageOption;
            mSection = Section;
        }
コード例 #3
0
        /// <summary>
        /// Creates a UserSettings object that stores its settings
        /// in the specified storage location in a section based
        /// on the class name.
        /// </summary>
        /// <param name="StorageOption">The storage location for the settings.</param>
        public UserSettingsBase(UserStorageOption StorageOption)
        {
            //mOption = UserStorageOption.IsolatedStorage;

            mOption  = StorageOption;
            mSection = this.GetType().Name;
        }
コード例 #4
0
        /// <summary>
        /// Creates a new settings object of the specified type
        /// based on the currently logged in user, the specified
        /// section name and specified storage location.
        /// </summary>
        /// <param name="Type">The type of the settings object to return.</param>
        /// <param name="Section">The section name containing the settings.</param>
        /// <param name="StorageOption">The storage location of the settings.</param>
        /// <returns>The newly populated settings object.</returns>
        public static UserSettingsBase Restore(Type Type, string Section, UserStorageOption StorageOption)
        {
            switch (StorageOption)
            {
            case UserStorageOption.IsolatedStorage:

                return(RestoreFromIsolatedStorage(Type, Section));

            case UserStorageOption.Registry:

                return(RestoreFromRegistry(Type, Section));

            case UserStorageOption.File:

                return(RestoreFromFile(Type, Section));
            }

            return(null);
        }
コード例 #5
0
ファイル: Setting.cs プロジェクト: teppi210/HRMS_7Cua
 /// <summary>
 /// Creates a new, empty settings object.
 /// </summary>
 /// <param name="StorageOption">The location to store the settings.</param>
 public Setting(UserStorageOption StorageOption) : base(StorageOption)
 {
 }
コード例 #6
0
ファイル: UserSettingsBase.cs プロジェクト: romeobk/HRMS_7Cua
        /// <summary>
        /// Creates a UserSettings object that stores its settings
        /// in the specified storage location in a section named
        /// per the parameter value.
        /// </summary>
        /// <param name="StorageOption">The storage location for the settings.</param>
        /// <param name="Section">The section name in which the settings should be stored.</param>
        public UserSettingsBase(UserStorageOption StorageOption, string Section)
        {
            //mOption = UserStorageOption.IsolatedStorage;

            mOption = StorageOption;
            mSection = Section;
        }
コード例 #7
0
ファイル: UserSettingsBase.cs プロジェクト: romeobk/HRMS_7Cua
        /// <summary>
        /// Creates a new settings object of the specified type
        /// based on the currently logged in user, the specified
        /// section name and specified storage location.
        /// </summary>
        /// <param name="Type">The type of the settings object to return.</param>
        /// <param name="Section">The section name containing the settings.</param>
        /// <param name="StorageOption">The storage location of the settings.</param>
        /// <returns>The newly populated settings object.</returns>
        public static UserSettingsBase Restore(Type Type, string Section, UserStorageOption StorageOption)
        {
            switch (StorageOption)
            {
                case UserStorageOption.IsolatedStorage:

                    return RestoreFromIsolatedStorage(Type, Section);

                case UserStorageOption.Registry:

                    return RestoreFromRegistry(Type, Section);

                case UserStorageOption.File:

                    return RestoreFromFile(Type, Section);

            }

            return null;
        }
コード例 #8
0
ファイル: Setting.cs プロジェクト: romeobk/HRMS_7Cua
 /// <summary>
 /// Creates a new, empty settings object.
 /// </summary>
 /// <param name="StorageOption">The location to store the settings.</param>
 public Setting(UserStorageOption StorageOption)
     : base(StorageOption)
 {
 }