using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Drawing.Printing; using System.Drawing.Imaging; namespace Visual_Am1012 { public partial class Form1 : Form { public static class Print { private static Control m_ControlToPrint; public static void PrintControl(Control control, PrinterSettings printerSettings) { m_ControlToPrint = control; using (PrintDocument printDoc = new PrintDocument()) { printDoc.PrinterSettings = printerSettings; printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); printDoc.DocumentName = "Screenshot"; printDoc.DefaultPageSettings.Margins = new Margins(50, 50, 50, 50); printDoc.DefaultPageSettings.Landscape = (m_ControlToPrint.Width > m_ControlToPrint.Height); printDoc.DefaultPageSettings.Color = printDoc.PrinterSettings.DefaultPageSettings.Color; printDoc.PrintController = new StandardPrintController(); printDoc.Print(); printDoc.PrintPage -= new PrintPageEventHandler(printDoc_PrintPage); } } private static void printDoc_PrintPage(object sender, PrintPageEventArgs e) { Image bmp = CaptureControl(m_ControlToPrint); int height = (bmp.Height * e.MarginBounds.Width) / bmp.Width; Rectangle destRect; if (height > e.MarginBounds.Height) { destRect = new Rectangle(e.MarginBounds.X, e.MarginBounds.Y, (bmp.Width * e.MarginBounds.Height) / bmp.Height, e.MarginBounds.Height); } else { destRect = new Rectangle(e.MarginBounds.X, e.MarginBounds.Y, e.MarginBounds.Width, height); } e.Graphics.DrawImage(bmp, destRect); } private static Bitmap CaptureControl(Control ctl) { Rectangle rect; if (ctl is Form) rect = new Rectangle(ctl.Location, ctl.Size); else rect = new Rectangle(ctl.PointToScreen(new Point(0, 0)), ctl.Size); Bitmap bitmap = new Bitmap(rect.Width, rect.Height, PixelFormat.Format32bppArgb); using (Graphics g = Graphics.FromImage(bitmap)) { g.CopyFromScreen(rect.Left, rect.Top, 0, 0, bitmap.Size, CopyPixelOperation.SourceCopy); } return bitmap; } } public Form1() { InitializeComponent(); Datum_Eingabe.Text = DateTime.Today.ToShortDateString(); Datum_Ausgabe.Text = DateTime.Today.ToShortDateString(); int Körpergröße_Frau; int Körpergewicht_Frau; int Schulter_Frau; int Lordose1_Frau; int Lordose2_Frau; int Becken_Frau; int Knie_Frau; int Körpergröße_Mann; int Körpergewicht_Mann; int Schulter_Mann; int Lordose1_Mann; int Lordose2_Mann; int Becken_Mann; int Knie_Mann; } private void Form1_Load(object sender, EventArgs e) { } private void Start_Click(object sender, EventArgs e) { Nachnahme_Ausgabe_Mann.Text = Nachnahme_Eingabe_Mann.Text; Vornahme_Ausgabe_Mann.Text = Vornahme_Eingabe_Mann.Text; Nachnahme_Ausgabe_Frau.Text = Nachnahme_Eingabe_Frau.Text; Vornahme_Ausgabe_Frau.Text = Vornahme_Eingabe_Frau.Text; Fachberater_Ausgabe.Text = Fachberater_Eingabe.Text; Leisten234_Frau(); Leisten234_Mann(); Leisten56_Frau(); Leisten56_Mann(); Leisten78_Frau(); Leisten78_Mann(); Leisten910_Mann(); } private void Laden_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); string filename = openFileDialog1.FileName; StreamReader sr = new StreamReader(filename); Nachnahme_Eingabe_Mann.Text = sr.ReadLine(); Vornahme_Eingabe_Mann.Text = sr.ReadLine(); Nachnahme_Eingabe_Frau.Text = sr.ReadLine(); Vornahme_Eingabe_Frau.Text = sr.ReadLine(); Datum_Eingabe.Text = sr.ReadLine(); Fachberater_Eingabe.Text = sr.ReadLine(); sr.Close(); } private void Leisten234_Frau() { int EingabeZahl = 0; try { EingabeZahl = int.Parse(Schulter_Frau.Text); } catch { MessageBox.Show("Bitte bei der Dame nur Zahlen eingeben!"); return; } if (Seitenschlaefer_Frau.Checked == true) if (EingabeZahl >= 42.5) { Leiste2_Frau.Text = "t"; Leiste3_Frau.Text = "tt"; Leiste4_Frau.Text = "t"; } else { Leiste2_Frau.Text = "t"; Leiste3_Frau.Text = "t"; Leiste4_Frau.Text = "t"; } else if (Rueckenschlaefer_Frau.Checked == true) if (EingabeZahl >= 41) { Leiste2_Frau.Text = "t"; Leiste3_Frau.Text = "t"; Leiste4_Frau.Text = "t"; } else { Leiste2_Frau.Text = "X"; Leiste3_Frau.Text = "X"; Leiste4_Frau.Text = "X"; } else if (Mischschlaefer_Frau.Checked == true) if (EingabeZahl >= 45) { Leiste2_Frau.Text = "t"; Leiste3_Frau.Text = "tt"; Leiste4_Frau.Text = "t"; } else { Leiste2_Frau.Text = "t"; Leiste3_Frau.Text = "t"; Leiste4_Frau.Text = "t"; } else { EingabeZahl = 0; Leiste2_Frau.Text = "XX"; } } private void Leisten234_Mann() { int EingabeZahlm; try { EingabeZahlm = int.Parse(Schulter_Mann.Text); } catch { MessageBox.Show("Bitte bei dem Herrn nur Zahlen eingeben!"); return; } if (Seitenschlaefer_Mann.Checked == true) if (EingabeZahlm >= 52) { Leiste2_Mann.Text = "tt"; Leiste3_Mann.Text = "tt"; Leiste4_Mann.Text = "t"; } else { Leiste2_Mann.Text = "t"; Leiste3_Mann.Text = "tt"; Leiste4_Mann.Text = "t"; } else if (Rueckenschlaefer_Mann.Checked == true) if (EingabeZahlm >= 47) { Leiste2_Mann.Text = "t"; Leiste3_Mann.Text = "t"; Leiste4_Mann.Text = "t"; } else { Leiste2_Mann.Text = "X"; Leiste3_Mann.Text = "X"; Leiste4_Mann.Text = "X"; } else if (Mischschlaefer_Mann.Checked == true) if (EingabeZahlm >= 50) { Leiste2_Mann.Text = "t"; Leiste3_Mann.Text = "tt"; Leiste4_Mann.Text = "t"; } else { Leiste2_Mann.Text = "t"; Leiste3_Mann.Text = "t"; Leiste4_Mann.Text = "t"; } else { Leiste2_Mann.Text = "XX"; } } private void Leisten56_Frau() { int EingabeZahl = 0; int EingabeZahl2 = 0; try { EingabeZahl = int.Parse(Lordose1_Frau.Text); EingabeZahl2 = int.Parse(Lordose2_Frau.Text); } catch { MessageBox.Show("asdf"); return; } if (Seitenschlaefer_Frau.Checked == true) if (EingabeZahl >= 65) { if (Soft.Checked == true) { Leiste5_Frau.Text = "3"; Leiste6_Frau.Text = "3"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } } else { if (Soft.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "4"; } } else if (Rueckenschlaefer_Frau.Checked == true) if (EingabeZahl >= 65) { if (EingabeZahl2 >= 60) { if (Soft.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "2H"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "3H"; Leiste6_Frau.Text = "3H"; } } else if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "2H"; } } else if (EingabeZahl2 >= 30) { if (Soft.Checked == true) { Leiste5_Frau.Text = "3"; Leiste6_Frau.Text = "3"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } } else { if (Soft.Checked == true) { Leiste5_Frau.Text = "2"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "3"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } } } else { if (EingabeZahl2 >= 60) { if (Soft.Checked == true) { Leiste5_Frau.Text = "4H"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1HH"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2HH"; Leiste6_Frau.Text = "4"; } } else if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "3H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "4H"; Leiste6_Frau.Text = "4"; } } else if (EingabeZahl2 >= 30) { if (Soft.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "4"; } } else { if (Soft.Checked == true) { Leiste5_Frau.Text = "2"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "4"; } } } else if (Mischschlaefer_Frau.Checked == true) { if (EingabeZahl >= 65) { if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "2H"; } } else { if (Soft.Checked == true) { Leiste5_Frau.Text = "3"; Leiste6_Frau.Text = "3"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "4"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "1H"; } } } else { if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "3H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "4H"; Leiste6_Frau.Text = "4"; } } else { if (Soft.Checked == true) { Leiste5_Frau.Text = "4"; Leiste6_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste5_Frau.Text = "1H"; Leiste6_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste5_Frau.Text = "2H"; Leiste6_Frau.Text = "4"; } } } } } private void Leisten56_Mann() { int EingabeZahl = 0; int EingabeZahl2 = 0; try { EingabeZahl = int.Parse(Lordose1_Mann.Text); EingabeZahl2 = int.Parse(Lordose2_Mann.Text); } catch { MessageBox.Show("asdf"); return; } if (Seitenschlaefer_Mann.Checked == true) if (EingabeZahl >= 65) { if (Soft.Checked == true) { Leiste5_Mann.Text = "3"; Leiste6_Mann.Text = "3"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } } else { if (Soft.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "4"; } } else if (Rueckenschlaefer_Mann.Checked == true) if (EingabeZahl >= 65) { if (EingabeZahl2 >= 60) { if (Soft.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "2H"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "3H"; Leiste6_Mann.Text = "3H"; } } else if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "2H"; } } else if (EingabeZahl2 >= 30) { if (Soft.Checked == true) { Leiste5_Mann.Text = "3"; Leiste6_Mann.Text = "3"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } } else { if (Soft.Checked == true) { Leiste5_Mann.Text = "2"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "3"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } } } else { if (EingabeZahl2 >= 60) { if (Soft.Checked == true) { Leiste5_Mann.Text = "4H"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1HH"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2HH"; Leiste6_Mann.Text = "4"; } } else if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "3H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "4H"; Leiste6_Mann.Text = "4"; } } else if (EingabeZahl2 >= 30) { if (Soft.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "4"; } } else { if (Soft.Checked == true) { Leiste5_Mann.Text = "2"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "4"; } } } else if (Mischschlaefer_Mann.Checked == true) { if (EingabeZahl >= 65) { if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "2H"; } } else { if (Soft.Checked == true) { Leiste5_Mann.Text = "3"; Leiste6_Mann.Text = "3"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "4"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "1H"; } } } else { if (EingabeZahl2 >= 45) { if (Soft.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "3H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "4H"; Leiste6_Mann.Text = "4"; } } else { if (Soft.Checked == true) { Leiste5_Mann.Text = "4"; Leiste6_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste5_Mann.Text = "1H"; Leiste6_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste5_Mann.Text = "2H"; Leiste6_Mann.Text = "4"; } } } } } private void Leisten78_Frau() { int EingabeZahl = 0; try { EingabeZahl = int.Parse(Becken_Frau.Text); } catch { MessageBox.Show("asdfasdf"); return; } if (Seitenschlaefer_Frau.Checked == true) if (EingabeZahl >= 36) { if (Soft.Checked == true) { Leiste7_Frau.Text = "1"; Leiste8_Frau.Text = "1"; } if (Medium.Checked == true) { Leiste7_Frau.Text = "2"; Leiste8_Frau.Text = "2"; } if (Fest.Checked == true) { Leiste7_Frau.Text = "3"; Leiste8_Frau.Text = "3"; } } else { if (Soft.Checked == true) { Leiste7_Frau.Text = "2"; Leiste8_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste7_Frau.Text = "3"; Leiste8_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste7_Frau.Text = "4"; Leiste8_Frau.Text = "4"; } } else if (Rueckenschlaefer_Frau.Checked == true) { if (Soft.Checked == true) { Leiste7_Frau.Text = "2"; Leiste8_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste7_Frau.Text = "3"; Leiste8_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste7_Frau.Text = "4"; Leiste8_Frau.Text = "4"; } } else if (Mischschlaefer_Frau.Checked == true) if (EingabeZahl >= 36) { if (Soft.Checked == true) { Leiste7_Frau.Text = "1,5"; Leiste8_Frau.Text = "1,5"; } if (Medium.Checked == true) { Leiste7_Frau.Text = "2,5"; Leiste8_Frau.Text = "2,5"; } if (Fest.Checked == true) { Leiste7_Frau.Text = "3,5"; Leiste8_Frau.Text = "3,5"; } } else { if (Soft.Checked == true) { Leiste7_Frau.Text = "2"; Leiste8_Frau.Text = "2"; } if (Medium.Checked == true) { Leiste7_Frau.Text = "3"; Leiste8_Frau.Text = "3"; } if (Fest.Checked == true) { Leiste7_Frau.Text = "4"; Leiste8_Frau.Text = "4"; } } else { EingabeZahl = 0; Leiste7_Frau.Text = "XX"; Leiste8_Frau.Text = "XX"; } } private void Leisten78_Mann() { int EingabeZahlm = 0; try { EingabeZahlm = int.Parse(Becken_Mann.Text); } catch { MessageBox.Show("asdfasdf"); return; } if (Seitenschlaefer_Mann.Checked == true) if (EingabeZahlm >= 38.5) { if (Soft.Checked == true) { Leiste7_Mann.Text = "1"; Leiste8_Mann.Text = "1"; } if (Medium.Checked == true) { Leiste7_Mann.Text = "2"; Leiste8_Mann.Text = "2"; } if (Fest.Checked == true) { Leiste7_Mann.Text = "4"; Leiste8_Mann.Text = "4"; } } else { if (Soft.Checked == true) { Leiste7_Mann.Text = "2"; Leiste8_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste7_Mann.Text = "3"; Leiste8_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste7_Mann.Text = "4"; Leiste8_Mann.Text = "4"; } } else if (Rueckenschlaefer_Frau.Checked == true) { if (Soft.Checked == true) { Leiste7_Mann.Text = "2"; Leiste8_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste7_Mann.Text = "3"; Leiste8_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste7_Mann.Text = "4"; Leiste8_Mann.Text = "4"; } } else if (Mischschlaefer_Mann.Checked == true) if (EingabeZahlm >= 38.5) { if (Soft.Checked == true) { Leiste7_Mann.Text = "1,5"; Leiste8_Mann.Text = "1,5"; } if (Medium.Checked == true) { Leiste7_Mann.Text = "2,5"; Leiste8_Mann.Text = "2,5"; } if (Fest.Checked == true) { Leiste7_Mann.Text = "3,5"; Leiste8_Mann.Text = "3,5"; } } else { if (Soft.Checked == true) { Leiste7_Mann.Text = "2"; Leiste8_Mann.Text = "2"; } if (Medium.Checked == true) { Leiste7_Mann.Text = "3"; Leiste8_Mann.Text = "3"; } if (Fest.Checked == true) { Leiste7_Mann.Text = "4"; Leiste8_Mann.Text = "4"; } } else { EingabeZahlm = 0; Leiste7_Mann.Text = "XX"; Leiste8_Mann.Text = "XX"; } } private void Leisten910_Frau() { int EingabeZahl = 0; try { EingabeZahl = int.Parse(Knie_Frau.Text); } catch { MessageBox.Show("Bitte bei der Dame nur Zahlen eingeben!"); return; } if (Seitenschlaefer_Frau.Checked == true) { if (EingabeZahl >= 130) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "HH"; } else if (EingabeZahl >= 127) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "H"; } else if (EingabeZahl >= 118) { Leiste9_Frau.Text = "H"; Leiste10_Frau.Text = "X"; } else if (EingabeZahl >= 0) { Leiste9_Frau.Text = "HH"; Leiste10_Frau.Text = "X"; } } else if (Rueckenschlaefer_Frau.Checked == true) { if (EingabeZahl >= 124) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "HH"; } else if (EingabeZahl >= 121) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "H"; } else if (EingabeZahl >= 118) { Leiste9_Frau.Text = "H"; Leiste10_Frau.Text = "X"; } else if (EingabeZahl >= 0) { Leiste9_Frau.Text = "HH"; Leiste10_Frau.Text = "X"; } } else if (Mischschlaefer_Frau.Checked == true) { if (EingabeZahl >= 127) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "HH"; } else if (EingabeZahl >= 124) { Leiste9_Frau.Text = "X"; Leiste10_Frau.Text = "H"; } else if (EingabeZahl >= 121) { Leiste9_Frau.Text = "H"; Leiste10_Frau.Text = "X"; } else if (EingabeZahl >= 0) { Leiste9_Frau.Text = "HH"; Leiste10_Frau.Text = "X"; } } else { EingabeZahl = 0; Leiste9_Frau.Text = "XX"; Leiste10_Frau.Text = "XX"; } } private void Leisten910_Mann() { int EingabeZahlm = 0; try { EingabeZahlm = int.Parse(Knie_Mann.Text); } catch { MessageBox.Show("Bitte bei der Dame nur Zahlen eingeben!"); return; } if (Seitenschlaefer_Mann.Checked == true) { if (EingabeZahlm >= 130) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "HH"; } else if (EingabeZahlm >= 127) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "H"; } else if (EingabeZahlm >= 118) { Leiste9_Mann.Text = "H"; Leiste10_Mann.Text = "X"; } else if (EingabeZahlm >= 0) { Leiste9_Mann.Text = "HH"; Leiste10_Mann.Text = "X"; } } else if (Rueckenschlaefer_Mann.Checked == true) { if (EingabeZahlm >= 124) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "HH"; } else if (EingabeZahlm >= 121) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "H"; } else if (EingabeZahlm >= 118) { Leiste9_Mann.Text = "H"; Leiste10_Mann.Text = "X"; } else if (EingabeZahlm >= 0) { Leiste9_Mann.Text = "HH"; Leiste10_Mann.Text = "X"; } } else if (Mischschlaefer_Mann.Checked == true) { if (EingabeZahlm >= 127) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "HH"; } else if (EingabeZahlm >= 124) { Leiste9_Mann.Text = "X"; Leiste10_Mann.Text = "H"; } else if (EingabeZahlm >= 121) { Leiste9_Mann.Text = "H"; Leiste10_Mann.Text = "X"; } else if (EingabeZahlm >= 0) { Leiste9_Mann.Text = "HH"; Leiste10_Mann.Text = "X"; } } else { EingabeZahlm = 0; Leiste9_Mann.Text = "XX"; Leiste10_Mann.Text = "XX"; } } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { saveFileDialog1.ShowDialog(); string filename = saveFileDialog1.FileName; StreamWriter sw = new StreamWriter(filename); sw.WriteLine(Nachnahme_Eingabe_Mann.Text); sw.WriteLine(Vornahme_Eingabe_Mann.Text); sw.WriteLine(Nachnahme_Eingabe_Frau.Text); sw.WriteLine(Vornahme_Eingabe_Frau.Text); sw.WriteLine(Datum_Eingabe.Text); sw.WriteLine(Fachberater_Eingabe.Text); sw.Close(); } private void Drucken_Eingabe_Click(object sender, EventArgs e) { Print.PrintControl(this, new PrinterSettings()); } private void Drucken_Ausgabe_Click(object sender, EventArgs e) { Print.PrintControl(this, new PrinterSettings()); } } }