Wednesday, March 9, 2016

Reimond Weil Acabado



Login Codes

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (txtUsername.Text.Equals("Reimond") && txtPassword.Text.Equals("123"))
            {
                MessageBox.Show("Log in Succesful");
                this.Hide();
                MainMenu newForm = new MainMenu ();
                newForm.Show();

            }
            else
            {
                MessageBox.Show("Log In Failed!PLease Contact the Admin");
            }
        }
    }
}

Main Menu Codes

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class MainMenu : Form
    {
        public MainMenu()
        {
            InitializeComponent();
        }

        private void backgroundToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Background newForm = new Background();
            newForm.Show();
        }

        private void menuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Menu newForm = new Menu();
            newForm.Show();
        }

        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Login newForm = new Login();
            newForm.Show();
        }
    }
}

Background Codes


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Background : Form
    {
        public Background()
        {
            InitializeComponent();
        }

        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Login newForm = new Login();
            newForm.Show();
        }

        private void menuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Menu newForm = new Menu();
            newForm.Show();
        }
    }
}

Menu Codes

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Menu : Form
    {
        public Menu()
        {
            InitializeComponent();
        }

        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Login newForm = new Login();
            newForm.Show();
        }

        private void menuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Background newForm = new Background();
            newForm.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Double a = Convert.ToDouble(txtQuantity.Text);
            Double b = Convert.ToDouble(txtPrice.Text);
            Double Total = a * b;
            txtTotal.Text = Total.ToString();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            MainMenu newForm = new MainMenu();
            newForm.Show();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            txtName.Text = "Ala King Rice Bowl";
            txtPrice.Text = "99.00";
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            txtName.Text = "1pc Fully Loaded Meal";
            txtPrice.Text = "150.00";
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            txtName.Text = "Double Down G! Ala Carte";
            txtPrice.Text = "130.00";
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            txtName.Text = "Fully Loaded Bucket of Fries";
            txtPrice.Text = "150.00";
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            txtName.Text = "Spaghetti Fully Loaded Meal";
            txtPrice.Text = "180.00";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            txtName.Text = String.Empty;
            txtPrice.Text = String.Empty;
            txtQuantity.Text = String.Empty;
            txtTotal.Text = String.Empty;
        }
    }
}






Tuesday, March 8, 2016

Micah Ramos Lintag



Video

                                                

                                                                                Screenshot





Form 1

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string userss = "LintagMicah";
            string passss = "1234";
            if (textBox1.Text == userss && textBox2.Text == passss)
            {
                Form2 form2 = new Form2();
                form2.Show();
                this.Hide();

            }
        }
    }
}

Form 2

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 form1 = new Form1();
            form1.Show();
            this.Hide();
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Form3 form3 = new Form3();
            form3.Show();
            this.Hide();
        }
    }
}

Form 3

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Form3 : Form
    {
        bool meal1 = false;
        bool meal2 = false;
        bool meal3 = false;
        bool meal4 = false;
        bool meal5 = false;
        bool meal6 = false;
        bool meal7 = false;
        bool meal8 = false;
        bool meal9 = false;
        bool meal10 = false;
        bool meal11 = false;
        bool meal12 = false;
        bool meal13 = false;
        bool meal14 = false;
        bool meal15 = false;
        bool meal16 = false;
        bool meal17 = false;
        int valuemeal = 0;

        public Form3()
        {
            InitializeComponent();
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            
            
        }

       

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            meal1 = true;
            if (meal1 == true)
            {
                valuemeal = valuemeal + 79;
            }
        }

        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            meal2 = true;
            if (meal2 == true)
            {
                valuemeal = valuemeal + 99;
            }
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            meal3 = true;
            if (meal3 == true)
            {
                valuemeal = valuemeal + 99;
            }
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            meal4 = true;
            if (meal4 == true)
            {
                valuemeal = valuemeal + 99;
            }
        }

        private void checkBox5_CheckedChanged(object sender, EventArgs e)
        {
            meal5 = true;
            if (meal5 == true)
            {
                valuemeal = valuemeal + 150;
            }
        }

        private void checkBox6_CheckedChanged(object sender, EventArgs e)
        {
            meal6 = true;
            if (meal6 == true)
            {
                valuemeal = valuemeal + 179;
            }
        }

        private void checkBox7_CheckedChanged(object sender, EventArgs e)
        {
            meal7 = true;
            if (meal7 == true)
            {
                valuemeal = valuemeal + 179;
            }
        }

        private void checkBox8_CheckedChanged(object sender, EventArgs e)
        {
            meal8 = true;
            if (meal8 == true)
            {
                valuemeal = valuemeal + 179;
            }
        }

        private void checkBox9_CheckedChanged(object sender, EventArgs e)
        {
            meal9 = true;
            if (meal9 == true)
            {
                valuemeal = valuemeal + 199;
            }
        }

        private void checkBox10_CheckedChanged(object sender, EventArgs e)
        {
            meal10 = true;
            if (meal10 == true)
            {
                valuemeal = valuemeal + 199;
            }
        }

        private void checkBox11_CheckedChanged(object sender, EventArgs e)
        {
            meal11 = true;
            if (meal11 == true)
            {
                valuemeal = valuemeal + 199;
            }
        }

        private void checkBox12_CheckedChanged(object sender, EventArgs e)
        {
            meal12 = true;
            if (meal12 == true)
            {
                valuemeal = valuemeal + 199;
            }
        }

        private void checkBox13_CheckedChanged(object sender, EventArgs e)
        {
            meal13 = true;
            if (meal13 == true)
            {
                valuemeal = valuemeal + 189;
            }
        }

        private void checkBox14_CheckedChanged(object sender, EventArgs e)
        {
            meal14 = true;
            if (meal14 == true)
            {
                valuemeal = valuemeal + 189;
            }
        }

        private void checkBox15_CheckedChanged(object sender, EventArgs e)
        {
            meal15 = true;
            if (meal15 == true)
            {
                valuemeal = valuemeal + 189;
            }
        }

        private void checkBox16_CheckedChanged(object sender, EventArgs e)
        {
            meal16 = true;
            if (meal16 == true)
            {
                valuemeal = valuemeal + 189;
            }
        }

        private void checkBox17_CheckedChanged(object sender, EventArgs e)
        {
            meal17 = true;
            if (meal17 == true)
            {
                valuemeal = valuemeal + 25;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
           
                
                label2.Text = valuemeal.ToString();
            
        }
    }
}

                                                                                                                              


