public AddJoinedBodiesArgs(AddJointType jointType, AddJointBodyType body1Type, AddJointBodyType body2Type, double separationDistance) { this.JointType = jointType; this.Body1Type = body1Type; this.Body2Type = body2Type; this.SeparationDistance = separationDistance; }
private void Radio_Checked(object sender, RoutedEventArgs e) { try { if (!_isInitialized) { return; } // Combobox visibility AddJointType jointType = GetJointType(); switch (jointType) { case AddJointType.BallAndSocket: case AddJointType.Hinge: case AddJointType.Slider: case AddJointType.Corkscrew: case AddJointType.UniversalJoint: case AddJointType.Multi_BallAndChain: lblBody1.Content = "Body 1 Type"; lblBody1.Visibility = Visibility.Visible; cboBody1.Visibility = Visibility.Visible; lblBody2.Visibility = Visibility.Visible; cboBody2.Visibility = Visibility.Visible; break; case AddJointType.UpVector: case AddJointType.Multi_Tetrahedron: lblBody1.Content = "Body Type"; lblBody1.Visibility = Visibility.Visible; cboBody1.Visibility = Visibility.Visible; lblBody2.Visibility = Visibility.Collapsed; cboBody2.Visibility = Visibility.Collapsed; break; default: throw new ApplicationException("Unknown AddJointType: " + jointType.ToString()); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Hull Shape Radio", MessageBoxButton.OK, MessageBoxImage.Error); } }