Exemple #1
0
        void mLCFF_Click(object sender, EventArgs e)
        {
            String bkCFF = LCFF.Text;

            KontrolliereMessungen.cff = -1;
            KontrolliereMessungen determineCFF = new KontrolliereMessungen(this);

            determineCFF.testeCFF = true;
            determineCFF.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
            determineCFF.ShowDialog(tbProbandenNummer.Text, cbAugenseite.Text, LConePath);
            LCFF.Text = Convert.ToString(KontrolliereMessungen.cff);
            if (LCFF.Text == "-1")
            {
                MessageBox.Show("Messung der CFF nicht erfolgreich."); LCFF.Text = bkCFF;
            }
            determineCFF.Dispose();
        }
Exemple #2
0
        void button1_Click(object sender, EventArgs e)
        {
            String bkCFF = "";
            KontrolliereMessungen determineCFF;

            if (Rod.Checked)
            {
                bkCFF = RCFF.Text;
                KontrolliereMessungen.cff = -1;
                determineCFF          = new KontrolliereMessungen(this);
                determineCFF.testeCFF = true;
                determineCFF.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
                determineCFF.ShowDialog(tbProbandenNummer.Text, cbAugenseite.Text, RodPath);
                RCFF.Text = Convert.ToString(KontrolliereMessungen.cff);
                determineCFF.Dispose();
            }

            if (LCone.Checked)
            {
                bkCFF = LCFF.Text;
                KontrolliereMessungen.cff = -1;
                determineCFF          = new KontrolliereMessungen(this);
                determineCFF.testeCFF = true;
                determineCFF.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
                determineCFF.ShowDialog(tbProbandenNummer.Text, cbAugenseite.Text, LConePath);
                LCFF.Text = Convert.ToString(KontrolliereMessungen.cff);
                determineCFF.Dispose();
            }

            if (MCone.Checked)
            {
                bkCFF = MCFF.Text;
                KontrolliereMessungen.cff = -1;
                determineCFF          = new KontrolliereMessungen(this);
                determineCFF.testeCFF = true;
                determineCFF.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
                determineCFF.ShowDialog(tbProbandenNummer.Text, cbAugenseite.Text, MConePath);
                MCFF.Text = Convert.ToString(KontrolliereMessungen.cff);
                determineCFF.Dispose();
            }

            if (SCone.Checked)
            {
                bkCFF = SCFF.Text;
                KontrolliereMessungen.cff = -1;
                determineCFF          = new KontrolliereMessungen(this);
                determineCFF.testeCFF = true;
                determineCFF.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
                determineCFF.ShowDialog(tbProbandenNummer.Text, cbAugenseite.Text, SConePath);
                SCFF.Text = Convert.ToString(KontrolliereMessungen.cff);
                determineCFF.Dispose();
            }

            Console.Beep();
            Thread.Sleep(100);
            Console.Beep();

            if (RCFF.Text == "-1")
            {
                MessageBox.Show("Messung der Stäbchen-CFF nicht erfolgreich."); RCFF.Text = bkCFF;
            }
            if (LCFF.Text == "-1")
            {
                MessageBox.Show("Messung der L-Zapfen-CFF nicht erfolgreich."); LCFF.Text = bkCFF;
            }
            if (MCFF.Text == "-1")
            {
                MessageBox.Show("Messung der M-Zapfen-CFF nicht erfolgreich."); MCFF.Text = bkCFF;
            }
            if (SCFF.Text == "-1")
            {
                MessageBox.Show("Messung der S-Zapfen-CFF nicht erfolgreich."); SCFF.Text = bkCFF;
            }
        }
Exemple #3
0
        void start_Click(object sender, EventArgs e)
        {
            CheckedListBox Liste = RodList;

            foreach (object o in RodList.CheckedItems)
            {
                messungen.Add(String.Concat("R", o.ToString()));
            }
            foreach (object o in LConeList.CheckedItems)
            {
                messungen.Add(String.Concat("L", o.ToString()));
            }
            foreach (object o in MConeList.CheckedItems)
            {
                messungen.Add(String.Concat("M", o.ToString()));
            }
            foreach (object o in SConeList.CheckedItems)
            {
                messungen.Add(String.Concat("S", o.ToString()));
            }
            var messungenZufall = messungen.OrderBy(a => Guid.NewGuid());

            foreach (String f in messungenZufall)
            {
                KontrolliereMessungen messeSchwelle = new KontrolliereMessungen(parentObject);
                messeSchwelle.testeCFF = false;
                messeSchwelle.freq     = Convert.ToInt16(f.Substring(1));
                messeSchwelle.SetDesktopLocation(this.Location.X + this.Size.Width, this.Location.Y);
                switch (f.Substring(0, 1))
                {
                case "R":
                    messeSchwelle.ShowDialog(Probandennummer, Augenseite, Steuerung.RodPath);
                    Liste = RodList;
                    break;

                case "L":
                    messeSchwelle.ShowDialog(Probandennummer, Augenseite, Steuerung.LConePath);
                    Liste = LConeList;
                    break;

                case "M":
                    messeSchwelle.ShowDialog(Probandennummer, Augenseite, Steuerung.MConePath);
                    Liste = MConeList;
                    break;

                case "S":
                    messeSchwelle.ShowDialog(Probandennummer, Augenseite, Steuerung.SConePath);
                    Liste = SConeList;
                    break;
                }
                messeSchwelle.Dispose();
                int i = 0, index = -1;
                foreach (object o in Liste.Items)
                {
                    if (o.ToString() == f.Substring(1))
                    {
                        index = i;
                    }
                    i++;
                }
                Liste.SetItemCheckState(index, CheckState.Unchecked);
                fortschritt.Value++;
                messungen.Clear();
            }
            fortschritt.Value = 0;
            Thread.Sleep(100);
        }