public static DockableWidget createWindow(XmlNode node) { //Console.WriteLine("createWindow"); ParameterSet ps = ParameterSet.CreateInstance(node); DelegateSet ds = DelegateSet.CreateInstance(node); return(createWindow(ps, ds)); }
/// <summary> /// add new parameters for the task constructor /// then the task will not use the parameters specified in the tasks.config /// </summary> /// <param name="parameters">Parameters.</param> public void addParams(String parameters) { //Params = ParameterSet.CreateInstance(Classname,Assembly,parameters); XmlDocument doc = new XmlDocument(); doc.LoadXml(parameters); XmlNode nd = doc.SelectSingleNode("//params"); if (nd != null) { Params = ParameterSet.CreateInstance(nd); } }
/// <summary> /// create a TaskData instance from an xml node /// </summary> /// <returns>The instance.</returns> /// <param name="node">Node.</param> public static TaskData CreateInstance(XmlNode node) { String nextRun = XmlHelper.getAttributeValue(node, "nextrun"); String intervall = XmlHelper.getAttributeValue(node, "intervall"); String classname = XmlHelper.getAttributeValue(node, "class"); String assembly = XmlHelper.getAttributeValue(node, "assembly"); String su = XmlHelper.getAttributeValue(node, "startup"); //Console.WriteLine("su" + su); bool startup = false; if (!String.IsNullOrEmpty(su)) { startup = Convert.ToBoolean(su); } ParameterSet ps = ParameterSet.CreateInstance(node); return(new TaskData(Convert.ToDateTime(nextRun), Convert.ToInt32(intervall), ps, classname, assembly, startup)); }