Exemplo n.º 1
0
        private void LoadPluginAndRunAction()
        {
            PluginPackage p = new PluginPackage();

            Console.WriteLine("Plugin Package folder?");
            string s = Console.ReadLine();

            p.Folder = s;
            p.ScanPackage();
            ObservableList <StandAloneAction> list = p.GetStandAloneActions();
            int i = 0;

            foreach (StandAloneAction a in list)
            {
                Console.WriteLine(i + ": " + a.ID);
                i++;
            }
            string        actnum = Console.ReadLine();
            ActionHandler AH     = p.GetStandAloneActionHandler(list[int.Parse(actnum)].ID);

            // FIXME need lazy load of params
            foreach (ActionParam v in AH.GingerAction.InputParams.Values)
            {
                Console.WriteLine(v.Name + "?");
                string val = Console.ReadLine();
                v.Value = val;
            }

            ActionRunner.RunAction(AH.Instance, AH.GingerAction, AH);
        }