Пример #1
0
        // Get configuration object
        public object GetConfiguration()
        {
            StreamConfiguration config = new StreamConfiguration();

            config.source = urlBox.Text;

            return((object)config);
        }
Пример #2
0
        // Get configuration object
        public object GetConfiguration()
        {
            StreamConfiguration config = new StreamConfiguration();

            config.source = urlBox.Text;

            return (object) config;
        }
Пример #3
0
        // Set configuration
        public void SetConfiguration(object config)
        {
            StreamConfiguration cfg = (StreamConfiguration)config;

            if (cfg != null)
            {
                urlBox.Text = cfg.source;
            }
        }
Пример #4
0
        // Save configuration
        public void SaveConfiguration(XmlTextWriter writer, object config)
        {
            StreamConfiguration cfg = (StreamConfiguration)config;

            if (cfg != null)
            {
                writer.WriteAttributeString("source", cfg.source);
            }
        }
Пример #5
0
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            StreamConfiguration config = new StreamConfiguration();

            try
            {
                config.source = reader.GetAttribute("source");
            }
            catch (Exception)
            {
            }
            return (object) config;
        }
Пример #6
0
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            StreamConfiguration config = new StreamConfiguration();

            try
            {
                config.source = reader.GetAttribute("source");
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
Пример #7
0
        // Create video source object
        public IVideoSource CreateVideoSource(object config)
        {
            StreamConfiguration cfg = (StreamConfiguration)config;

            if (cfg != null)
            {
                VideoStream source = new VideoStream();

                source.VideoSource = cfg.source;

                return((IVideoSource)source);
            }
            return(null);
        }