Beispiel #1
0
        protected override void OnAfterSelect(TreeViewEventArgs e)
        {
            base.OnAfterSelect(e);

            // Raise the DirectorySelected event.
            DirectorySelected?.Invoke(this,
                                      new DirectorySelectedEventArgs(e.Node.FullPath));
        }
Beispiel #2
0
 protected override void OnClick(EventArgs e)
 {
     base.OnClick(e);
     fileDialog.ShowDialog();
     SelectedDirectory = fileDialog.SelectedPath;
     if (SelectedDirectory.Length > 0)
     {
         DirectorySelected?.Invoke(this, SelectedDirectory);
         Console.WriteLine($"Selected file {SelectedDirectory}");
     }
 }
Beispiel #3
0
 /// <summary>
 /// 目录选择
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeDir_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
 {
     DirectorySelected?.Invoke(sender, e);
 }