0% found this document useful (0 votes)
79 views2 pages

Source Code of Design Part - Encryption Decryption Project

This document contains code for a C# Windows Forms application that handles encryption and decryption of data. It includes namespaces and defines a Form class with methods for handling events from checkboxes that select an encryption or decryption operation. Checking different checkboxes changes button texts and images, hides and shows fields and buttons, and sets visibility of rich text boxes used for input and output data.

Uploaded by

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

Source Code of Design Part - Encryption Decryption Project

This document contains code for a C# Windows Forms application that handles encryption and decryption of data. It includes namespaces and defines a Form class with methods for handling events from checkboxes that select an encryption or decryption operation. Checking different checkboxes changes button texts and images, hides and shows fields and buttons, and sets visibility of rich text boxes used for input and output data.

Uploaded by

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

// namespaces used in this project 1st part

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

using System.Text;
using System.Windows.Forms;
//namespaces end

namespace ecryption___decryption_data
{

public partial class Form1 : Form


{
public Form1()
{
InitializeComponent();
//design begun
textBox3.PasswordChar = '*';
this.richTextBox1.Visible = false;
this.richTextBox2.Visible = false;
this.button4.Visible = false;
this.label3.Visible = false;
this.textBox4.Visible = false;
// end design
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)


{
// desing begun
if (checkBox1.Checked == true)
{
checkBox2.Enabled = false;
this.button3.Text = "Encryption";
this.button3.Image = global::ecryption___decryption_data.Properties.Resources.locked_lock;
this.button4.Text = "Encryption";
this.button4.Image = global::ecryption___decryption_data.Properties.Resources.locked_lock;
this.label2.Text = "Encryption operation was chosen";

}
else if (checkBox1.Checked == false)
{
checkBox2.Enabled = true;
}
// end desing
}

private void checkBox2_CheckedChanged(object sender, EventArgs e)


{
// desing begun
if (checkBox2.Checked == true)
{
checkBox1.Enabled = false;
this.button3.Text = "Decryption";
this.button3.Image =
global::ecryption___decryption_data.Properties.Resources.unlocked_lock;
this.button4.Text = "Decryption";
this.button4.Image =
global::ecryption___decryption_data.Properties.Resources.unlocked_lock;
this.label2.Text = "Decryption operation was chosen";

}
else if (checkBox1.Checked == false)
{
checkBox1.Enabled = true;
}
// end desing
}

private void checkBox3_CheckedChanged(object sender, EventArgs e)


{

//design begun
if (checkBox3.Checked == true)
{

textBox4.PasswordChar = '*';
this.richTextBox1.Visible = true;
this.richTextBox2.Visible = true;
this.button4.Visible = true;
this.label3.Visible = true;
this.textBox4.Visible = true;
//**********************************
this.button1.Visible = false;
this.button2.Visible = false;
this.button3.Visible = false;
this.textBox1.Visible = false;
this.textBox2.Visible = false;
this.textBox3.Visible = false;
this.label1.Visible = false;
//End design
}
else if (checkBox3.Checked == false)
{
this.richTextBox1.Visible = false;
this.richTextBox2.Visible = false;
this.button4.Visible = false;
this.label3.Visible = false;
this.textBox4.Visible = false;
//**********************************
this.button1.Visible = true;
this.button2.Visible = true;
this.button3.Visible = true;
this.textBox1.Visible = true;
this.textBox2.Visible = true;
this.textBox3.Visible = true;
this.label1.Visible = true;
}

//End design
}
}
}

You might also like