예제 #1
0
 /// <summary>
 /// 選択イベント
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnSelected(DirectoryTreeViewSelectedEventArgs e)
 {
     // イベントハンドラ呼出し
     if (this.Selected != null)
     {
         // 呼出し
         this.Selected(this, e);
     }
 }
예제 #2
0
        /// <summary>
        /// NodeMouseClick
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DirectoryTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            Trace.WriteLine("DirectoryTreeView::DirectoryTreeView_NodeMouseClick(object, TreeNodeMouseClickEventArgs)");
            DirectoryTreeNode mouseClick = (DirectoryTreeNode)e.Node;

            Debug.WriteLine("Mouse Click Node:" + mouseClick.FullPath);

            // イベント情報生成
            DirectoryTreeViewSelectedEventArgs _args = new DirectoryTreeViewSelectedEventArgs();

            _args.Info = mouseClick.Info;

            // 更新イベント
            this.OnSelected(_args);
        }
예제 #3
0
        /// <summary>
        /// SetSelected
        /// </summary>
        /// <param name="path"></param>
        public void SetSelected(string path)
        {
            Trace.WriteLine("DirectoryTreeView::SetSelected(string)");
            Debug.WriteLine("path:" + path);


            // ノード検索
            DirectoryTreeNode findNode = this.FindNode(path);

            if (findNode == null)
            {
                return;
            }
            this.SelectedNode = findNode;

            // イベント情報生成
            DirectoryTreeViewSelectedEventArgs _args = new DirectoryTreeViewSelectedEventArgs();

            _args.Info = findNode.Info;

            // 更新イベント
            this.OnSelected(_args);
        }
예제 #4
0
        /// <summary>
        /// DirectoryTreeView選択時イベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void DirectoryTreeView_Selected(object sender, EventArgs e)
        {
            DirectoryTreeViewSelectedEventArgs args = (DirectoryTreeViewSelectedEventArgs)e;

            this.Update(args.Info.FullName);
        }