Canguro.Controller.CommandServices.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            // Este funciona para dejar de recibir el input del SmallPanel independiente
            controller.MainFrm.SmallPanel.EnterData -= new Canguro.View.EnterDataEventHandler(onEnterData);
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Method called when a model command ends or is cancelled
        /// </summary>
        private void endModelCommand()
        {
            if (modelCmd != null)
            {
                modelCmd.Cancel = true;
            }

            mainFrm.ReportProgress("", 0, "", 0, DateTime.Now.AddMilliseconds(1));

            if (!mainFrm.SmallPanel.IsDisposed && !mainFrm.SmallPanel.Disposing)
            {
                mainFrm.SmallPanel.Stop();
            }

            mainFrm.HideCommandToolbox();

            Model.Model.Instance.Undo.Commit();

            modelCmd = null;
            if (services != null)
            {
                services.Dispose();
                services = null;
            }
            TrackingController.TrackingService = null;
            TrackingController.ResetStatus(Canguro.View.GraphicViewManager.Instance.ActiveView);
            TrackingController.SnapController.IsActive     = false;
            TrackingController.SnapController.PrimaryPoint = Snap.PointMagnet.ZeroMagnet;

            // Reset selection
            SelectionCommand.Start(null);
            viewCmd = SelectionCommand;
            mainFrm.ScenePanel.Cursor = viewCmd.Cursor;

            if (EndModelCommand != null)
            {
                EndModelCommand(this, EventArgs.Empty);
            }
        }