/// <summary> /// Executes the command. /// Asks the User for parameters and adds the Load to all selected Joints. /// </summary> /// <param name="services">CommandServices object to interact with the system</param> public override void Run(Canguro.Controller.CommandServices services) { GroundDisplacementLoad load = new GroundDisplacementLoad(); services.GetProperties(Title, load); Joint joint; while ((joint = services.GetJoint()) != null) { // TODO: Checar validez joint.Loads.Add(load); // Para que se refleje el cambio inmediatamente services.Model.ChangeModel(); } }
public override void Run(Canguro.Controller.CommandServices services) { GroundDisplacementLoad load = new GroundDisplacementLoad(); //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((GroundDisplacementLoad)load.Clone()); } } } }