Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }