aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-05-20 09:19:29 -0400
committerGitHub <[email protected]>2017-05-20 09:19:29 -0400
commit6b6678c7667afd035ed959e2ddd56bc506d878c9 (patch)
treec20001bd412885f8c4082bec2634f4e4feb58251 /TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
parentc4578aa476699552fbb950fd536a757be7086977 (diff)
parent516928f112a8b646d81d99693fbbcd4e5c45b6e2 (diff)
downloadhistacom2-6b6678c7667afd035ed959e2ddd56bc506d878c9.tar.gz
histacom2-6b6678c7667afd035ed959e2ddd56bc506d878c9.tar.bz2
histacom2-6b6678c7667afd035ed959e2ddd56bc506d878c9.zip
Merge pull request #1 from TimeHACKDevs/master
Merge
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs70
1 files changed, 70 insertions, 0 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
new file mode 100644
index 0000000..4206f79
--- /dev/null
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs
@@ -0,0 +1,70 @@
+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.AddressBook
+{
+ 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!");
+ }
+ }
+ }
+}