Esempio n. 1
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())
            {
                StartPosition = FormStartPosition.Manual,
                Location      = new System.Drawing.Point(Cursor.Position.X - 10, Cursor.Position.Y - 10)
            };

            listForm.ShowDialog(ParentForm);
            ModifiedJoint?.Invoke(nodes);
            this.UpdateJointList();
            currentlyEditing = false;
        }
Esempio n. 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;
        }