public DragDropElementController(IInputModel inputModel, KinectRegion kinectRegion) { _inputModel = inputModel as ManipulatableModel; _kinectRegion = kinectRegion; _dragDropElement = _inputModel.Element as DragDropElement; _inputModel.ManipulationStarted += OnManipulationStarted; _inputModel.ManipulationUpdated += OnManipulationUpdated; _inputModel.ManipulationCompleted += OnManipulationCompleted; }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { _kinectRegion = null; _inputModel = null; _dragDropElement = null; _inputModel.ManipulationStarted -= OnManipulationStarted; _inputModel.ManipulationUpdated -= OnManipulationUpdated; _inputModel.ManipulationCompleted -= OnManipulationCompleted; _disposedValue = true; } }