Thursday, 20 August 2015

[Operator Logic] Contoh Code Aplikasi Sederhana dalam Implementasi Operasi Logika Pada C#

Hasil Aplikasi


Contoh Code Program / Aplikasi Warung



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

namespace OperatorLogikaRadioCheckBox
{
    public partial class Form1 : Form
    {
        string makan, minum;
        bool pesan_pressed = false;

        public Form1()
        {
            InitializeComponent();
        }

        public void thanks()
        {
            MessageBox.Show("Terima Kasih", "Thanks", MessageBoxButtons.OK);
        }

        private void radio_click(object sender, EventArgs e)
        {
            RadioButton b = (RadioButton)sender;
            makan = "- " + b.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (pesan_pressed == false)
            {
                pesan_pressed = true;
                thanks();
                makan_label.Text = makan;
                if (checkBox1.Checked)
                {
                    minum = minum + checkBox1.Text + "\r\t";
                }
                if (checkBox2.Checked)
                {
                    minum = minum + checkBox2.Text + "\r\t";
                }
                if (checkBox3.Checked)
                {
                    minum = minum + checkBox3.Text + "\r\t";
                }
                if (checkBox4.Checked)
                {
                    minum = minum + checkBox4.Text + "\r\t";
                }
                if (checkBox5.Checked)
                {
                    minum = minum + checkBox5.Text + "\r\t";
                }
                if (checkBox6.Checked)
                {
                    minum = minum + checkBox6.Text + "\r\t";
                }
                minum_label.Text = minum;
            }
            else
            {
                MessageBox.Show("Anda Sudah Memesan !", "Warning", MessageBoxButtons.OK);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            makan_label.Text = "";
            minum_label.Text = "";
            minum = "";
            pesan_pressed = false;
        }
    }
}




Download Aplikasinya Disini :


Download
Download Here
Click to Download

Artikel Terkait

[Operator Logic] Contoh Code Aplikasi Sederhana dalam Implementasi Operasi Logika Pada C#
4/ 5
Oleh

Berlangganan

Suka dengan artikel di atas? Silakan berlangganan gratis via email

Coretan Disqus

close
close