You are on page 1of 12

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Contents
Program 1.................................................................................... 2
Design....................................................................................... 2
Coding....................................................................................... 3
Implement................................................................................. 5
Program 2.................................................................................... 6
Design....................................................................................... 6
Coding....................................................................................... 7
Implement................................................................................. 8
Program 3.................................................................................... 9
Design....................................................................................... 9
Coding..................................................................................... 10
Implement...............................................................................12

WINDOWS PROGRAMMING (CIT 3194) Page 1

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Program 1
Design

WINDOWS PROGRAMMING (CIT 3194) Page 2

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Coding
Form1.cs
using
using
using
using
using
using
using
using

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

namespace Login
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label2_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "yussuf" && textBox2.Text == "1234")
{
Welcome obj = new Welcome();
obj.Show();
}
else
{
}

Wrong obj = new Wrong();


obj.Show();

}
private void button2_Click(object sender, EventArgs e)
{
Close();
}

private void button3_Click(object sender, EventArgs e)


{
textBox1.Clear();
textBox2.Clear();
}

WINDOWS PROGRAMMING (CIT 3194) Page 3

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)


}

Welcome.cs
using
using
using
using
using
using
using
using

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

namespace Login
{
public partial class Welcome : Form
{
public Welcome()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}

Wrong.cs
using
using
using
using
using
using
using
using

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

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

WINDOWS PROGRAMMING (CIT 3194) Page 4

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Implement

WINDOWS PROGRAMMING (CIT 3194) Page 5

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Program 2
Design

WINDOWS PROGRAMMING (CIT 3194) Page 6

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Coding
using
using
using
using
using
using
using
using

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

namespace Shape
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
checkBox1.Checked = false;
checkBox2.Checked = false;
rectangleShape1.Visible = checkBox3.Checked;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
checkBox2.Checked = false;
checkBox3.Checked = false;
ovalShape1.Visible = checkBox1.Checked;
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
checkBox1.Checked = false;
checkBox3.Checked = false;
ovalShape2.Visible = checkBox2.Checked;
}
}

WINDOWS PROGRAMMING (CIT 3194) Page 7

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Implement

WINDOWS PROGRAMMING (CIT 3194) Page 8

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Program 3
Design

WINDOWS PROGRAMMING (CIT 3194) Page 9

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Coding
using
using
using
using
using
using
using
using

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

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

private void comboBox1_SelectedIndexChanged(object sender, EventArgs


{
}
private void label7_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
int a = 0, b = 0, c = 0, d = 0, f = 0;
string grade;
a = int.Parse(textBox4.Text);
b = int.Parse(textBox5.Text);
c = int.Parse(textBox6.Text);

d = a + b + c;
textBox7.Text = d.ToString();
f = (a + b + c)/3;
textBox8.Text = f.ToString();
if (f >= 85)
{
textBox9.Text = "A+";
}
else if (f >= 75 && f < 85)
{
textBox9.Text = "A";
}
else if (f >= 70 && f < 75)

WINDOWS PROGRAMMING (CIT 3194) Page 10

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)


{

textBox9.Text = "B+";

}
else if (f >= 65 && f < 70)
{
textBox9.Text = "B";
}
else if (f >= 60 && f < 65)
{
textBox9.Text = "C+";
}
else if (f >= 55 && f < 60)
{
textBox9.Text = "C";
}
else if (f >= 50 && f < 55)
{
textBox9.Text = "D+";
}
else if (f >= 40 && f < 50)
{
textBox9.Text = "D";
}
else
{

textBox9.Text = "Fail";

}
}
private void button2_Click(object sender, EventArgs e)
{
textBox9.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox6.Clear();
textBox7.Clear();
textBox8.Clear();
}
}

WINDOWS PROGRAMMING (CIT 3194) Page 11

MOHAMED YUSSUF BIN JAHUBAR SATHIK (SCM-020140)

Implement

WINDOWS PROGRAMMING (CIT 3194) Page 12

You might also like