private void cancel_Click(object sender, EventArgs e) { this.Close(); EventKinematicParams ekp = new EventKinematicParams(); ekp.v_block = -10.1; ReturnParams(this, ekp); }
private void ok_Click(object sender, EventArgs e) { this.Close(); EventKinematicParams ekp = new EventKinematicParams(); ekp.v_block = Convert.ToDouble(numericUpDown1.Value); ReturnParams(this, ekp); }
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) { EventKinematicParams ekp = new EventKinematicParams(); ekp.v_block = hScrollBar1.Value; RotateW(this, ekp); }
public void SetParams(int ID, EventKinematicParams e) { MechanismInfo mi = FindMechanismInfo(ID); if (mi.mechanism != null && e.v_block != -10.1) { if (mi.Number == 8) { Mechanism_8 old = mi.mechanism as Mechanism_8; Mechanism_8 new_m = new Mechanism_8(old.r1, old.R1, old.r2, old.l, e.v_block, old.Center, old.ID); mi.mechanism = new_m; } RestartMechanism(ID); StopMechanism(ID); DrawMechanism(ID); } }