public TDAPIOLELib.DashboardFolder CreateFolderPath(String FolderPath) { TDAPIOLELib.DashboardFolderFactory dashboardFolderFactory = tDConnection.DashboardFolderFactory; TDAPIOLELib.TDFilter tdFilter; TDAPIOLELib.List list; TDAPIOLELib.DashboardFolder dashboardFolder = null; foreach (String folder in FolderPath.Split('\\')) { tdFilter = dashboardFolderFactory.Filter; tdFilter["DF_NAME"] = folder; list = dashboardFolderFactory.NewList(tdFilter.Text); if (list.Count <= 0) { dashboardFolder = CreateFolder(dashboardFolder, folder); } else { dashboardFolder = list[1]; } dashboardFolderFactory = dashboardFolder.DashboardFolderFactory; } return(dashboardFolder); }
public TDAPIOLELib.DashboardFolder GetFolderObject(String folderPath) { TDAPIOLELib.DashboardFolderFactory dashboardFolderFactory = tDConnection.DashboardFolderFactory; TDAPIOLELib.TDFilter tdFilter; TDAPIOLELib.List list; TDAPIOLELib.DashboardFolder dashboardFolder = null; foreach (String folder in folderPath.Split('\\')) { tdFilter = dashboardFolderFactory.Filter; tdFilter["DF_NAME"] = folder; list = dashboardFolderFactory.NewList(tdFilter.Text); if (list.Count <= 0) { throw (new Exception("Dashboard Folder Not Found : " + folder)); } else { dashboardFolder = list[1]; } dashboardFolderFactory = dashboardFolder.DashboardFolderFactory; } return(dashboardFolder); }
public TDAPIOLELib.List FindChildFolders(TDAPIOLELib.DashboardFolder dashboardFolder) { TDAPIOLELib.DashboardFolderFactory dashboardFolderFactory = dashboardFolder.DashboardFolderFactory; TDAPIOLELib.List list = new TDAPIOLELib.List(); foreach (TDAPIOLELib.DashboardFolder DF in dashboardFolderFactory.NewList("")) { list.Add(DF); } return(list); }
public TDAPIOLELib.DashboardFolder FindPrivateFolder() { TDAPIOLELib.DashboardFolderFactory dashboardFolderFactory = tDConnection.DashboardFolderFactory; TDAPIOLELib.TDFilter tDFilter = dashboardFolderFactory.Filter; tDFilter["DF_NAME"] = "Private"; tDFilter["DF_OWNER"] = "__default__"; TDAPIOLELib.List list = dashboardFolderFactory.NewList(tDFilter.Text); foreach (TDAPIOLELib.DashboardFolder DF in list) { if (DF.Name.ToUpper() == "PRIVATE") { return(DF); } } return(null); }
public Boolean DeleteFolder(TDAPIOLELib.DashboardFolder dashboardFolder) { TDAPIOLELib.DashboardFolderFactory dashboardFolderFactory = tDConnection.DashboardFolderFactory; dashboardFolderFactory.RemoveItem(dashboardFolder.ID); return(true); }