private StatusCommandUI _statusCommandUI; // UI for setting the StatusBar Information.. /// <summary> /// Creates a new selection manager object. The selection manager manages all selection of all designers under the current form file. /// </summary> internal SelectionService(IServiceProvider provider) : base() { _provider = provider; _state = new BitVector32(); _events = new EventHandlerList(); _statusCommandUI = new StatusCommandUI(provider); }
internal SelectionService(IServiceProvider provider) { this._provider = provider; this._state = new BitVector32(); this._events = new EventHandlerList(); this._statusCommandUI = new StatusCommandUI(provider); }
void IDisposable.Dispose() { if (_selection != null) { if (GetService(typeof(IDesignerHost)) is IDesignerHost host) { host.TransactionOpened -= new EventHandler(this.OnTransactionOpened); host.TransactionClosed -= new DesignerTransactionCloseEventHandler(OnTransactionClosed); if (host.InTransaction) { OnTransactionClosed(host, new DesignerTransactionCloseEventArgs(true, true)); } } if (GetService(typeof(IComponentChangeService)) is IComponentChangeService cs) { cs.ComponentRemoved -= new ComponentEventHandler(OnComponentRemove); } _selection.Clear(); } _statusCommandUI = null; _provider = null; }
void IDisposable.Dispose() { if (this._selection != null) { IDesignerHost sender = this.GetService(typeof(IDesignerHost)) as IDesignerHost; if (sender != null) { sender.TransactionOpened -= new EventHandler(this.OnTransactionOpened); sender.TransactionClosed -= new DesignerTransactionCloseEventHandler(this.OnTransactionClosed); if (sender.InTransaction) { this.OnTransactionClosed(sender, new DesignerTransactionCloseEventArgs(true, true)); } } IComponentChangeService service = this.GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (service != null) { service.ComponentRemoved -= new ComponentEventHandler(this.OnComponentRemove); } this._selection.Clear(); } this._statusCommandUI = null; this._provider = null; }