Ejemplo n.º 1
0
        private void InitializeIcons()
        {
            Size size = new Size(24.0, 24.0);

            using (IEnumerator <CategoryEditor> enumerator = this.CategoryEditors.GetEnumerator())
            {
                while (((IEnumerator)enumerator).MoveNext())
                {
                    SceneNodeCategoryEditor nodeCategoryEditor = enumerator.Current as SceneNodeCategoryEditor;
                    if (nodeCategoryEditor != null)
                    {
                        this.HighlightedCategoryIcon = (ImageSource)nodeCategoryEditor.GetHighlightedImage(size);
                        return;
                    }
                }
            }
            if (this.CategoryIcon == null)
            {
                this.CategoryIcon            = Microsoft.Expression.DesignSurface.FileTable.GetImageSource("Resources\\Icons\\Categories\\pane_thirdParty_24x24_off.png");
                this.HighlightedCategoryIcon = Microsoft.Expression.DesignSurface.FileTable.GetImageSource("Resources\\Icons\\Categories\\pane_thirdParty_24x24_on.png");
            }
            else
            {
                this.HighlightedCategoryIcon = this.CategoryIcon;
            }
        }
Ejemplo n.º 2
0
        private void InitializeIcons()
        {
            Size size = new Size(24.0, 24.0);

            foreach (CategoryEditor categoryEditor in (Collection <CategoryEditor>) this.CategoryEditors)
            {
                SceneNodeCategoryEditor nodeCategoryEditor = categoryEditor as SceneNodeCategoryEditor;
                if (nodeCategoryEditor != null)
                {
                    this.HighlightedCategoryIcon = (ImageSource)nodeCategoryEditor.GetHighlightedImage(size);
                    return;
                }
            }
            if (this.CategoryIcon == null)
            {
                this.CategoryIcon            = Microsoft.Expression.DesignSurface.FileTable.GetImageSource("Resources\\Icons\\Categories\\pane_thirdParty_24x24_off.png");
                this.HighlightedCategoryIcon = Microsoft.Expression.DesignSurface.FileTable.GetImageSource("Resources\\Icons\\Categories\\pane_thirdParty_24x24_on.png");
            }
            else
            {
                this.HighlightedCategoryIcon = this.CategoryIcon;
            }
        }