aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-07-02 16:31:46 +0100
committerGitHub <[email protected]>2017-07-02 16:31:46 +0100
commit3de51a2e1b9224e8a8355e3945e458e1651821a9 (patch)
treeec0016f90351794301e8eda68e77fb9766f5f9fb /TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs
parent69ae842e6e3193a27b0294f92784ef97eb69fb37 (diff)
parent99938de884fcf0dd572a330145dd91686268a45f (diff)
downloadhistacom2-3de51a2e1b9224e8a8355e3945e458e1651821a9.tar.gz
histacom2-3de51a2e1b9224e8a8355e3945e458e1651821a9.tar.bz2
histacom2-3de51a2e1b9224e8a8355e3945e458e1651821a9.zip
Merge pull request #108 from Alex-TIMEHACK/master
Made the Windows folder have SOMETHING in it
Diffstat (limited to 'TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs')
-rw-r--r--TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs71
1 files changed, 71 insertions, 0 deletions
diff --git a/TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs b/TimeHACK.Main/GlobalPrograms/AddressBook/FRMWinClassicAddressBookNewContact.cs
new file mode 100644
index 0000000..fe75e83
--- /dev/null
+++ b/TimeHACK.Main/GlobalPrograms/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!");
+ }
+ }
+ }
+}