Esempio n. 1
0
        private void Form3_Load(object sender, EventArgs e)
        {
            Pisava3(f3);
            switch (f3)
            {
            case "Regular":
                label1.Font = new Font(label1.Font, FontStyle.Regular);
                label2.Font = new Font(label2.Font, FontStyle.Regular);
                label3.Font = new Font(label3.Font, FontStyle.Regular);
                label4.Font = new Font(label4.Font, FontStyle.Regular);
                label5.Font = new Font(label5.Font, FontStyle.Regular);
                label6.Font = new Font(label6.Font, FontStyle.Regular);
                label7.Font = new Font(label7.Font, FontStyle.Regular);
                label8.Font = new Font(label8.Font, FontStyle.Regular);

                textBox1.Font     = new Font(textBox1.Font, FontStyle.Regular);
                textBox2.Font     = new Font(textBox2.Font, FontStyle.Regular);
                textBox3.Font     = new Font(textBox3.Font, FontStyle.Regular);
                textBox4.Font     = new Font(textBox4.Font, FontStyle.Regular);
                textBox5.Font     = new Font(textBox5.Font, FontStyle.Regular);
                comboBox1.Font    = new Font(comboBox1.Font, FontStyle.Regular);
                radioButton1.Font = new Font(radioButton1.Font, FontStyle.Regular);
                radioButton2.Font = new Font(radioButton2.Font, FontStyle.Regular);

                Form6.Pisava6(f3);
                Form2.Pisava2(f3);
                Form1.Pisava(f3);
                Form4.Pisava4(f3);
                break;

            case "Italic":
                label1.Font = new Font(label1.Font, FontStyle.Italic);
                label2.Font = new Font(label2.Font, FontStyle.Italic);
                label3.Font = new Font(label3.Font, FontStyle.Italic);
                label4.Font = new Font(label4.Font, FontStyle.Italic);
                label5.Font = new Font(label5.Font, FontStyle.Italic);
                label6.Font = new Font(label6.Font, FontStyle.Italic);
                label7.Font = new Font(label7.Font, FontStyle.Italic);
                label8.Font = new Font(label8.Font, FontStyle.Italic);

                textBox1.Font     = new Font(textBox1.Font, FontStyle.Italic);
                textBox2.Font     = new Font(textBox2.Font, FontStyle.Italic);
                textBox3.Font     = new Font(textBox3.Font, FontStyle.Italic);
                textBox4.Font     = new Font(textBox4.Font, FontStyle.Italic);
                textBox5.Font     = new Font(textBox5.Font, FontStyle.Italic);
                comboBox1.Font    = new Font(comboBox1.Font, FontStyle.Italic);
                radioButton1.Font = new Font(radioButton1.Font, FontStyle.Italic);
                radioButton2.Font = new Font(radioButton2.Font, FontStyle.Italic);

                Form6.Pisava6(f3);
                Form2.Pisava2(f3);
                Form1.Pisava(f3);
                Form4.Pisava4(f3);
                break;

            case "Bold":
                label1.Font = new Font(label1.Font, FontStyle.Bold);
                label2.Font = new Font(label2.Font, FontStyle.Bold);
                label3.Font = new Font(label3.Font, FontStyle.Bold);
                label4.Font = new Font(label4.Font, FontStyle.Bold);
                label5.Font = new Font(label5.Font, FontStyle.Bold);
                label6.Font = new Font(label6.Font, FontStyle.Bold);
                label7.Font = new Font(label7.Font, FontStyle.Bold);
                label8.Font = new Font(label8.Font, FontStyle.Bold);

                textBox1.Font     = new Font(textBox1.Font, FontStyle.Bold);
                textBox2.Font     = new Font(textBox2.Font, FontStyle.Bold);
                textBox3.Font     = new Font(textBox3.Font, FontStyle.Bold);
                textBox4.Font     = new Font(textBox4.Font, FontStyle.Bold);
                textBox5.Font     = new Font(textBox5.Font, FontStyle.Bold);
                comboBox1.Font    = new Font(comboBox1.Font, FontStyle.Bold);
                radioButton1.Font = new Font(radioButton1.Font, FontStyle.Bold);
                radioButton2.Font = new Font(radioButton2.Font, FontStyle.Bold);

                Form6.Pisava6(f3);
                Form2.Pisava2(f3);
                Form1.Pisava(f3);
                Form4.Pisava4(f3);
                break;

            case "Underline":
                label1.Font = new Font(label1.Font, FontStyle.Underline);
                label2.Font = new Font(label2.Font, FontStyle.Underline);
                label3.Font = new Font(label3.Font, FontStyle.Underline);
                label4.Font = new Font(label4.Font, FontStyle.Underline);
                label5.Font = new Font(label5.Font, FontStyle.Underline);
                label6.Font = new Font(label6.Font, FontStyle.Underline);
                label7.Font = new Font(label7.Font, FontStyle.Underline);
                label8.Font = new Font(label8.Font, FontStyle.Underline);

                textBox1.Font     = new Font(textBox1.Font, FontStyle.Underline);
                textBox2.Font     = new Font(textBox2.Font, FontStyle.Underline);
                textBox3.Font     = new Font(textBox3.Font, FontStyle.Underline);
                textBox4.Font     = new Font(textBox4.Font, FontStyle.Underline);
                textBox5.Font     = new Font(textBox5.Font, FontStyle.Underline);
                comboBox1.Font    = new Font(comboBox1.Font, FontStyle.Underline);
                radioButton1.Font = new Font(radioButton1.Font, FontStyle.Underline);
                radioButton2.Font = new Font(radioButton2.Font, FontStyle.Underline);

                Form6.Pisava6(f3);
                Form2.Pisava2(f3);
                Form1.Pisava(f3);
                Form4.Pisava4(f3);
                break;
            }

            Ozadje3(o3);
            switch (o3)
            {
            case "Pink":
                BackColor = Color.HotPink;
                Form6.Ozadje6(o3);
                Form2.Ozadje2(o3);
                Form1.Ozadje(o3);
                Form4.Ozadje4(o3);
                break;

            case "Bela":
                BackColor = Control.DefaultBackColor;
                Form6.Ozadje6(o3);
                Form2.Ozadje2(o3);
                Form1.Ozadje(o3);
                Form4.Ozadje4(o3);
                break;

            case "Oranžna":
                BackColor = Color.Orange;
                Form6.Ozadje6(o3);
                Form2.Ozadje2(o3);
                Form1.Ozadje(o3);
                Form4.Ozadje4(o3);
                break;

            case "Rumena":
                BackColor = Color.Yellow;
                Form6.Ozadje6(o3);
                Form2.Ozadje2(o3);
                Form1.Ozadje(o3);
                Form4.Ozadje4(o3);
                break;
            }


            using (NpgsqlConnection con = new NpgsqlConnection("Server=dumbo.db.elephantsql.com; User Id=ejdvbvlw;" + "Password=oLgUkOCXPTKG_2bvDFB1NnSPgp3tcDxj; Database=ejdvbvlw;"))
            {
                con.Open();
                NpgsqlCommand    com    = new NpgsqlCommand("SELECT * FROM return_vsi_kraji()", con);
                NpgsqlDataReader reader = com.ExecuteReader();
                while (reader.Read())
                {
                    string ime = reader.GetString(0);
                    comboBox1.Items.Add(ime);
                    comboBox1.Text = "Adlešiči";
                }
                con.Close();
            }
        }
