Neha. It is lab 4

1 answer below ยป
Answered Same DayApr 07, 2021

Answer To: Neha. It is lab 4

Neha answered on Apr 10 2021
139 Votes
HomeFormApp/.vs/HomeFormApp/v15/.suo
HomeFormApp/.vs/HomeFormApp/v15/Server/sqlite3/db.lock
HomeFormApp/.vs/HomeFormApp/v15/Server/sqlite3/storage.ide
HomeFormApp/.vs/HomeFormApp/v15/Server/sqlite3/storage.ide-shm
HomeFormApp/.vs/HomeFormApp/v15/Server/sqlite3/storage.ide-wal
HomeFormApp/HomeFormApp.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1062
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HomeFormApp", "HomeFormApp\HomeFormApp.csproj", "{64C1A258-8FFF-4DAB-A0E9-7A3A91A3C1ED}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {64C1A258-8FFF-4DAB-A0E9-7A3A91A3C1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {64C1A258-8FFF-4DAB-A0E9-7A3A91A3C1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {64C1A258-8FFF-4DAB-A0E9-7A3A91A3C1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {64C1A258-8FFF-4DAB-A0E9-7A3A91A3C1ED}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {14D0AE8B-1E7B-420C-9677-BF2CA879D281}
    EndGlobalSection
EndGlobal
HomeFormApp/HomeFormApp/AccountForm.cs
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 AccountFormApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void saveChangesToolStripMenuItem_Click(object sender, EventArgs e)
{
if(userName.Text == "")
{
MessageBox.Show("User name can't be blank");
}
else if (pwd.Text == "")
{
MessageBox.Show("Password can't
be blank");
}
else if (fname.Text == "")
{
MessageBox.Show("First Name can't be blank");
}
else if (lname.Text == "")
{
MessageBox.Show("Last Name can't be blank");
}
else if (street.Text == "")
{
MessageBox.Show("Street field can't be blank");
}
else if (code.Text == "")
{
MessageBox.Show("Zip Code can't be blank");
}
else if (city.Text == "")
{
MessageBox.Show("City can't be blank");
}
else if (email.Text == "")
{
MessageBox.Show("Email field can't be blank");
}
else if (cell.Text == "")
{
MessageBox.Show("Cell field can't be blank");
}
else if (string.IsNullOrEmpty(state.Text))
{
MessageBox.Show("Please select state");
}
else
{
MessageBox.Show("Changes are saved");
}
}
private void closeToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
LoginApp.Form1 form = new LoginApp.Form1();
form.Show();
}
public void switchToModifyModeToolStripMenuItem_Click(object sender, EventArgs e)
{
userName.Enabled = true;
pwd.Enabled = true;
fname.Enabled = true;
lname.Enabled = true;
groupBox1.Enabled = true;
groupBox2.Enabled = true;
groupBox3.Enabled = true;
saveChangesToolStripMenuItem.Enabled = true;
}
public void switchToViewModeToolStripMenuItem_Click(object sender, EventArgs e)
{
userName.Enabled = false;
pwd.Enabled = false;
fname.Enabled = false;
lname.Enabled = false;
groupBox1.Enabled = false;
groupBox2.Enabled = false;
groupBox3.Enabled = false;
saveChangesToolStripMenuItem.Enabled = false;
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("This is an account registration form which allows view and modify operations");
}
private void userName_TextChanged(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
}
}
HomeFormApp/HomeFormApp/AccountForm.designer.cs
namespace AccountFormApp
{
partial class Form1
{
///
/// Required designer variable.
///

private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///

/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveChangesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.switchToViewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.switchToModifyModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.state = new System.Windows.Forms.ComboBox();
this.city = new System.Windows.Forms.TextBox();
this.code = new System.Windows.Forms.TextBox();
this.street = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.fb = new System.Windows.Forms.TextBox();
this.ig = new System.Windows.Forms.TextBox();
this.twitter = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.email = new System.Windows.Forms.TextBox();
this.cell = new System.Windows.Forms.TextBox();
this.userName = new System.Windows.Forms.TextBox();
this.lname = new System.Windows.Forms.TextBox();
this.pwd = new System.Windows.Forms.TextBox();
this.fname = new System.Windows.Forms.TextBox();
this.menuStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.editToolStripMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(882, 28);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked);
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.saveChangesToolStripMenuItem,
this.closeToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24);
this.fileToolStripMenuItem.Text = "File";
//
// saveChangesToolStripMenuItem
//
this.saveChangesToolStripMenuItem.Name = "saveChangesToolStripMenuItem";
this.saveChangesToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.saveChangesToolStripMenuItem.Text = "Save Changes";
this.saveChangesToolStripMenuItem.Click += new System.EventHandler(this.saveChangesToolStripMenuItem_Click);
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.closeToolStripMenuItem.Text = "Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.switchToViewModeToolStripMenuItem,
this.switchToModifyModeToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24);
this.editToolStripMenuItem.Text = "Edit";
//
// switchToViewModeToolStripMenuItem
//
this.switchToViewModeToolStripMenuItem.Name = "switchToViewModeToolStripMenuItem";
this.switchToViewModeToolStripMenuItem.Size = new System.Drawing.Size(239, 26);
this.switchToViewModeToolStripMenuItem.Text = "Switch to View Mode";
this.switchToViewModeToolStripMenuItem.Click += new System.EventHandler(this.switchToViewModeToolStripMenuItem_Click);
//
// switchToModifyModeToolStripMenuItem
//
this.switchToModifyModeToolStripMenuItem.Name = "switchToModifyModeToolStripMenuItem";
this.switchToModifyModeToolStripMenuItem.Size = new System.Drawing.Size(239, 26);
this.switchToModifyModeToolStripMenuItem.Text = "Switch to Modify Mode";
this.switchToModifyModeToolStripMenuItem.Click += new System.EventHandler(this.switchToModifyModeToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(53, 24);
this.helpToolStripMenuItem.Text = "Help";
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(125, 26);
this.aboutToolStripMenuItem.Text = "About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(21, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(83, 17);
this.label1.TabIndex = 1;
this.label1.Text = "User Name:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(30, 117);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(45, 17);
this.label2.TabIndex = 2;
this.label2.Text = "State:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(288, 120);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(69, 17);
this.label3.TabIndex = 3;
this.label3.Text = "Zip Code:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(43, 69);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 17);
this.label4.TabIndex = 4;
this.label4.Text = "City:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(33, 27);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(50, 17);
this.label5.TabIndex = 5;
this.label5.Text = "Street:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(435, 79);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(80, 17);
this.label6.TabIndex = 6;
this.label6.Text = "Last Name:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(435, 47);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 17);
this.label7.TabIndex = 7;
this.label7.Text = "First Name:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(22, 77);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(73, 17);
this.label8.TabIndex = 8;
this.label8.Text = "Password:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.state);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.city);
this.groupBox1.Controls.Add(this.code);
this.groupBox1.Controls.Add(this.street);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Location = new System.Drawing.Point(25, 125);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(827, 173);
this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Account Info";
//
// state
//
this.state.FormattingEnabled = true;
this.state.Items.AddRange(new object[] {
"California",
"Georgia",
"Idaho",
"Montana",
"West Virginia"});
this.state.Location = new System.Drawing.Point(112, 117);
this.state.Name = "state";
this.state.Size = new System.Drawing.Size(121, 24);
this.state.TabIndex = 21;
//
// city
//
this.city.Location = new System.Drawing.Point(112, 70);
this.city.Name = "city";
this.city.Size = new System.Drawing.Size(521, 22);
this.city.TabIndex = 18;
//
// code
//
this.code.Location = new System.Drawing.Point(390, 120);
this.code.Name = "code";
this.code.Size = new System.Drawing.Size(163, 22);
this.code.TabIndex = 19;
//
// street
//
this.street.Location = new System.Drawing.Point(112, 24);
this.street.Name = "street";
this.street.Size = new System.Drawing.Size(668, 22);
this.street.TabIndex = 20;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.fb);
this.groupBox2.Controls.Add(this.ig);
this.groupBox2.Controls.Add(this.twitter);
this.groupBox2.Location = new System.Drawing.Point(25, 476);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(827, 155);
this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Social Media";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(83, 110);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 17);
this.label11.TabIndex = 14;
this.label11.Text = "FB:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(86, 73);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(26, 17);
this.label12.TabIndex = 15;
this.label12.Text = "IG:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(60, 30);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(54, 17);
this.label13.TabIndex = 16;
this.label13.Text = "Twitter:";
//
// fb
//
this.fb.Location = new System.Drawing.Point(129, 110);
this.fb.Name = "fb";
this.fb.Size = new System.Drawing.Size(504, 22);
this.fb.TabIndex = 13;
//
// ig
//
this.ig.Location = new System.Drawing.Point(129, 71);
this.ig.Name = "ig";
this.ig.Size = new System.Drawing.Size(504, 22);
this.ig.TabIndex = 14;
//
// twitter
//
this.twitter.Location = new System.Drawing.Point(129, 28);
this.twitter.Name = "twitter";
this.twitter.Size = new System.Drawing.Size(504, 22);
this.twitter.TabIndex = 15;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label9);
this.groupBox3.Controls.Add(this.label10);
this.groupBox3.Controls.Add(this.email);
this.groupBox3.Controls.Add(this.cell);
this.groupBox3.Location = new System.Drawing.Point(25, 331);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(827, 116);
this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Contact Info";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(45, 65);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 17);
this.label9.TabIndex = 12;
this.label9.Text = "Cell:";
//
// label10
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here