Mikee | 17 | BSIT | Braso

                                                                                                                             



Wednesday, March 2, 2016

Emata, Marc






________________________________________________________________________________________________________________________________


Welcome Screen
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Programming2_Finals
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
                
        }

        private void btn_form1_register_Click(object sender, EventArgs e)
        {
            RegWindow registerwindow = new RegWindow();
            registerwindow.Show();
            this.Hide();            
        }

        private void btn_form1_login_Click(object sender, EventArgs e)
        {
            LogWindow loginwindow = new LogWindow();
            loginwindow.Show();
            this.Hide(); 
        }
    }
}
________________________________________________________________________________________________________________________________


Register Form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Programming2_Finals
{
    public partial class RegWindow : Form
    {
        
        Boolean regwindow_regbutton = false;

        public RegWindow()
        {
            InitializeComponent();
        }

        private void btn_regwindow_login_Click(object sender, EventArgs e)
        {
            LogWindow loginwindow = new LogWindow();
            loginwindow.Show();
            this.Hide();
        }

        private void btn_regwindow_register_Click(object sender, EventArgs e)
        {
            regwindow_regbutton = true;
            string firstname = "";
            string lastname = "";
            string username = "";
            string password1 = "";
            string password2 = "";
            if (tbox_regwindow_username.Text != "" && tbox_regwindow_firstname.Text != "" && tbox_regwindow_lastname.Text != "" && tbox_regwindow_password1.Text != "" && tbox_regwindow_password2.Text != "")
            {
                if (regwindow_regbutton == true)
                {
                    firstname = tbox_regwindow_firstname.Text;
                    lastname = tbox_regwindow_lastname.Text;
                    username = tbox_regwindow_username.Text;
                    password1 = tbox_regwindow_password1.Text;
                    password2 = tbox_regwindow_password2.Text;
                    if (password1 == password2)
                    {
                        string[] usersdata = { "First Name:" + firstname, "Last Name:" + lastname, "Username:" + username, "Password:" + password1, "Password:" + password2 };
                        System.IO.File.WriteAllLines(@"C:\Users\emata\Desktop\Prog2Finals\Data\" + firstname + ".txt", usersdata);
                        MessageBox.Show("Hello " + firstname + ", you may now Login with your Username and Password", "REGISTERED");
                        string usersusername = tbox_regwindow_username.Text;
                        string userspassword = tbox_regwindow_password1.Text;
                        System.IO.File.WriteAllText(@"C:\Users\emata\Desktop\Prog2Finals\Users\Username\Username.txt", usersusername);
                        System.IO.File.WriteAllText(@"C:\Users\emata\Desktop\Prog2Finals\Users\Password\Password.txt", userspassword);
                    }
                    else
                    {
                        MessageBox.Show("Password does not match!", "PASSWORD ERROR");
                    }

                }
                else
                {
                    MessageBox.Show("Please fill up all forms", "ERROR");
                }
            }
            
            

        }

        private void tbox_regwindow_firstname_TextChanged(object sender, EventArgs e)
        {

        }

        private void RegWindow_Load(object sender, EventArgs e)
        {

        }


    }
}
________________________________________________________________________________________________________________________________


Login Screen
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Programming2_Finals
{
    public partial class LogWindow : Form
    {
        public LogWindow()
        {
            InitializeComponent();
        }

        private void btn_logwindow_login_Click(object sender, EventArgs e)
        {
            string username = System.IO.File.ReadAllText(@"C:\Users\emata\Desktop\Prog2Finals\Users\Username\Username.txt");
            string password = System.IO.File.ReadAllText(@"C:\Users\emata\Desktop\Prog2Finals\Users\Password\Password.txt");
            if (tbox_logwindow_username.Text == username && tbox_logwindow_password.Text == password)
            {
                ItemWindow itemswindow = new ItemWindow();
                itemswindow.Show();
                this.Hide();    
            }
            else
            {
                if (tbox_logwindow_username.Text != username && tbox_logwindow_password.Text != password)
                {
                    MessageBox.Show("Username and Password does not exist!", "LOGIN ERROR");
                }
                else if (tbox_logwindow_password.Text != password)
                {
                    MessageBox.Show("Invalid Password!", "LOGIN ERROR");
                }
                else if(tbox_logwindow_username.Text != username)
                {
                    MessageBox.Show("Invalid Username", "LOGIN ERROR");
                }
            }
        }

        private void btn_logwindow_register_Click(object sender, EventArgs e)
        {
            RegWindow regwindow = new RegWindow();
            regwindow.Show();
            this.Hide(); 
        }

        private void LogWindow_Load(object sender, EventArgs e)
        {

        }
    }
}
________________________________________________________________________________________________________________________________


Order
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Programming2_Finals
{
    public partial class ItemWindow : Form
    {
        Boolean chickenmeals = false;
        Boolean drinks = false;
        Boolean burgers = false;
        Boolean addons = false;
        Boolean pasta = false;
        Boolean condiments = false;
        int next = 1;
        string quantityfood = "";
        string typefood = "";
        string choicefood = "";
        public ItemWindow()
        {
            InitializeComponent();
        }

  

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbo_foods.Text == "Chicken Meals")
            {
                 chickenmeals = true;
                 drinks = false;
                 burgers = false;
                 addons = false;
                 pasta = false;
                 condiments = false;
                 next = 1;
                 cbo_type.Items.Add("Regular");
                 cbo_type.Items.Add("Spicy");                  
            }
            else if (cbo_foods.Text == "Drinks")
            {
                chickenmeals = false;
                drinks = true;
                burgers = false;
                addons = false;
                pasta = false;
                condiments = false;
                next = 1;
                cbo_type.Items.Add("Regular");
                cbo_type.Items.Add("1.5L");
                cbo_type.Items.Add("In Can");
            }
            else if (cbo_foods.Text == "Burgers")
            {
                chickenmeals = false;
                drinks = false;
                burgers = true;
                addons = false;
                pasta = false;
                condiments = false;
                next = 1;
                cbo_type.Items.Clear();
            }
            else if (cbo_foods.Text == "Add Ons")
            {
                chickenmeals = false;
                drinks = false;
                burgers = false;
                addons = true;
                pasta = false;
                condiments = false;
                next = 1;
                cbo_type.Items.Clear();
            }
            else if (cbo_foods.Text == "Pasta")
            {
                chickenmeals = false;
                drinks = false;
                burgers = false;
                addons = false;
                pasta = true;
                condiments = false;
                next = 1;
                cbo_type.Items.Clear();
            }
            else if (cbo_foods.Text == "Condiments")
            {
                chickenmeals = false;
                drinks = false;
                burgers = false;
                addons = false;
                pasta = false;
                condiments = true;
                next = 1;
                cbo_type.Items.Clear();
            }            
        }

        private void btn_next_Click(object sender, EventArgs e)
        {
            if (chickenmeals == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.BucketMeal;
                    next = 2;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Chicken;
                }
            }
            else if (drinks == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources._7up;
                    next = 2;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Coke;
                    next = 3;
                }
                else if (next == 3)
                {
                    picbox_pic.Image = Properties.Resources.Pepsi;
                    next = 4;
                }
                else if (next == 4)
                {
                    picbox_pic.Image = Properties.Resources.RootBeer;
                    next = 5;
                }
                else if (next == 5)
                {
                    picbox_pic.Image = Properties.Resources.Sprite;
                }
            }
            else if (burgers == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Programming2_Finals.Properties.Resources.Burger;
                }
            }
            else if (addons == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.GarlicBread;
                    next = 2;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Macaroni;
                    next = 3;
                }
                else if (next == 3)
                {
                    picbox_pic.Image = Properties.Resources.MashedPotatoes;
                    next = 4;
                }
                else if (next == 4)
                {
                    picbox_pic.Image = Properties.Resources.Rice;
                    next = 5;
                }
                else if (next == 5)
                {
                    picbox_pic.Image = Properties.Resources.Hotdog;
                }
                else if (pasta == true)
                {
                    if (next == 1)
                    {
                        picbox_pic.Image = Properties.Resources.Carbonara;
                        next = 2;
                    }
                    else if (next == 2)
                    {
                        picbox_pic.Image = Properties.Resources.Spaghetti;
                    }
                }
                else if (condiments == true)
                {
                    if (next == 1)
                    {
                        picbox_pic.Image = Properties.Resources.Gravy;
                        next = 2;
                    }
                    else if (next == 2)
                    {
                        picbox_pic.Image = Properties.Resources.Catsup;
                        next = 3;
                    }
                    else if (next == 3)
                    {
                        picbox_pic.Image = Properties.Resources.Mayonnaise;
                    }
                }
            }
        }

            
            

        private void btn_previous_Click(object sender, EventArgs e)
        {
            if (chickenmeals == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.BucketMeal;                
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Chicken;
                    next = 1;
                }
            }
            else if (drinks == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources._7up;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Coke;
                    next = 1;
                }
                else if (next == 3)
                {
                    picbox_pic.Image = Properties.Resources.Pepsi;
                    next = 2;
                }
                else if (next == 4)
                {
                    picbox_pic.Image = Properties.Resources.RootBeer;
                    next = 3;
                }
                else if (next == 5)
                {
                    picbox_pic.Image = Properties.Resources.Sprite;
                    next = 4;
                }
            }
            else if (burgers == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Programming2_Finals.Properties.Resources.Burger;
                }
            }
            else if (addons == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.GarlicBread;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Macaroni;
                    next = 1;
                }
                else if (next == 3)
                {
                    picbox_pic.Image = Properties.Resources.MashedPotatoes;
                    next = 2;
                }
                else if (next == 4)
                {
                    picbox_pic.Image = Properties.Resources.Rice;
                    next = 3;
                }
                else if (next == 5)
                {
                    picbox_pic.Image = Properties.Resources.Hotdog;
                    next = 4;
                }

                
            }
            else if (pasta == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.Carbonara;                    
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Spaghetti;
                    next = 1;
                }
            }
            else if (condiments == true)
            {
                if (next == 1)
                {
                    picbox_pic.Image = Properties.Resources.Gravy;
                }
                else if (next == 2)
                {
                    picbox_pic.Image = Properties.Resources.Catsup;
                    next = 1;
                }
                else if (next == 3)
                {
                    picbox_pic.Image = Properties.Resources.Mayonnaise;
                    next = 2;
                }
            }
        }

        private void cbo_type_SelectedIndexChanged(object sender, EventArgs e)
        {
            
        }

        private void cbo_qty_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void btn_add_Click(object sender, EventArgs e)
        {
            
            /*if (pic1 == picbox_pic.Image)
            {
                choicefood = "Bucket Meal";
            }*/
            quantityfood = cbo_qty.Text;
            typefood = cbo_type.Text;
            
            DialogResult dialogResult = MessageBox.Show("Do you want to add this to your cart?", "Add Items", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                lbox_menu.Items.Add(quantityfood + typefood + choicefood);
            }   
            else if (dialogResult == DialogResult.No)
            {
                
            }
        }

        private void ItemWindow_Load(object sender, EventArgs e)
        {

        }
        }
    }
________________________________________________________________________________________________________________________________



Name: Marc Angelo S. Emata
Course: BSIT - 1
Birthday: Aug 31, 1997
Favorite Programming Language: C# & Python
Hi there! My name is Marc. I know how to use Python(for personal use), C#(for school related), 
JavaFX(for making games related) and C++(I know how to read them but not to code). 
At the moment, I'm trying to understand how to use Java because my friend needs this in his exam.



WHAT I HATE THE MOST IS HTML! IF GIVEN A CHANCE? 
I'D RATHER IGNORE THAT SUBJECT. REALLY! 
WHY? WELL AT FIRST, I DON'T SEE ANY LOGIC THERE. 
IN C#, I CAN PLAY AROUND BUT IN HTML?  IT'S JUST THE END-USERS THAT MATTERS! OH HEY! IT'S ME :)