equal
deleted
inserted
replaced
1 using System; |
1 using System; |
2 using System.Collections.Generic; |
2 using System.Collections.Generic; |
3 using System.Linq; |
3 using System.Linq; |
4 using System.Text; |
4 using System.Text; |
5 using FingersDance.Control.Player; |
5 using FingersDance.Control.Player; |
|
6 using FingersDance.Actions; |
6 |
7 |
7 namespace FingersDance.ActionFactory |
8 namespace FingersDance.ActionFactory |
8 { |
9 { |
9 public class ActionFactory |
10 public class ActionFactory |
10 { |
11 { |
12 |
13 |
13 public ActionFactory() |
14 public ActionFactory() |
14 { |
15 { |
15 actionDict.Add("ActionPlayMedia", Type.GetType("FingersDance.Actions.ActionPlayMedia")); |
16 actionDict.Add("ActionPlayMedia", Type.GetType("FingersDance.Actions.ActionPlayMedia")); |
16 } |
17 } |
|
18 |
|
19 public ActionBase GetAction(string T, object Args) |
|
20 { |
|
21 try |
|
22 { |
|
23 return (ActionBase)Activator.CreateInstance(actionDict[T]); |
|
24 } |
|
25 catch (Exception) |
|
26 { |
|
27 return null; |
|
28 } |
|
29 } |
17 } |
30 } |
18 } |
31 } |