Ejemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the okButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void okButton_Click(object sender, EventArgs e)
        {
            // Make sure that the user chose surveillance and output systems.
            if (foundTrackingSystems.Count == 0 || foundOutputSystems.Count == 0)
            {
                showErrorMessage("No surveillance systems were found.Please check you configuration file.");
                return;
            }
            else
            {
                // Next retrieve the surveillance  and output systems.
                surveillance =
                    foundTrackingSystems[cmbAvailableTrackingSystems.SelectedIndex];
                output = foundOutputSystems[cmbAvailableOutputSystems.SelectedIndex];
                // Check that the user chose a video source.
                if (videoSource == null)
                {
                    showErrorMessage("No viseo source was chosen.");
                    return;
                }
            }

            DialogResult = DialogResult.OK;
            Hide();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Updates the configure button, description box and output variable.
 /// If the out system chosen can be configured then enable it,
 /// otherwise disable it.
 /// </summary>
 private void updateOutputSystemGui()
 {
     output = foundOutputSystems[cmbAvailableOutputSystems.SelectedIndex];
     // Update configuration options.
     if (output.IsConfigurable)
     {
         // Dispose old one.
         if (outputConfigForm != null)
         {
             outputConfigForm.Dispose();
         }
         outputConfigForm = output.ConfigurationForm;
         // Get default configuration.
         outputConfiguration = outputConfigForm.GetConfiguration();
     }
     btnConfigureOutput.Enabled = output.IsConfigurable;
     txtOutputDescription.Text  = output.Description;
 }
Ejemplo n.º 3
0
		/// <summary>
		/// Updates the configure button, description box and output variable.
		/// If the out system chosen can be configured then enable it,
		/// otherwise disable it.
		/// </summary>
		private void updateOutputSystemGui()
		{
			output = foundOutputSystems[cmbAvailableOutputSystems.SelectedIndex];
			// Update configuration options.
			if (output.IsConfigurable)
			{
				// Dispose old one.
				if (outputConfigForm != null)
				{
					outputConfigForm.Dispose();
				}
				outputConfigForm = output.ConfigurationForm;
				// Get default configuration.
				outputConfiguration = outputConfigForm.GetConfiguration();
			}
			btnConfigureOutput.Enabled = output.IsConfigurable;
			txtOutputDescription.Text = output.Description;
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Handles the Click event of the okButton control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
		private void okButton_Click(object sender, EventArgs e)
		{
			// Make sure that the user chose surveillance and output systems.
			if (foundTrackingSystems.Count == 0 || foundOutputSystems.Count == 0)
			{
				showErrorMessage("No surveillance systems were found.Please check you configuration file.");
				return;
			}
			else
			{
				// Next retrieve the surveillance  and output systems.
				surveillance =
					foundTrackingSystems[cmbAvailableTrackingSystems.SelectedIndex];
				output = foundOutputSystems[cmbAvailableOutputSystems.SelectedIndex];
				// Check that the user chose a video source.
				if (videoSource == null)
				{
					showErrorMessage("No viseo source was chosen.");
					return;
				}
			}

			DialogResult = DialogResult.OK;
			Hide();
			
		}