author | PAMPHILE Jonathan <pamphile@efrei.fr> |
Thu, 10 Sep 2009 16:04:28 +0200 | |
changeset 44 | 9c6ea1f246da |
parent 39 | 0efa1d506f28 |
child 54 | c724ac229181 |
permissions | -rw-r--r-- |
35 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using FingersDance.Control.Player; |
|
38 | 6 |
using FingersDance.Actions; |
35 | 7 |
|
8 |
namespace FingersDance.ActionFactory |
|
9 |
{ |
|
10 |
public class ActionFactory |
|
11 |
{ |
|
12 |
private Dictionary<String, Type> actionDict = new Dictionary<string, Type>(); |
|
13 |
||
14 |
public ActionFactory() |
|
15 |
{ |
|
44
9c6ea1f246da
Correction tu TestMenu
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
39
diff
changeset
|
16 |
actionDict.Add("ActionPlayMedia", typeof(FingersDance.Actions.ActionPlayMedia)); |
9c6ea1f246da
Correction tu TestMenu
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
39
diff
changeset
|
17 |
actionDict.Add("ActionShowMessage", typeof(FingersDance.Actions.ActionShowMessage)); |
9c6ea1f246da
Correction tu TestMenu
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
39
diff
changeset
|
18 |
actionDict.Add("ActionOpenMedia", typeof(FingersDance.Actions.ActionOpenMedia)); |
9c6ea1f246da
Correction tu TestMenu
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
39
diff
changeset
|
19 |
actionDict.Add("ActionStopMedia", typeof(FingersDance.Actions.ActionStopMedia)); |
35 | 20 |
} |
38 | 21 |
|
22 |
public ActionBase GetAction(string T, object Args) |
|
23 |
{ |
|
39 | 24 |
return (ActionBase)Activator.CreateInstance(actionDict[T]); |
38 | 25 |
} |
35 | 26 |
} |
27 |
} |