예제 #1
0
        // Get configuration object
        public object GetConfiguration()
        {
            AxisConfiguration config = new AxisConfiguration();

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

            return((object)config);
        }
예제 #2
0
        // Set configuration
        public void SetConfiguration(object config)
        {
            AxisConfiguration cfg = (AxisConfiguration)config;

            if (cfg != null)
            {
                serverBox.Text            = cfg.source;
                loginBox.Text             = cfg.login;
                passwordBox.Text          = cfg.password;
                streamCombo.SelectedIndex = Array.IndexOf(streamTypes, cfg.stremType);
                rateCombo.SelectedIndex   = Array.IndexOf(frameIntervals, cfg.frameInterval);
            }
        }
예제 #3
0
        // Save configuration
        public void SaveConfiguration(XmlTextWriter writer, object config)
        {
            AxisConfiguration cfg = (AxisConfiguration)config;

            if (cfg != null)
            {
                writer.WriteAttributeString("source", cfg.source);
                writer.WriteAttributeString("login", cfg.login);
                writer.WriteAttributeString("password", cfg.password);
                writer.WriteAttributeString("stype", ((int)cfg.stremType).ToString());
                writer.WriteAttributeString("interval", cfg.frameInterval.ToString());
            }
        }
예제 #4
0
        // Load configuration
        public object LoadConfiguration(Hashtable reader)
        {
            AxisConfiguration config = new AxisConfiguration();

            try
            {
                config.source        = (string)reader["source"];
                config.login         = (string)reader["login"];
                config.password      = (string)reader["password"];
                config.stremType     = (StreamType)(int.Parse((string)reader["stype"]));
                config.frameInterval = int.Parse((string)reader["interval"]);
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
예제 #5
0
        // Load configuration
        public object LoadConfiguration(XmlTextReader reader)
        {
            AxisConfiguration config = new AxisConfiguration();

            try
            {
                config.source        = reader.GetAttribute("source");
                config.login         = reader.GetAttribute("login");
                config.password      = reader.GetAttribute("password");
                config.stremType     = (StreamType)(int.Parse(reader.GetAttribute("stype")));
                config.frameInterval = int.Parse(reader.GetAttribute("interval"));
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
예제 #6
0
        // Create video source object
        public VsICoreProvider CreateVideoSource(object config)
        {
            AxisConfiguration cfg = (AxisConfiguration)config;

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

                source.StreamType    = cfg.stremType;
                source.VideoSource   = cfg.source;
                source.Login         = cfg.login;
                source.Password      = cfg.password;
                source.FrameInterval = cfg.frameInterval;

                return((VsICoreProvider)source);
            }
            return(null);
        }
예제 #7
0
		// Get configuration object
		public object GetConfiguration()
		{
			AxisConfiguration	config = new AxisConfiguration();

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

			return (object) config;
		}
예제 #8
0
        // Load configuration
        public object LoadConfiguration(Hashtable reader)
        {
            AxisConfiguration config = new AxisConfiguration();

            try
            {
                config.source = (string)reader["source"];
                config.login = (string)reader["login"];
                config.password = (string)reader["password"];
                config.stremType = (StreamType)(int.Parse((string)reader["stype"]));
                config.frameInterval = int.Parse((string)reader["interval"]);
            }
            catch (Exception)
            {
            }
            return (object)config;
        }
예제 #9
0
		// Load configuration
		public object LoadConfiguration(XmlTextReader reader)
		{
			AxisConfiguration	config = new AxisConfiguration();

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