예제 #1
0
        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"));
        }
예제 #2
0
        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());
        }