0% found this document useful (0 votes)
25 views5 pages

23sa21a167-Restu Bagus Pambudi

Uploaded by

Rizki Fajar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

23sa21a167-Restu Bagus Pambudi

Uploaded by

Rizki Fajar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Tugas pemvis

Nama:Restu bagus pambudi

Nim:23SA21A167

Kelas:SI23E

 Desain aplikasi pengolah nilai

Code:
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 aplikasipengolahnilai_23SA21A167
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{
toolStripStatusLabel1.Text = DateTime.Now.ToString();

private void textBox2_TextChanged(object sender, EventArgs e)


{
}

private void btnMulai_Click(object sender, EventArgs e)


{

}
private void btnKeluar_Click(object sender, EventArgs e)
{
this.Close();
}

private void txtNilaiPresensi_TextChanged(object sender, EventArgs e)


{

private void btnMulai_Click_1(object sender, EventArgs e)


{
double nilai_presensi = 0;
double nilai_tugas = 0;
double nilai_uts = 0;
double nilai_uas = 0;
double rata_rata = 0;

nilai_presensi = Convert.ToInt32(txtNilaiPresensi.Text);
nilai_tugas = Convert.ToInt32(txtNilaiTugas.Text);
nilai_uts = Convert.ToInt32(txtNilaiUTS.Text);
nilai_uas = Convert.ToInt32(txtNilaiUAS.Text);

rata_rata = (nilai_presensi * 0.2) + (nilai_tugas * 0.3) +


(nilai_uts * 0.25) + (nilai_uas * 0.25);
if (nilai_presensi >= 0 && nilai_tugas >= 0 && nilai_uts >= 0 &&
nilai_uas >= 0)
{
int i;
progressBar1.Minimum = 0;
progressBar1.Maximum = 100;
for (i = 0; i <= 100; i++)
{
progressBar1.Value = i;
}
txtRataRata.Text = rata_rata.ToString();
}
}

private void btnKeluar_Click_1(object sender, EventArgs e)


{
this.Close();
}
}
}

 DESAIN KOTAK DIALOG


Code:
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 aplikasipengolahnilai_23SA21A167
{
public partial class Pilih_Nilai : Form
{
public Pilih_Nilai()
{
InitializeComponent();
}

private string filename;

private void Pilih_Nilai_Load(object sender, EventArgs e)


{
filename = null;
labelFile.Text = "File: Untitled";
textBox1.TabIndex = 0;
}

private void btnOpen_Click(object sender, EventArgs e)


{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
filename = openFileDialog1.FileName;
labelFile.Text = "File:" + filename;
textBox1.Text = System.IO.File.ReadAllText(filename);
}
}

private void btnColor_Click(object sender, EventArgs e)


{
if (colorDialog1.ShowDialog() == DialogResult.OK)
{
textBox1.ForeColor = colorDialog1.Color;
}
}

private void btnFont_Click(object sender, EventArgs e)


{
if (fontDialog1.ShowDialog() == DialogResult.OK)
{
textBox1.Font = fontDialog1.Font;
}
}
}
}

 Desain MDI

CODE:
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 aplikasipengolahnilai_23SA21A167
{
public partial class Form_Utama : Form
{
public Form_Utama()
{
InitializeComponent();
}

private void mnNilai_Click(object sender, EventArgs e)


{
Form1 f = new Form1();
f.Show();
f.MdiParent = this;
}

private void mnPilihNilai_Click(object sender, EventArgs e)


{
Pilih_Nilai f = new Pilih_Nilai();
f.Show();
f.MdiParent= this;
}

private void mnKeluar_Click(object sender, EventArgs e)


{
DialogResult dr = MessageBox.Show("Yakin mau keluar", "Keluar",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (dr == DialogResult.Yes)
{
Application.Exit();
}
else { }
}
}
}

You might also like