Canguro.Commands.Load.AddForceLoadCmd.Run C# (CSharp) Метод

Run() публичный Метод

Executes the command. Asks the user for parameters and adds a Force Load to all Selected Joints.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
Результат void
        public override void Run(Canguro.Controller.CommandServices services)
        {
            ForceLoad load = new ForceLoad();

            //services.GetProperties(Title, load, false);

            if (Canguro.Controller.Grid.LoadEditFrm.EditLoad(load) == System.Windows.Forms.DialogResult.OK)
            {

                List<Item> selection = services.GetSelection();

                foreach (Item item in selection)
                {
                    if (item is Joint)
                        ((Joint)item).Loads.Add((ForceLoad)load.Clone());
                }
                services.Model.ChangeModel();
            }
        }
AddForceLoadCmd