private void Class_Initialize() { INewLineFeedback pNewLineFeedback; bBegineMove = false; m_pOffsetTraceLine = new PolygonClass(); pNewLineFeedback = new NewLineFeedbackClass(); m_pSymbol = (ISimpleLineSymbol)pNewLineFeedback.Symbol; m_pGraph = new SegmentGraphClass(); //获得状态栏的服务 //m_pStatusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(WSGRI.DigitalFactory.Services.UltraStatusBarService)); }
public override void OnCreate(object hook) { _context = hook as IAppContext; this.m_caption = "跟踪"; this.m_category = "编辑器"; this.m_name = "Edit_FollowAlong"; this._key = "Edit_FollowAlong"; this.m_message = "跟踪"; this.m_toolTip = "跟踪"; this.m_bitmap = Properties.Resources.icon_edit_track; this.m_cursor = new System.Windows.Forms.Cursor(new MemoryStream(Resource.Digitise)); this.bool_2 = false; this.iconstructCurve_0 = new Polyline() as IConstructCurve; this.isimpleLineSymbol_0 = new SimpleLineSymbol(); this.isimpleLineSymbol_0.Width = 1.0; this.isegmentGraph_0 = new SegmentGraph(); DisplayStyleYT = DisplayStyleYT.Image; base.TextImageRelationYT = TextImageRelationYT.ImageAboveText; base.ToolStripItemImageScalingYT = ToolStripItemImageScalingYT.None; _itemType = RibbonItemType.Button; if (_context is IApplicationEvents) { (_context as IApplicationEvents).OnActiveHookChanged += new OnActiveHookChangedHandler(this.AppContext_ActiveHookChanged); } if (this.iactiveViewEvents_Event_0 != null) { try { this.iactiveViewEvents_Event_0.AfterDraw -= new IActiveViewEvents_AfterDrawEventHandler(ActiveView_AfterDraw); } catch { } } if (_context.FocusMap != null) { this.iactiveViewEvents_Event_0 = (_context.ActiveView as IActiveViewEvents_Event); this.iactiveViewEvents_Event_0.AfterDraw += new IActiveViewEvents_AfterDrawEventHandler(ActiveView_AfterDraw); this.snapHelper_0 = new SnapHelper(_context); } }