//给文档添加一个映射ID public void MapProjectID(Document doc) { string path = doc.Name; if (!DwgFilesId.ContainsKey(path)) { DwgFilesId.Add(path, CheckDBFlag.GetDbFlag(doc)); } }
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"); } }
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); } }
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); } }
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); } }