Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (SQL.SqlReader("Uid", EmailField.Text, "Mac", SQL.sqlConnection))
     {
         this.Hide();
         Formelsamling formelsamling = new Formelsamling();
         TreeNode[]    treeNodes     = new TreeNode[] { new MathFormulary().treeNode, new PhysicsFormulary().treeNode, };
         formelsamling.funcList.Nodes.AddRange(treeNodes);
         formelsamling.Show();
         Print("did this");
     }
 }
Пример #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            //Form1 form = new Form1();
            //Login login = new Login();

            InternetAndSecurity internet = new InternetAndSecurity();

            internet.Run();

            SQL.SqlConnect();



            Login         login = new Login();
            Formelsamling form  = new Formelsamling();

            TreeNode[] treeNodes = new TreeNode[] { new MathFormulary().treeNode, new PhysicsFormulary().treeNode, };
            form.funcList.Nodes.AddRange(treeNodes);
            Application.Run(login);
            string email = login.EmailField.Text.ToLower();

            if (SQL.SqlReader(email, email, "Mac", SQL.sqlConnection))
            {
                Print("yeet");
            }
            else
            {
                Print("no yeet");
            }



            /*
             * switch (form.funcList.SelectedNode.ToString())
             * {
             *  case "cirkelomkreds":
             *
             *      break;
             *
             *
             * }*/
        }
Пример #3
0
        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;
            }
        }