author | cavaliet |
Wed, 25 Nov 2009 10:49:44 +0100 | |
changeset 231 | 4eff6b0c9215 |
parent 214 | beebae32b1ed |
permissions | -rw-r--r-- |
145 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
5 |
using System.IO; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
6 |
using System.Net; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
7 |
using System.Windows; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
8 |
using System.Windows.Controls; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
9 |
using System.Windows.Data; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
10 |
using System.Windows.Input; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
11 |
using System.Windows.Media; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
12 |
using System.Windows.Media.Animation; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
13 |
using System.Windows.Navigation; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
14 |
using System.Windows.Controls.Primitives; |
145 | 15 |
|
16 |
using FingersDance.Control.TimeLine; |
|
17 |
||
18 |
namespace FingersDance.Actions |
|
19 |
{ |
|
20 |
public class ActionStartOrEndAnnotation : FingersDance.Actions.ActionBase |
|
21 |
{ |
|
22 |
|
|
194 | 23 |
private String _Text = ""; |
145 | 24 |
private UserControlTimeLine myTimeline; |
25 |
||
26 |
public ActionStartOrEndAnnotation() |
|
27 |
{ |
|
28 |
|
|
29 |
} |
|
30 |
||
194 | 31 |
public ActionStartOrEndAnnotation(String text) |
145 | 32 |
{ |
33 |
_Text = text; |
|
34 |
} |
|
35 |
||
194 | 36 |
public ActionStartOrEndAnnotation(Object[] param) |
145 | 37 |
{ |
214
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
38 |
// The context param[0] is the userPanel, so we have to get the timeline's instance. |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
39 |
UserControl userPanel = (UserControl)param[0]; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
40 |
// Its content... |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
41 |
Grid o = (Grid)userPanel.Content; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
42 |
// and the UserControlSyncSource within the grid... |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
43 |
UserControl syncSrc = (UserControl)((Grid)o.Children[1]).Children[0]; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
44 |
// and finally the timeline |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
45 |
myTimeline = (UserControlTimeLine)((Grid)((Grid)syncSrc.Content).Children[0]).Children[0]; |
beebae32b1ed
third step of search : better integration of search panel and debug from loaded search project and annotated project.
cavaliet
parents:
194
diff
changeset
|
46 |
|
194 | 47 |
_Text = (String)param[1]; |
145 | 48 |
} |
49 |
||
50 |
public void Execute() |
|
51 |
{ |
|
52 |
if (myTimeline != null) |
|
194 | 53 |
myTimeline.startOrEndAnnotation(_Text); |
145 | 54 |
} |
55 |
} |
|
56 |
} |
|
57 |