Esempio n. 1
0
        //a DragDropElement konstruktorával együtt jön létre
        public DragDropElementController(IInputModel inputModel, KinectRegion kinectRegion)
        {
            _inputModel      = inputModel as ManipulatableModel;
            _kinectRegion    = kinectRegion;
            _dragDropElement = _inputModel.Element as DragDropElement;


            //mozgatás kezdete
            _inputModel.ManipulationStarted += OnManipulationStarted;
            //mozgatás közben
            _inputModel.ManipulationUpdated += OnManipulationUpdated;
            //mozgatás végén
            _inputModel.ManipulationCompleted += OnManipulationCompleted;
        }
Esempio n. 2
0
        //destruktor
        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;
            }
        }