public override void Initialize(IComponent component) { base.Initialize(component); if (component.Site != null) { this.selectionService = this.GetService(typeof(ISelectionService)) as ISelectionService; this.behaviorService = this.GetService(typeof(BehaviorService)) as BehaviorService; if ((this.behaviorService != null) && (this.selectionService != null)) { this.behavior = new FilterCutCopyPasteDeleteBehavior(true, this.behaviorService); this.UpdateBehavior(); this.selectionService.SelectionChanged += new EventHandler(this.selectionService_SelectionChanged); } } }
public override void Initialize(IComponent component) { this.initializing = true; base.Initialize(component); if (component.Site != null) { this.selectionService = this.GetService(typeof(ISelectionService)) as ISelectionService; this.behaviorService = this.GetService(typeof(BehaviorService)) as BehaviorService; if ((this.behaviorService != null) && (this.selectionService != null)) { this.behavior = new FilterCutCopyPasteDeleteBehavior(true, this.behaviorService); this.UpdateBehavior(); this.selectionService.SelectionChanged += new EventHandler(this.selectionService_SelectionChanged); } } this.initializing = false; }