147
|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Windows; |
|
6 |
using System.Windows.Controls; |
|
7 |
using System.Windows.Data; |
|
8 |
using System.Windows.Documents; |
|
9 |
using System.Windows.Input; |
|
10 |
using System.Windows.Media; |
|
11 |
using System.Windows.Media.Imaging; |
|
12 |
using System.Windows.Navigation; |
|
13 |
using System.Windows.Shapes; |
|
14 |
using FingersDance.Data; |
|
15 |
|
|
16 |
namespace FingersDance.Control.SessionInput |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// Interaction logic for UserControlNewProject.xaml |
|
20 |
/// </summary> |
|
21 |
public partial class UserControlNewProject : UserControl |
|
22 |
{ |
|
23 |
public event EventHandler EH_NewProject_ContactDown; |
|
24 |
public Project Project = new Project(); |
|
25 |
User _User = new User(); |
|
26 |
|
|
27 |
public UserControlNewProject(User u) |
|
28 |
{ |
|
29 |
InitializeComponent(); |
|
30 |
ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); |
|
31 |
_User = u; |
|
32 |
|
|
33 |
|
|
34 |
} |
|
35 |
|
|
36 |
#region Actions |
|
37 |
|
|
38 |
private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
39 |
{ |
|
40 |
Project = new Project(_User, new Cutting()); |
|
41 |
if (EH_NewProject_ContactDown != null) |
|
42 |
EH_NewProject_ContactDown(this, new EventArgs()); |
|
43 |
} |
|
44 |
|
|
45 |
private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) |
|
46 |
{ |
|
47 |
Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting()); |
|
48 |
if (EH_NewProject_ContactDown != null) |
|
49 |
EH_NewProject_ContactDown(this, new EventArgs()); |
|
50 |
} |
|
51 |
|
|
52 |
#endregion |
|
53 |
} |
|
54 |
} |