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); } } }
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 ); } } }
public void OnBeforeCollapse( CommandRunner runner ) { TreeView tv = this.TreeView; if ( tv != null && tv.InvokeRequired ) { tv.Invoke((Action)(() => { SetCollapsedImageIndex(this); })); } else { SetCollapsedImageIndex ( this ); } }
public List<DroidExplorer.Core.IO.FileSystemInfo> OnAfterSelect( CommandRunner runner ) { return runner.GetDirectoryContents ( this.LinuxPath ); }
public DeviceEventArgs( string device, CommandRunner.DeviceState state ) { this.Device = device; this.State = state; }