public ActionsSettingViewModel(MapCleanService service) { _service = service; // Create a ActionSelectViewModel. ActionSelectVM = new ActionSelectViewModel(service); // Create an EntitySelectViewModel EntitySelectVM = new EntitySelectViewModel(service); }
public CheckResultsViewModel(MapCleanService service) { _service = service; InitializeGroupVMs(); RegisterServiceEvents(); RegisterBrowserEvents(); RegisterMessages(); }
public static void UnionPolygons() { var stopWatch = new Stopwatch(); stopWatch.Start(); var currentDoc = Application.DocumentManager.MdiActiveDocument; var polylineIds = MapCleanService.GetAllVisiblePolylineObjectIds(currentDoc); var database = currentDoc.Database; var partitioner = new DrawingPartitioner(database); partitioner.Check(polylineIds); using (var transaction = database.TransactionManager.StartTransaction()) { var modelspaceId = SymbolUtilityServices.GetBlockModelSpaceId(database); var modelspace = (BlockTableRecord)transaction.GetObject(modelspaceId, OpenMode.ForWrite); foreach (var region in partitioner.IsolatedRegions) { var polyline = new Polyline(region.Contour.Count); int i = 0; foreach (var point in region.Contour) { polyline.AddVertexAt(i++, new Point2d(point.X, point.Y), 0, 0, 0); } polyline.Closed = true; polyline.ColorIndex = 3; modelspace.AppendEntity(polyline); transaction.AddNewlyCreatedDBObject(polyline, add: true); } transaction.Commit(); } stopWatch.Stop(); currentDoc.Editor.WriteMessage("\n图形分区花费{0}毫秒\n", stopWatch.ElapsedMilliseconds); }
public MapCleanPanelViewModel(MapCleanService service) { _service = service; CheckResultsVM = new CheckResultsViewModel(service); }
public LayersSelectViewModel(MapCleanService service, bool selectAll) { _service = service; IsSelectAll = selectAll; Initialize(selectAll); }
public EntitySelectViewModel(MapCleanService service) { _service = service; _layerSelectVM = new LayersSelectViewModel(_service, true); _fixLayerSelectVM = new LayersSelectViewModel(_service, false); }
public ActionSelectViewModel(MapCleanService service) { _service = service; Initialize(); }