예제 #1
0
        ///-------------------------------------------------------------------------------------------------
        /// \fn public override void RegisterTool()
        ///
        /// \brief Registers the tool
        ///-------------------------------------------------------------------------------------------------

        public override void RegisterTool()
        {
            mainView.Cursor = Cursors.Default;
            base.RegisterTool();
            mainView.MouseClick += MainView_MouseClick;
            if (rotatingButton_mid == null)
            {
                rotatingButton_mid = new RotatingButton(mainView, new Point(100, 100), Cursors.SizeAll);
            }
        }
예제 #2
0
        ///-------------------------------------------------------------------------------------------------
        /// \fn public override void UnRegisterTool()
        ///
        /// \brief Un register tool
        ///-------------------------------------------------------------------------------------------------

        public override void UnRegisterTool()
        {
            base.UnRegisterTool();
            try
            {
                mainView.MouseClick       -= MainView_MouseClick;
                whichToBeRotated           = null;
                rotatingButton_mid.Visible = false;
                rotatingButton_mid.Dispose();
                rotatingButton_mid = null;
            }
            catch (NullReferenceException)
            {
                ;
            }
        }