--- a/src/FingersDance.Actions/ActionStartOrEndAnnotation.cs Thu Nov 12 23:50:31 2009 +0100
+++ b/src/FingersDance.Actions/ActionStartOrEndAnnotation.cs Fri Nov 13 11:58:42 2009 +0100
@@ -10,7 +10,7 @@
public class ActionStartOrEndAnnotation : FingersDance.Actions.ActionBase
{
- private string _Text = "";
+ private String _Text = "";
private UserControlTimeLine myTimeline;
public ActionStartOrEndAnnotation()
@@ -18,20 +18,21 @@
}
- public ActionStartOrEndAnnotation(string text)
+ public ActionStartOrEndAnnotation(String text)
{
_Text = text;
}
- public ActionStartOrEndAnnotation(UserControlTimeLine uct)
+ public ActionStartOrEndAnnotation(Object[] param)
{
- myTimeline = uct;
+ myTimeline = (UserControlTimeLine)param[0];
+ _Text = (String)param[1];
}
public void Execute()
{
if (myTimeline != null)
- myTimeline.startOrEndAnnotation();
+ myTimeline.startOrEndAnnotation(_Text);
}
}
}
--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Thu Nov 12 23:50:31 2009 +0100
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Fri Nov 13 11:58:42 2009 +0100
@@ -113,7 +113,10 @@
String actionId = ((CustomSurfaceButton)sender).Action;
ActionGenerator ag = new ActionGenerator();
- ActionBase ab = ag.GetAction(actionId, tl);
+ Object[] ar = new Object[2];
+ ar[0] = tl;
+ ar[1] = (String)((CustomSurfaceButton)sender).Content;
+ ActionBase ab = ag.GetAction(actionId, ar);
if(ab!=null)
ab.Execute();
}
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Thu Nov 12 23:50:31 2009 +0100
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Fri Nov 13 11:58:42 2009 +0100
@@ -293,7 +293,7 @@
}
- public void startOrEndAnnotation()
+ public void startOrEndAnnotation(String gestureType)
{
Boolean annotOk = true;
// We open a new annotation
@@ -313,7 +313,7 @@
// if not, we mark the beginning
if (annotOk == true)
{
- cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, cut.AnnotList.Count.ToString(), CurrentColor));
+ cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, 0, gestureType, CurrentColor));
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX);
AnnotWaiting = true;
}
@@ -338,7 +338,7 @@
if (annotOk == true)
{
cut.AnnotList.RemoveAt(cut.AnnotList.Count - 1);
- cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, cut.AnnotList.Count.ToString(), CurrentColor));
+ cut.AnnotList.Add(new Annotation("s_" + System.Guid.NewGuid(), AnnotTcBegin, currentDuration, gestureType, CurrentColor));
//Console.WriteLine("currentTimecode = " + AnnotTcBegin + ", curDur = " + currentDuration + ", nb = " + cut.AnnotList.Count + ", res = " + (AnnotTcBegin - (cut.AnnotList.Count * AnnotWidth)));
tv.DataContext = new CuttingViewModel(cut, AnnotWidth, tv.ScaleX);
AnnotWaiting = false;