author | sarias |
Fri, 16 Oct 2009 21:37:16 +0200 | |
changeset 163 | d5148710e229 |
parent 162 | 0b9f989bcb37 |
child 180 | 1c4ad413c837 |
child 182 | 25b49d4f1635 |
permissions | -rw-r--r-- |
35 | 1 |
using System; |
2 |
using System.IO; |
|
3 |
using System.Net; |
|
4 |
using System.Windows; |
|
5 |
using System.Windows.Controls; |
|
6 |
using System.Windows.Data; |
|
7 |
using System.Windows.Media; |
|
8 |
using System.Windows.Media.Animation; |
|
9 |
using System.Windows.Navigation; |
|
143 | 10 |
using FingersDance.Data; |
35 | 11 |
|
12 |
namespace FingersDance.Control.UserPanel |
|
13 |
{ |
|
14 |
public partial class UserControlUserPanel |
|
15 |
{ |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
16 |
#region Variables |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
17 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
18 |
public event EventHandler OnSuccessAnnotation; //Event to display ColorAnnotation from different Users |
131 | 19 |
public int id = 0; |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
20 |
public uint idcolor = 0; //The color of the Pivot Button |
143 | 21 |
Project _Project = new Project(); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
22 |
#endregion |
143 | 23 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
24 |
#region Properties |
143 | 25 |
public Project Project |
26 |
{ |
|
27 |
get { return _Project; } |
|
28 |
set { _Project = value; } |
|
29 |
} |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
30 |
#endregion |
143 | 31 |
|
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
32 |
#region Constructors |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
33 |
public UserControlUserPanel() |
35 | 34 |
{ |
35 |
this.InitializeComponent(); |
|
36 |
||
37 |
// Insert code required on object creation below this point. |
|
38 |
} |
|
119 | 39 |
|
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
152
diff
changeset
|
40 |
public UserControlUserPanel(int idPar, Color col, Project p, string path) |
119 | 41 |
{ |
42 |
this.InitializeComponent(); |
|
150
569925b65604
Annotations are now colored with the same color as the pivot's button
cavaliet
parents:
146
diff
changeset
|
43 |
id = idPar; |
143 | 44 |
_Project = p; |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
152
diff
changeset
|
45 |
this.UserControlSyncSource.Load(path, col, _Project.Cutting); |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
46 |
UserControlSyncSource.OnSuccessAnnotation+=new EventHandler(UserControlSyncSource_OnSuccessAnnotation); |
119 | 47 |
} |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
48 |
#endregion |
152
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
49 |
|
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
50 |
public void PlayerPause() |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
51 |
{ |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
52 |
UserControlSyncSource.PlayerPause(); |
46577fd0a294
PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
150
diff
changeset
|
53 |
} |
162
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
54 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
55 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
56 |
private void UserControlSyncSource_OnSuccessAnnotation(object sender, EventArgs e) |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
57 |
{ |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
58 |
OnSuccessAnnotation(this, new EventArgs()); |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
59 |
} |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
60 |
|
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
61 |
public void UserControlSyncSource_DisplayAnnotation(int id, Brush b) |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
62 |
{ |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
63 |
UserControlSyncSource.UserControlPlayer_DisplayAnnotation(id, b); |
0b9f989bcb37
Display annotations in all opened UserPanels with the user's color
sarias
parents:
160
diff
changeset
|
64 |
} |
35 | 65 |
} |
66 |
} |