Esempio n. 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Pisava(f2);
            switch (f2)
            {
            case "Regular":
                label1.Font = new Font(label1.Font, FontStyle.Regular);
                label2.Font = new Font(label2.Font, FontStyle.Regular);

                Form6.Pisava6(f2);
                Form2.Pisava2(f2);
                Form3.Pisava3(f2);
                Form4.Pisava4(f2);
                break;

            case "Bold":
                label1.Font = new Font(label1.Font, FontStyle.Bold);
                label2.Font = new Font(label2.Font, FontStyle.Bold);

                Form6.Pisava6(f2);
                Form2.Pisava2(f2);
                Form3.Pisava3(f2);
                Form4.Pisava4(f2);
                break;

            case "Italic":
                label1.Font = new Font(label1.Font, FontStyle.Italic);
                label2.Font = new Font(label2.Font, FontStyle.Italic);

                Form6.Pisava6(f2);
                Form2.Pisava2(f2);
                Form3.Pisava3(f2);
                Form4.Pisava4(f2);
                break;

            case "Underline":
                label1.Font = new Font(label1.Font, FontStyle.Underline);
                label2.Font = new Font(label2.Font, FontStyle.Underline);

                Form6.Pisava6(f2);
                Form2.Pisava2(f2);
                Form3.Pisava3(f2);
                Form4.Pisava4(f2);
                break;
            }

            Ozadje(o2);
            switch (o2)
            {
            case "Pink":
                BackColor = Color.HotPink;

                Form6.Ozadje6(o2);
                Form2.Ozadje2(o2);
                Form3.Ozadje3(o2);
                Form4.Ozadje4(o2);
                break;

            case "Bela":
                BackColor = Control.DefaultBackColor;

                Form6.Ozadje6(o2);
                Form2.Ozadje2(o2);
                Form3.Ozadje3(o2);
                Form4.Ozadje4(o2);
                break;

            case "Oranžna":
                BackColor = Color.Orange;

                Form6.Ozadje6(o2);
                Form2.Ozadje2(o2);
                Form3.Ozadje3(o2);
                Form4.Ozadje4(o2);
                break;

            case "Rumena":
                BackColor = Color.Yellow;

                Form6.Ozadje6(o2);
                Form2.Ozadje2(o2);
                Form3.Ozadje3(o2);
                Form4.Ozadje4(o2);
                break;
            }

            ImeOsebe(mail);
            if (mail != null && mail != "")
            {
                using (NpgsqlConnection con = new NpgsqlConnection("Server=dumbo.db.elephantsql.com; User Id=ejdvbvlw;" + "Password=oLgUkOCXPTKG_2bvDFB1NnSPgp3tcDxj; Database=ejdvbvlw;"))
                {
                    con.Open();
                    NpgsqlCommand    com    = new NpgsqlCommand("SELECT * FROM vrni_ime_priimek ('" + mail + "')", con);
                    NpgsqlDataReader reader = com.ExecuteReader();
                    while (reader.Read())
                    {
                        string ime     = reader.GetString(0);
                        string priimek = reader.GetString(1);
                        label2.Text = "Prijavljeni ste kot " + ime + " " + priimek;
                        if (ime != null && priimek != null)
                        {
                            Form2.User(ime, priimek);
                            Form2.Mail(mail);
                        }
                    }

                    con.Close();
                }
                button1.Visible   = true;
                Btn_Reg.Visible   = false;
                Btn_Login.Visible = false;
            }

            else if (mail is null || mail == "")
            {
                label2.Text = "Niste prijavljeni";
                n           = "";
                m           = "";
                Form2.User(n, m);
                button1.Visible   = false;
                Btn_Reg.Visible   = true;
                Btn_Login.Visible = true;
            }
