public void ShowPhysics() { PhysicsFormulary.PotentialEnergy potential = new PhysicsFormulary.PotentialEnergy(); PhysicsFormulary physicsFormulary = new PhysicsFormulary(); // loop through all formulas in the MathFormulary foreach (BaseFormula formula in physicsFormulary.formulas) { // if the current formula is the one selected if (formula.Name == funcList.SelectedNode.Text) { // set the current formula as the currentFormula or the selected formula currentFormula = formula; potential.Shared(); } // get out of loop break; } }
public void ShowMath() { SphereCircumference sphereCircumference = new SphereCircumference(); //sphereCircumference.Shared(); MathFormulary mathFormulary = new MathFormulary(); // loop through all formulas in the MathFormulary foreach (BaseFormula formula in mathFormulary.formulas) { // if the current formula is the one selected if (formula.Name == funcList.SelectedNode.Text) { // set the current formula as the currentFormula or the selected formula currentFormula = formula; sphereCircumference.Shared(); for (int i = 0; i < formula.VarCount; i++) { textBoxes.Add(new TextBox()); int usableSpace = 656 / (formula.VarCount + 1); TextBox text = new TextBox(); //text.Location = new Point(100, 100); Formelsamling form1 = new Formelsamling(); form1.Controls.Add(text); text.Visible = true; textBoxes[textBoxes.Count - 1].Location = new Point(usableSpace * (i + 1), 200); } foreach (TextBox txtBox in textBoxes) { Controls.Add(txtBox); } } // get out of loop break; } }