Exemplo n.º 1
0
 /// <summary>
 /// Creates a new StockIcon instance with the specified identifer and options.
 /// </summary>
 /// <param name="id">A value that identifies the icon represented by this instance.</param>
 /// <param name="size">A value that indicates the size of the stock icon.</param>
 /// <param name="isLinkOverlay">A bool value that indicates whether the icon has a link overlay.</param>
 /// <param name="isSelected">A bool value that indicates whether the icon is in a selected state.</param>
 public StockIcon(StockIconIdentifier id, StockIconSizes size, bool isLinkOverlay, bool isSelected)
 {
     identifier     = id;
     linkOverlay    = isLinkOverlay;
     selected       = isSelected;
     currentSize    = size;
     invalidateIcon = true;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new StockIcon instance with the specified identifer and options.
 /// </summary>
 /// <param name="id">A value that identifies the icon represented by this instance.</param>
 /// <param name="size">A value that indicates the size of the stock icon.</param>
 /// <param name="isLinkOverlay">A bool value that indicates whether the icon has a link overlay.</param>
 /// <param name="isSelected">A bool value that indicates whether the icon is in a selected state.</param>
 public StockIcon(StockIconIdentifier id, StockIconSizes size, bool isLinkOverlay, bool isSelected)
 {
     identifier = id;
     linkOverlay = isLinkOverlay;
     selected = isSelected;
     currentSize = size;
     invalidateIcon = true;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Overloaded constructor that takes in size and Boolean values for 
        /// link overlay and selected icon state. The settings are applied to 
        /// all the stock icons in the collection.
        /// </summary>
        /// <param name="size">StockIcon size for all the icons in the collection.</param>
        /// <param name="linkOverlay">Link Overlay state for all the icons in the collection.</param>
        /// <param name="selected">Selection state for all the icons in the collection.</param>
        public StockIcons(StockIconSizes size, bool linkOverlay, bool selected)
        {
            defaultSize = size;
            isLinkOverlay = linkOverlay;
            isSelected = selected;

            // Create an empty dictionary. Stock icons will be created when requested
            // or when they are enumerated on this collection
            stockIconCache = new Dictionary<StockIconIdentifier, StockIcon>();
            stockIconList = new List<StockIcon>();

            Array allIdentifiers = Enum.GetValues(typeof(StockIconIdentifier));

            foreach (StockIconIdentifier id in allIdentifiers)
                stockIconCache.Add(id, null);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Overloaded constructor that takes in size and Boolean values for
        /// link overlay and selected icon state. The settings are applied to
        /// all the stock icons in the collection.
        /// </summary>
        /// <param name="size">StockIcon size for all the icons in the collection.</param>
        /// <param name="linkOverlay">Link Overlay state for all the icons in the collection.</param>
        /// <param name="selected">Selection state for all the icons in the collection.</param>
        public StockIcons(StockIconSizes size, bool linkOverlay, bool selected)
        {
            defaultSize   = size;
            isLinkOverlay = linkOverlay;
            isSelected    = selected;

            // Create an empty dictionary. Stock icons will be created when requested
            // or when they are enumerated on this collection
            stockIconCache = new Dictionary <StockIconIdentifier, StockIcon>();
            stockIconList  = new List <StockIcon>();

            Array allIdentifiers = Enum.GetValues(typeof(StockIconIdentifier));

            foreach (StockIconIdentifier id in allIdentifiers)
            {
                stockIconCache.Add(id, null);
            }
        }