Oglr.Canvas.handleInputWhenAddingAnEntity C# (CSharp) Method

handleInputWhenAddingAnEntity() private method

private handleInputWhenAddingAnEntity ( ) : void
return void
        void handleInputWhenAddingAnEntity( )
        {
            //mef: this might need to go back to the main Update method
            if( Constants.Instance.SnapToGrid || KeyboardStatus.IsKeyDown( Keys.G ) )
            {
                MouseStatus.WorldPosition = SnapToGrid( MouseStatus.WorldPosition ) ;
            }

            if( MouseStatus.IsNewRightMouseButtonClick( ) || KeyboardStatus.IsNewKeyPress( Keys.D3 ) )
            {
                //mef: delegate to current primitive plugin
                if( _entityCreation.StartedCreating )
                {
                    _entityCreation.StartedCreating = false ;
                    _entityCreation.ClearCurrentEditor( ) ;

                    //mef: implement
                    //switch (_currentPrimitiveName)
                    //{
                    //    case PrimitiveType.Rectangle:
                    //        //_mainForm.SetToolStripStatusLabel1(Resources.Rectangle_Entered);
                    //        break;
                    //    case PrimitiveType.Circle:
                    //        //_mainForm.SetToolStripStatusLabel1(Resources.Circle_Entered);
                    //        break;
                    //    case PrimitiveType.Path:
                    //        //_mainForm.SetToolStripStatusLabel1(Resources.Path_Entered);
                    //        break;
                    //}
                }
                else
                {
                    destroyPrimitiveBrush( ) ;
                    _entityCreation.StartedCreating = false ;
                }
            }

            if( _entityCreation.StartedCreating )
            {
                _entityCreation.CurrentEditor.UserInteractionDuringCreation( ) ;

                return ;
            }

            if( MouseStatus.IsNewLeftMouseButtonClick( ) || KeyboardStatus.IsNewKeyPress( Keys.D3 ) )
            {
                if( _entityCreation.StartedCreating == false )
                {
                    _entityCreation.StartedCreating = true ;
                    _entityCreation.CurrentEditor = buildPrimitiveEditorReadyForDesigning( _entityCreation.CreationProperties ) ;
                }
            }
        }