public void init(TaskListDataInterface t) { ddig.parent = this; configdata = configs.Load("TaskLua.config"); ddig.updateFilename(); tasker = t; lua.RegisterFunction("addTask", this, GetType().GetMethod("addTask")); lua.RegisterFunction("addTaskBefore", this, GetType().GetMethod("addTaskBefore")); lua.RegisterFunction("debug", this, GetType().GetMethod("debugAddlog")); lua.RegisterFunction("udpsend", this, GetType().GetMethod("udpsend")); }
public static configs Load(Stream stream) { configs configData = null; try { System.Xml.Serialization.XmlSerializer xs = new XmlSerializer(typeof(configs)); configData = xs.Deserialize(stream) as configs; } catch { } return(configData != null ? configData : new configs()); }