Network Programing_ll_Tugas latihan aplikasi biliing warnet ceria
Codingan Aplikasi Biling Ceria
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;
using System.Diagnostics;
namespace Np_II_Latihan_Billing_Warnet_Ceria
{
public partial class Form1 : Form
{
private Stopwatch wkt = null;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if(textBox1.Text!="")
{
wkt = new Stopwatch();
if(button1.Text == "LOGIN")
{
if(radioButton1.Checked)
{
label5.Text = "1 jam";
}
else if(radioButton2.Checked)
{
label5.Text = "5 jam";
}
else if(radioButton3.Checked)
{
label5.Text = "2 jam";
}
else if(radioButton4.Checked)
{
label5.Text = "4 jam";
}
label6.Visible = true;
wkt.Start();
button1.Text = "STOP";
label5.Visible = true;
button1.Text = "STOP";
}
else if(button1.Text == "STOP")
{
wkt.Start();
if(radioButton1.Checked)
{
MessageBox.Show("Jumlah tagihan anda sebesar Rp 2000","Total Tagihan Paket Regular");
}
if(radioButton2.Checked)
{
MessageBox.Show("Jumlah tagihan anda sebesar Rp 9000","Total Tagihan Paket Hemat");
}
if(radioButton3.Checked)
{
MessageBox.Show("Jumlah tagihan anda sebesar Rp 5000","Total Tagihan Paket Game 1");
}
if(radioButton4.Checked)
{
MessageBox.Show("Jumlah tagihan anda sebesar Rp 9000","Total Tagihan Paket Game 2");
}
wkt.Reset();
label6.Visible = false;
button1.Text = "LOGIN";
textBox1.Text = null;
textBox2.Text = "Rp";
}
}
else if(textBox1.Text =="")
{
MessageBox.Show("Nama Harus Diisi!!!","Important Message");
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if(wkt!=null)
{
label6.Text = wkt.Elapsed.ToString(@"hh\:mm\:ss");
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label5_Click(object sender, EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}
Hasil Debuging
Bukti Harga Yang Dibayar
Tidak ada komentar:
Posting Komentar