/// <summary>
        /// Initializes a new instance of the VogeltellerApp class.
        /// </summary>
        public VogeltellerApp()
        {
            InitializeComponent();

            cbAreas.Enabled = false;

            btnVisit.Enabled = false;

            btnPrint.Enabled = false;

            projectRepo = new ProjectRepository(new ProjectOracleContext());

            visitRepo = new VisitRepository(new VisitOracleContext());

            foreach (var project in projectRepo.LoadAllProjects())
            {
                cbProjects.Items.Add(project);
            }

            if (!File.Exists(@"C:\VogeltellerApp\LocalStorage.XML"))
            {
                btnSaveToDatabase.Enabled = false;
            }
            else
            {
                btnSaveToDatabase.Enabled = true;
            }
        }
 public void Initialize()
 {
     specie = new Specie("Ab", "Ab", DateTime.MinValue, DateTime.MaxValue, 5);
     observation = new Observation(1, 1, specie, ObservationType.BirdPresent, 5, 5, 5);
     observation2 = new Observation(1, 1, specie, ObservationType.TerritoryIndicating, 5, 5, 5);
     observation3 = new Observation(1, 1, specie, ObservationType.NestIndicating, 5, 5, 5);
     visit = new Visit(1, 1, DateTime.MinValue, DateTime.MaxValue, null);
     area = new Area(1, 1, "Test", "Image", null);
     project = new Project(1, "Project", DateTime.MinValue, DateTime.MaxValue, null);
     visits = new Visits();
     observations = new Observations();
     speciePoint = new SpeciePoint("Sp", 5, 6);
     projectRepo = new ProjectRepository(new ProjectOracleContext());
     visitRepo = new VisitRepository(new VisitOracleContext());
     visitForm = new VisitForm(visit);
     observationForm = new ObservationForm(observation);
     observationForm2 = new ObservationForm(5, 5, 5, 5);
 }
        /// <summary>
        /// Initializes a new instance of the ObservationForm class.
        /// </summary>
        /// <param name="xcor">integer type xCor parameter</param>
        /// <param name="ycor">integer type yCor parameter</param>
        /// <param name="visitId">integer type visitId parameter</param>
        /// <param name="obsId">integer type obsId parameter</param>
        public ObservationForm(int xcor, int ycor, int visitId, int obsId)
        {
            InitializeComponent();

            this.xcor = xcor;
            this.ycor = ycor;
            this.visitId = visitId;
            this.obsId = obsId;

            projectRepo = new ProjectRepository(new ProjectOracleContext());

            foreach (var s in projectRepo.LoadAllSpecies())
            {
                cbSpecies.Items.Add(s);
            }

            cbObservationType.Items.Add("Vogel aanwezig");
            cbObservationType.Items.Add("Territorium indicerend");
            cbObservationType.Items.Add("Nest indicerend");

            cbObservationType.Enabled = false;
            btnPlaceObservation.Visible = true;
            btnEditObservation.Visible = false;
        }
        /// <summary>
        /// Initializes a new instance of the ObservationForm class.
        /// </summary>
        /// <param name="observation">Observation type observation parameter</param>
        public ObservationForm(Observation observation)
        {
            InitializeComponent();

            projectRepo = new ProjectRepository(new ProjectOracleContext());

            foreach (var s in projectRepo.LoadAllSpecies())
            {
                cbSpecies.Items.Add(s);
            }

            cbSpecies.Text = observation.Specie.Name;

            cbObservationType.Items.Add("Vogel aanwezig");
            cbObservationType.Items.Add("Territorium indicerend");
            cbObservationType.Items.Add("Nest indicerend");

            switch (observation.ObsType)
            {
                case ObservationType.BirdPresent:
                    cbObservationType.Text = "Vogel aanwezig";
                    break;
                case ObservationType.TerritoryIndicating:
                    cbObservationType.Text = "Territorium indicerend";
                    break;
                case ObservationType.NestIndicating:
                    cbObservationType.Text = "Nest indicerend";
                    break;
            }

            nudAmount.Value = observation.Amount;

            btnPlaceObservation.Visible = false;
            btnEditObservation.Visible = true;
        }