private List <BrowseComponent> GetFiles(BrowseComponent browse) { try { // NOTE: No need to close the connection BrowseRequestCommand command = new BrowseRequestCommand(Owner); return(command.Execute(browse.ClientId, browse.Id)); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(null); }
private List <BrowseComponent> GetServer() { try { BrowseComponent browse = Owner.Get <BrowseComponent>(); List <BrowseComponent> list = new List <BrowseComponent>(); list.Add(browse); return(list); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(null); }
public override IEnumerable GetChildren(object obj) { try { Cursor.Wait(); if (obj != null) { BrowseComponent browse = (BrowseComponent)obj; return((browse.None) ? GetGroup() : GetFiles(browse)); } return(GetServer()); } finally { Cursor.Normal(); } }
public override bool HasChildren(object obj) { BrowseComponent browse = (BrowseComponent)obj; return(!browse.File); }