Exemplo n.º 1
0
        //给文档添加一个映射ID
        public void MapProjectID(Document doc)
        {
            string path = doc.Name;

            if (!DwgFilesId.ContainsKey(path))
            {
                DwgFilesId.Add(path, CheckDBFlag.GetDbFlag(doc));
            }
        }
Exemplo n.º 2
0
        public DBEntityControl GetMainEntCol(string dwgname)
        {
            string projectID = DwgFilesId.ContainsKey(dwgname) ? DwgFilesId[dwgname] : null;

            if (projectID == null)
            {
                return(null);
            }
            if (dbMainEntFiles.ContainsKey(projectID))
            {
                return(dbMainEntFiles[projectID]);
            }
            else
            {
                throw new Exception("找不到main database");
            }
        }
Exemplo n.º 3
0
        public GridList GetActiveGridList(string dwgname)
        {
            string projectID = DwgFilesId.ContainsKey(dwgname) ? DwgFilesId[dwgname] : null;

            if (projectID == null)
            {
                return(null);
            }
            GridList gridList = null;

            GridLists.TryGetValue(projectID, out gridList);

            if (gridList != null)
            {
                return(gridList);
            }
            else
            {
                BindPaletteSet.BindGridList(out gridList);
                GridLists.Add(projectID, gridList);
                return(gridList);
            }
        }
Exemplo n.º 4
0
        public DevExpress.XtraTreeList.TreeList GetActiveTreeLst(string dwgname)
        {
            string projectID = DwgFilesId.ContainsKey(dwgname) ? DwgFilesId[dwgname] : null;

            if (projectID == null)
            {
                return(null);
            }
            DevExpress.XtraTreeList.TreeList treelist = null;
            ProjectTreeLists.TryGetValue(projectID, out treelist);

            if (treelist != null)
            {
                return(treelist);
            }
            else
            {
                treelist = new DevExpress.XtraTreeList.TreeList();
                ProjectTreeLists.Add(projectID, treelist);
                // Global.TreeManager.BindProjectData();
                return(treelist);
            }
        }
Exemplo n.º 5
0
        public PropertyControl GetActivePropCtl(string dwgname)
        {
            string projectID = DwgFilesId.ContainsKey(dwgname) ? DwgFilesId[dwgname] : null;

            if (projectID == null)
            {
                return(null);
            }
            PropertyControl propertyControl = null;

            PropControls.TryGetValue(projectID, out propertyControl);

            if (propertyControl != null)
            {
                return(propertyControl);
            }
            else
            {
                BindPaletteSet.BindPropertyControl(out propertyControl);
                PropControls.Add(projectID, propertyControl);
                return(propertyControl);
            }
        }