Ejemplo n.º 1
0
        // Get configuration object
        public object GetConfiguration()
        {
            PanasonicConfiguration config = new PanasonicConfiguration();

            config.source        = serverBox.Text;
            config.login         = loginBox.Text;
            config.password      = passwordBox.Text;
            config.resolution    = sizeCombo.Text;
            config.stremType     = streamTypes[streamCombo.SelectedIndex];
            config.quality       = qualityCombo.Text;
            config.frameInterval = frameIntervals[rateCombo.SelectedIndex];

            return((object)config);
        }
Ejemplo n.º 2
0
        // Set configuration
        public void SetConfiguration(object config)
        {
            PanasonicConfiguration cfg = (PanasonicConfiguration)config;

            if (cfg != null)
            {
                serverBox.Text            = cfg.source;
                loginBox.Text             = cfg.login;
                passwordBox.Text          = cfg.password;
                sizeCombo.Text            = cfg.resolution;
                streamCombo.SelectedIndex = Array.IndexOf(streamTypes, cfg.stremType);
                qualityCombo.Text         = cfg.quality;
                rateCombo.SelectedIndex   = Array.IndexOf(frameIntervals, cfg.frameInterval);
            }
        }
Ejemplo n.º 3
0
        // Save configuration
        public void SaveConfiguration(XmlTextWriter writer, object config)
        {
            PanasonicConfiguration cfg = (PanasonicConfiguration)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());
            }
        }
Ejemplo n.º 4
0
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            PanasonicConfiguration config = new PanasonicConfiguration();

            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);
        }
Ejemplo n.º 5
0
        // Load configuration
        public object LoadConfiguration(Hashtable reader)
        {
            PanasonicConfiguration config = new PanasonicConfiguration();

            try
            {
                config.source        = (string)reader["source"];
                config.login         = (string)reader["login"];
                config.password      = (string)reader["password"];
                config.resolution    = (string)reader["size"];
                config.stremType     = (StreamType)(int.Parse((string)reader["stype"]));
                config.quality       = (string)reader["quality"];
                config.frameInterval = int.Parse((string)reader["interval"]);
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
Ejemplo n.º 6
0
        // Create video source object
        public VsICoreProvider CreateVideoSource(object config)
        {
            PanasonicConfiguration cfg = (PanasonicConfiguration)config;

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

                source.StreamType    = cfg.stremType;
                source.VideoSource   = cfg.source;
                source.Login         = cfg.login;
                source.Password      = cfg.password;
                source.Resolution    = cfg.resolution;
                source.Quality       = cfg.quality;
                source.FrameInterval = cfg.frameInterval;

                return((VsICoreProvider)source);
            }
            return(null);
        }
Ejemplo n.º 7
0
		// Get configuration object
		public object GetConfiguration()
		{
			PanasonicConfiguration	config = new PanasonicConfiguration();

			config.source	= serverBox.Text;
			config.login	= loginBox.Text;
			config.password	= passwordBox.Text;
			config.resolution = sizeCombo.Text;
			config.stremType = streamTypes[streamCombo.SelectedIndex];
			config.quality	= qualityCombo.Text;
			config.frameInterval = frameIntervals[rateCombo.SelectedIndex];

			return (object) config;
		}
Ejemplo n.º 8
0
		// Load configuration
		public object LoadConfiguration(XmlTextReader reader)
		{
			PanasonicConfiguration	config = new PanasonicConfiguration();

			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;
		}
Ejemplo n.º 9
0
        // Load configuration
        public object LoadConfiguration(Hashtable reader)
        {
            PanasonicConfiguration config = new PanasonicConfiguration();

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