Exemplo n.º 1
0
        /// <summary>
        /// Begins in-place editing of the text of the specified resource.
        /// </summary>
        /// <param name="res">The resource to edit.</param>
        public void EditResourceLabel(IResource res)
        {
            if (res == null)
            {
                throw new ArgumentNullException("res");
            }

            JetListViewNode node = _jetListView.NodeCollection.NodeFromItem(res);

            if (node == null)
            {
                if (!_dataProvider.FindResourceNode(res))
                {
                    throw new ArgumentException("Resource not found in tree", "res");
                }
                node = _jetListView.NodeCollection.NodeFromItem(res);
            }

            _jetListView.InPlaceEditNode(node);
        }