private void OnValidate(object sender, EventArgs e) { try { double phi = 0.8; EllipticFunction f = new EllipticFunction(0.3, 0.4, 0.7, 0.6); f.Reset(0.2, 0.3, 0.8, 0.7); f = new EllipticFunction(0.3, 0.4); f.Reset(0.2, 0.3); double cn, sn, dn; f.sncndn(0.3, out sn, out cn, out dn); f.Delta(sn, cn); f.D(); f.D(phi); f.D(sn, cn, dn); f.Pi(); f.Pi(phi); f.Pi(sn, cn, dn); f.KE(); f.K(); f.H(); f.H(phi); f.H(sn, cn, dn); f.G(); f.G(phi); f.G(sn, cn, dn); f.F(phi); f.F(sn, cn, dn); f.Einv(0.75); f.Ed(60.0); f.E(); f.E(phi); f.E(sn, cn, dn); double tau = 3.1415927 / 10.0; f.deltaEinv(Math.Sin(tau), Math.Cos(tau)); f.deltaD(sn, cn, dn); f.deltaE(sn, cn, dn); f.deltaF(sn, cn, dn); f.deltaG(sn, cn, dn); f.deltaH(sn, cn, dn); f.deltaPi(sn, cn, dn); } catch (Exception xcpt) { MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } MessageBox.Show("No errors detected", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information); }