diff options
| author | Jason <[email protected]> | 2017-07-22 23:43:39 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-07-22 23:43:39 +0200 |
| commit | 5afd2ec6c6d7c458c1caffc55566d4365602c122 (patch) | |
| tree | b9e2c5f7861799b7b5f209046f97052493565734 /TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs | |
| parent | 7b12feef44adfcafd46d651adcd3e8fe11cb8523 (diff) | |
| parent | c97b5bddf841573e92c67fd2d325ca44825351f0 (diff) | |
| download | histacom2-5afd2ec6c6d7c458c1caffc55566d4365602c122.tar.gz histacom2-5afd2ec6c6d7c458c1caffc55566d4365602c122.tar.bz2 histacom2-5afd2ec6c6d7c458c1caffc55566d4365602c122.zip | |
Merge pull request #133 from Alex-TIMEHACK/master
Done a lot of work on the Windows ExplorerS
Diffstat (limited to 'TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs new file mode 100644 index 0000000..482d54c --- /dev/null +++ b/TimeHACK.Main/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 TimeHACK.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!"); + } + } + } +} |
