// Save configuration
        public void SaveConfiguration(XmlTextWriter writer, object config)
        {
            SANYOConfiguration cfg = (SANYOConfiguration)config;

            if (cfg != null)
            {
                writer.WriteAttributeString("source", cfg.source);
                writer.WriteAttributeString("login", cfg.login);
                writer.WriteAttributeString("password", cfg.password);
                writer.WriteAttributeString("size", cfg.resolution);
                writer.WriteAttributeString("stype", ((int)cfg.stremType).ToString());
                writer.WriteAttributeString("quality", cfg.quality);
                writer.WriteAttributeString("interval", cfg.frameInterval.ToString());
            }
        }
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            SANYOConfiguration config = new SANYOConfiguration();

            try
            {
                config.source        = reader.GetAttribute("source");
                config.login         = reader.GetAttribute("login");
                config.password      = reader.GetAttribute("password");
                config.resolution    = reader.GetAttribute("size");
                config.stremType     = (StreamType)(int.Parse(reader.GetAttribute("stype")));
                config.quality       = reader.GetAttribute("quality");
                config.frameInterval = int.Parse(reader.GetAttribute("interval"));
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            SANYOConfiguration	config = new SANYOConfiguration();

            try
            {
                config.source	= reader.GetAttribute("source");
                config.login	= reader.GetAttribute("login");
                config.password	= reader.GetAttribute("password");
                config.resolution = reader.GetAttribute("size");
                config.stremType = (StreamType) (int.Parse(reader.GetAttribute("stype")));
                config.quality	= reader.GetAttribute("quality");
                config.frameInterval = int.Parse(reader.GetAttribute("interval"));
            }
            catch (Exception)
            {
            }
            return (object) config;
        }