author | cavaliet |
Wed, 28 Oct 2009 17:07:27 +0100 | |
changeset 182 | 25b49d4f1635 |
parent 147 | 1a5da89daee9 |
permissions | -rw-r--r-- |
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 |
{ |
|
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
23 |
public event EventHandler EH_NewCutting_ContactDown; |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
24 |
public Cutting Cutting = new Cutting(); |
147 | 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 |
{ |
|
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
40 |
Cutting = new Cutting(_User.Name, new List<Annotation>()); |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
41 |
if (EH_NewCutting_ContactDown != null) |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
42 |
EH_NewCutting_ContactDown(this, new EventArgs()); |
147 | 43 |
} |
44 |
||
45 |
private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) |
|
46 |
{ |
|
182
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
47 |
//Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting()); |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
48 |
Cutting = new Cutting(_User.Name, new List<Annotation>()); |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
49 |
if (EH_NewCutting_ContactDown != null) |
25b49d4f1635
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents:
147
diff
changeset
|
50 |
EH_NewCutting_ContactDown(this, new EventArgs()); |
147 | 51 |
} |
52 |
||
53 |
#endregion |
|
54 |
} |
|
55 |
} |