Canguro.Commands.Model.JoinCmd.Run C# (CSharp) Méthode

Run() public méthode

Executes the command. Executes Join with all the Items and asks to renumber the JointList and LineList objects.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
Résultat void
        public override void Run(Canguro.Controller.CommandServices services)
        {
            Join(services.Model, services.Model.JointList, services.Model.LineList, services.Model.AreaList);
            RepairJoints(services.Model);

            string msg = "";
            bool conn;
            Canguro.Utility.AnalysisUtils.CanAnalyze(services.Model, ref msg, out conn);
            services.Model.ChangeModel();
            msg = Culture.Get("confirmCompactIDs");
            if (!conn)
                msg = Culture.Get("structureIsDisconnectedWrn") + "\n\n" + msg;

            if (System.Windows.Forms.MessageBox.Show(msg, Culture.Get("confirm"),
                System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
            {
                services.Model.JointList.Compact();
                services.Model.LineList.Compact();
                services.Model.AreaList.Compact();
            }

            services.Model.ChangeModel();
        }