protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         configurationForm.Dispose();
         trackerForm.Dispose();
         container.Dispose();
     }
     base.Dispose(disposing);
 }
        private void configToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConfigurationForm configurationForm = new ConfigurationForm();

            if (configurationForm.ShowDialog(this) == DialogResult.OK)
            {
                ConnectToDatabase();
            }

            configurationForm.Dispose();
        }
        private void ConfigurationButton_Click(object sender, EventArgs e)
        {
            var configurationForm = new ConfigurationForm();

            try
            {
                configurationForm.ShowDialog();
            }
            finally
            {
                configurationForm.Dispose();
            }
        }
Exemple #4
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;
 }
Exemple #5
0
 /// <summary>
 /// Updates the configure button, description box and surveillance variable.
 /// If the surveillance system chosen can be configured then enable it,
 /// otherwise disable it.
 /// </summary>
 private void updateTrackingSystemGui()
 {
     surveillance = foundTrackingSystems[cmbAvailableTrackingSystems.SelectedIndex];
     // Update configuration options.
     if (surveillance.IsConfigurable)
     {
         // Dispose old one.
         if (trackingConfigForm != null)
         {
             trackingConfigForm.Dispose();
         }
         trackingConfigForm = surveillance.ConfigurationForm;
         // Get default configuration.
         trackingConfiguration = trackingConfigForm.GetConfiguration();
     }
     btnConfigureTrackingSystem.Enabled = surveillance.IsConfigurable;
     txtTrackingDescription.Text        = surveillance.Description;
 }