Esempio n. 1
0
        /// <summary>
        /// Convenience method to add a OptionItem for <see cref="Color"/> values to this handler
        /// </summary>
        /// <param name="itemName">The name of the item</param>
        /// <param name="initialValue">The initial value of the item</param>
        /// <returns>A new instance of <see cref="GenericOptionItem{Color}"/></returns>
        public GenericOptionItem <Color> AddColor(string itemName, Color initialValue)
        {
            GenericOptionItem <Color> newItem = new GenericOptionItem <Color>(itemName, initialValue);

            AddOptionItem(newItem);
            return(newItem);
        }
Esempio n. 2
0
        /// <summary>
        /// Convenience method to add a <see cref="GenericOptionItem{T}"/> to this handler
        /// </summary>
        /// <param name="itemName">The name of the item</param>
        /// <param name="initialValue">The initial value of the item</param>
        /// <returns>A new instance of <see cref="GenericOptionItem{T}"/></returns>
        public GenericOptionItem <T> AddGeneric <T>(string itemName, T initialValue)
        {
            GenericOptionItem <T> newItem = new GenericOptionItem <T>(itemName, initialValue);

            AddOptionItem(newItem);
            return(newItem);
        }