diff options
| author | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-23 13:38:40 -0400 |
| commit | 3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch) | |
| tree | 0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs | |
| parent | 99fef5c57360f07259fc86f433bed8a9ab59c48e (diff) | |
| download | histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2 histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip | |
Renaming the game!
Diffstat (limited to 'Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs')
| -rw-r--r-- | Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs new file mode 100644 index 0000000..9facd7b --- /dev/null +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + + +namespace Histacom2.OS.Win95.Win95Apps +{ + public partial class FRMWinClassicAddressBookNewContact : UserControl + { + public AddressBookContact toSet = new AddressBookContact(); + public FRMWinClassicAddressBookNewContact() + { + InitializeComponent(); + Program.AddressBookSelectedContact = null; + } + + private void button2_Click(object sender, EventArgs e) + { + pnlAdd.Show(); + pnlAdd.BringToFront(); + } + + private void button1_Click(object sender, EventArgs e) + { + if (txtFirst.Text != "" && txtMiddle.Text != "" && txtLast.Text != "") + { + toSet.FirstName = txtFirst.Text; + toSet.MiddleName = txtMiddle.Text; + toSet.LastName = txtLast.Text; + + Program.AddressBookSelectedContact = toSet; + ((Form)this.TopLevelControl).Close(); + } else { + MessageBox.Show("Please fill out the First, Middle and Last name."); + } + } + + private void button4_Click(object sender, EventArgs e) + { + emails.Items.Add(textBox1.Text); + toSet.Emails.Add(textBox1.Text); + emails.BringToFront(); + } + + private void FRMWinClassicAddressBookNewContact_Load(object sender, EventArgs e) + { + if (toSet != null) + { + txtFirst.Text = toSet.FirstName; + txtMiddle.Text = toSet.MiddleName; + txtLast.Text = toSet.LastName; + if (toSet.Emails != null) + { + foreach (string email in toSet.Emails) + { + emails.Items.Add(email); + } + } + } else + { + MessageBox.Show("NULL CONTACT!"); + } + } + } +} |
