Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                xml = new Fitness.data.Xml();

                messwert = new Messwert();
                messwert.MesswertDatum = input_datum.Value;
                messwert.Gewicht = Convert.ToDouble(input_gewicht.Text);
                messwert.FettAnteil = Convert.ToDouble(input_fett.Text);
                messwert.WasserAnteil = Convert.ToDouble(input_wasser.Text);
                messwert.MuskelAnteil = Convert.ToDouble(input_muskel.Text);
                messwert.KnochenMasse = Convert.ToDouble(input_knochen.Text);

                if (xml.addEntry(messwert))
                {
                    successfull_saved = true;
                }

                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message,
                                "Falsches Format",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            resizeContent();

            xml = new data.Xml();
            mw = new Messwerte();

            refreshListView();
        }