5 using System.Windows.Controls; |
5 using System.Windows.Controls; |
6 using System.Windows.Data; |
6 using System.Windows.Data; |
7 using System.Windows.Media; |
7 using System.Windows.Media; |
8 using System.Windows.Media.Animation; |
8 using System.Windows.Media.Animation; |
9 using System.Windows.Navigation; |
9 using System.Windows.Navigation; |
|
10 using FingersDance.Data; |
10 |
11 |
11 namespace FingersDance.Control.SessionInput |
12 namespace FingersDance.Control.SessionInput |
12 { |
13 { |
13 public partial class UserControlSessionInput |
14 public partial class UserControlSessionInput |
14 { |
15 { |
15 public event EventHandler EH_SurfaceButtonSubmit_ContactDown; |
16 public event EventHandler EH_SurfaceButtonSubmit_ContactDown; |
|
17 public User User = new User(); |
16 |
18 |
17 public UserControlSessionInput() |
19 public UserControlSessionInput() |
18 { |
20 { |
19 this.InitializeComponent(); |
21 this.InitializeComponent(); |
20 |
22 ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); |
21 // Insert code required on object creation below this point. |
|
22 } |
23 } |
23 |
24 |
24 private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
25 private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
25 { |
26 { |
26 if (EH_SurfaceButtonSubmit_ContactDown != null) |
27 if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) |
27 EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); |
28 { |
|
29 User = new User(ST_Name.Text, ST_Email.Text, ST_Alias.Text); |
|
30 if (EH_SurfaceButtonSubmit_ContactDown != null) |
|
31 EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); |
|
32 } |
28 } |
33 } |
29 |
34 |
30 private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) |
35 private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) |
31 { |
36 { |
32 if (EH_SurfaceButtonSubmit_ContactDown != null) |
37 if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) |
33 EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); |
38 { |
|
39 User = new User(ST_Name.Text, ST_Email.Text, ST_Alias.Text); |
|
40 if (EH_SurfaceButtonSubmit_ContactDown != null) |
|
41 EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); |
|
42 } |
34 } |
43 } |
35 |
44 |
36 } |
45 } |
37 } |
46 } |