ShowNode() public method

public ShowNode ( ResourceType type ) : void
type ResourceType
return 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);
        }
示例#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);
        }