Canguro.Controller.Controller.endModelCommand C# (CSharp) 메소드

endModelCommand() 개인적인 메소드

Method called when a model command ends or is cancelled
private endModelCommand ( ) : void
리턴 void
        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);
        }