Esempio n. 3
0
        private void Form5_Load(object sender, EventArgs e)
        {
            Ozadje5(o5);
            Pisava5(f5);

            switch (f5)
            {
            case "Regular":
                textBox1.Font = new Font(textBox1.Font, FontStyle.Regular);
                label1.Font   = new Font(label1.Font, FontStyle.Regular);

                Form4.Pisava4(f5);
                break;

            case "Bold":
                textBox1.Font = new Font(textBox1.Font, FontStyle.Bold);
                label1.Font   = new Font(label1.Font, FontStyle.Bold);

                Form4.Pisava4(f5);
                break;

            case "Underline":
                textBox1.Font = new Font(textBox1.Font, FontStyle.Underline);
                label1.Font   = new Font(label1.Font, FontStyle.Underline);

                Form4.Pisava4(f5);
                break;

            case "Italic":
                textBox1.Font = new Font(textBox1.Font, FontStyle.Italic);
                label1.Font   = new Font(label1.Font, FontStyle.Italic);

                Form4.Pisava4(f5);
                break;
            }

            switch (o5)
            {
            case "Bela":
                BackColor = Control.DefaultBackColor;

                Form4.Ozadje4(o5);
                break;

            case "Pink":
                BackColor = Color.HotPink;

                Form4.Ozadje4(o5);
                break;

            case "Oranžna":
                BackColor = Color.Orange;

                Form4.Ozadje4(o5);
                break;

            case "Rumena":
                BackColor = Color.Yellow;

                Form4.Ozadje4(o5);
                break;
            }
        }