protected virtual void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (_actionDispatcher != null)
                {
                    _actionDispatcher.Remove(_actionItem.Identifier);
                    _actionDispatcher = null;
                }

                StackPanelVerticalComponent.MouseEnter -= ButtonComponent_MouseEnter;
                StackPanelVerticalComponent.MouseLeave -= ButtonComponent_MouseLeave;
                ButtonComponent.Click     -= OnClick;
                DropButtonComponent.Click -= OnDropClick;

                if (_dropMenu != null)
                {
                    if (disposing)
                    {
                        _dropMenu.Dispose();
                    }
                    _dropMenu = null;
                }

                _disposed = true;
            }
        }
        public void Destroy()
        {
            _destroyed = true;
            if (_eventMediator != null)
            {
                _eventMediator.UnregisterEventHandler(ServerEntity.Identifier);

                _eventMediator.TileHasCaptureChanged -= EventBrokerTileHasCaptureChanged;
                _eventMediator = null;
            }

            if (_menu != null)
            {
                _menu.Dispose();
                _menu = null;
            }

            if (_fpsPublisher != null)
            {
                _fpsPublisher.Dispose();
                _fpsPublisher = null;
            }

            StopMouseMoveTimer();
        }
Beispiel #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (_actionDispatcher != null)
                {
                    _actionDispatcher.Remove(_actionItem.Identifier);
                    _actionDispatcher = null;
                }
                LayoutDropDownButton.MouseEnter -= ButtonComponent_MouseEnter;
                LayoutDropDownButton.MouseLeave -= ButtonComponent_MouseLeave;
                ButtonComponent.Click           -= OnDropClick;

                _popup.Dispose();
                _popup = null;

                _disposed = true;
            }
        }