/// <summary>
        /// The <see cref="JointEditorEvent"/> to open up a <see cref="SensorListForm"/>
        /// </summary>
        /// <param name="node">The node connected to the joint to edit the sensors on</param>
        private void listSensors_Internal(List <RigidNode_Base> nodes)
        {
            if (nodes == null || nodes.Count != 1)
            {
                return;
            }
            RigidNode_Base node = nodes[0];

            if (node == null)
            {
                return;
            }

            currentlyEditing = true;
            SensorListForm listForm = new SensorListForm(node.GetSkeletalJoint());

            listForm.StartPosition = FormStartPosition.Manual;
            listForm.Location      = new System.Drawing.Point(Cursor.Position.X - 10, Cursor.Position.Y - 10);
            listForm.ShowDialog(ParentForm);
            if (ModifiedJoint != null)
            {
                ModifiedJoint(nodes);
            }
            this.UpdateJointList();
            currentlyEditing = false;
        }
示例#2
0
        /// <summary>
        /// The <see cref="JointEditorEvent"/> to open up a <see cref="SensorListForm"/>
        /// </summary>
        /// <param name="node">The node connected to the joint to edit the sensors on</param>
        private void ListSensors_Internal(List <RigidNode_Base> nodes)
        {
            if (nodes == null || nodes.Count != 1)
            {
                return;
            }
            RigidNode_Base node = nodes[0];

            if (node == null)
            {
                return;
            }

            currentlyEditing = true;
            SensorListForm listForm = new SensorListForm(node.GetSkeletalJoint());

            listForm.ShowDialog(ParentForm);
            ModifiedJoint?.Invoke(nodes);
            this.UpdateJointList();
            currentlyEditing = false;
        }