Пример #1
0
 public void OnAfterCollapse( CommandRunner runner )
 {
     if(!IsRoot) { // only wipe out for non-root node.
         TreeView tv = this.TreeView;
         if(tv != null && tv.InvokeRequired) {
             tv.Invoke(new GenericDelegate(this.Nodes.Clear));
             tv.Invoke(new AddDummyNodeDelegate(this.AddDummyNode), new object[] { this.Nodes });
         } else { // no need to invoke
             this.Nodes.Clear();
             AddDummyNode(this.Nodes);
         }
     }
 }
Пример #2
0
        public void OnBeforeExpand( CommandRunner runner, bool populateChildren )
        {
            TreeView tv = this.TreeView;
            if(!IsRoot) {
                if(tv != null && tv.InvokeRequired) {
                    tv.Invoke((Action)(() => {
                        this.Nodes.Clear();
                        SetExpandedImageIndex(this);
                    }));
                } else {
                    this.Nodes.Clear();
                    SetExpandedImageIndex(this);
                }
            }

              string path = this.FullPath.Replace ( "//", "/" );
              if ( !path.EndsWith ( "/" ) ) {
            path += "/";
              }

              if ( populateChildren && this.Nodes.Count == 0 ) {
            List<DroidExplorer.Core.IO.FileSystemInfo> fileSystemInfoList = runner.ListDirectories ( path );

            if ( tv != null && tv.InvokeRequired ) {
                    tv.Invoke((Action)(() => {
                        this.AddChildTreeNodes(this.Nodes, fileSystemInfoList);
                    }));
            } else { // no need to invoke
              AddChildTreeNodes ( this.Nodes, fileSystemInfoList );
            }
              }
        }
Пример #3
0
 public void OnBeforeCollapse( CommandRunner runner )
 {
     TreeView tv = this.TreeView;
       if ( tv != null && tv.InvokeRequired ) {
         tv.Invoke((Action)(() => {
             SetCollapsedImageIndex(this);
         }));
       } else {
     SetCollapsedImageIndex ( this );
       }
 }
Пример #4
0
 public List<DroidExplorer.Core.IO.FileSystemInfo> OnAfterSelect( CommandRunner runner )
 {
     return runner.GetDirectoryContents ( this.LinuxPath );
 }
Пример #5
0
 public DeviceEventArgs( string device, CommandRunner.DeviceState state )
 {
     this.Device = device;
       this.State = state;
 }