ShowNode() public méthode

public ShowNode ( ResourceType type ) : void
type ResourceType
Résultat void
        protected override void OnAfterSelect(TreeViewEventArgs e)
        {
            ResourceTreeNode selected = e.Node as ResourceTreeNode;

            if (selected != null)
            {
                if (selected.CommandType != ResourceType.None)
                {
                    if (Focused)
                    {
                        resourceListBox.ShowNode(selected.CommandType);
                    }
                    selected.Expand();
                }
                else
                {
                    if (Focused)
                    {
                        resourceListBox.ShowNode(selected.Text, selected.ResourceType);
                    }
                }
            }

            base.OnAfterSelect(e);
        }
Exemple #2
0
        public int LoadResource(ResXResourceReader resXResourceReader)
        {
            int number_resources = 0;

            ClearResources( );

            foreach (DictionaryEntry de in resXResourceReader)
            {
                number_resources += resourceList.AddResource(de.Key.ToString( ), de.Value);
            }

            resourceTreeView.FillNodes( );
            resourceListBox.ShowNode(ResourceType.TypeImage);

            if (resourceListBox.Items.Count > 0)
            {
                resourceListBox.SelectedIndex = 0;
            }

            return(number_resources);
        }