/// <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());
                 }
             }
        }
        private void readLoadGroundDisplacements(XmlNode node)
        {
            uint id = uint.Parse(readAttribute(node, "Joint", "0"));
            string lcName = readAttribute(node, "LoadCase", "").Trim();
            lcName = (lcName.Length > 0) ? lcName : Culture.Get("Case");
            LoadCase lCase = model.LoadCases[lcName];
            Joint obj = model.JointList[id];

            if (obj != null && lCase != null)
            {
                AssignedLoads loads = obj.Loads;
                //                readAttribute(node, "CoordSys", "GLOBAL");
                GroundDisplacementLoad load = new GroundDisplacementLoad();
                load.Tx = float.Parse(readAttribute(node, "U1", "0"));
                load.Ty = float.Parse(readAttribute(node, "U2", "0"));
                load.Tz = float.Parse(readAttribute(node, "U3", "0"));
                load.Rx = model.UnitSystem.Rad2Deg(float.Parse(readAttribute(node, "R1", "0")));
                load.Ry = model.UnitSystem.Rad2Deg(float.Parse(readAttribute(node, "R2", "0")));
                load.Rz = model.UnitSystem.Rad2Deg(float.Parse(readAttribute(node, "R3", "0")));
                loads.Add(load, lCase);
            }
        }