private void panelMap_MouseClick(object sender, MouseEventArgs e)
        {
            x = e.X;
            y = e.Y;

            var observationForm = new ObservationForm(x, y, visit.VisitId, visitRepository.GetSequenceNextValObservation()) { Text = "Nieuwe waarneming" };

            DialogResult dr = new DialogResult();
            dr = observationForm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                observation = ObservationForm.ReturnObservation();

                try
                {
                    observations.Add(observation);
                    Panel panel = new Panel();
                    panel.Height = 35;
                    panel.Width = 35;
                    panel.Location = new Point(x, y);
                    panel.MouseClick += p_Click;

                    switch (observation.ObsType)
                    {
                        case ObservationType.BirdPresent:
                            panel.BackgroundImage = images.Images[0];
                            break;
                        case ObservationType.TerritoryIndicating:
                            panel.BackgroundImage = images.Images[1];
                            break;
                        case ObservationType.NestIndicating:
                            panel.BackgroundImage = images.Images[2];
                            break;
                    }

                    panelMap.Controls.Add(panel);
                }
                catch (Exception)
                {
                    MessageBox.Show("Waarneming kon niet worden toegevoegd, probeer het nog eens.", "Error");
                }
            }
        }
        private void p_Click(object sender, MouseEventArgs e)
        {
            foreach (var o in observations)
            {
                Rectangle rect = new Rectangle(new Point(o.XCor, o.YCor), new Size(35, 35));

                if (rect.Contains(e.X + x, e.Y + y))
                {
                    selectedObservation = o;
                }
            }

            var observationForm = new ObservationForm(selectedObservation) { Text = "Waarneming aanpassen" };
            observationForm.ShowDialog();
            observation = ObservationForm.ReturnObservation();

            try
            {
                observations.Remove(selectedObservation);
                observations.Add(observation);
                Panel panel = new Panel();
                panel.Height = 35;
                panel.Width = 35;
                panel.Location = new Point(x, y);
                panel.MouseClick += p_Click;

                switch (observation.ObsType)
                {
                    case ObservationType.BirdPresent:
                        panel.BackgroundImage = images.Images[0];
                        break;
                    case ObservationType.TerritoryIndicating:
                        panel.BackgroundImage = images.Images[1];
                        break;
                    case ObservationType.NestIndicating:
                        panel.BackgroundImage = images.Images[2];
                        break;
                }

                panelMap.Controls.Add(panel);
                panel.BringToFront();
                selectedObservation = null;   
            }
            catch (Exception)
            {
                MessageBox.Show("Waarneming kon niet worden aangepast, probeer het nog eens.", "Error");
            }
        }