Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.64 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace LottoZiehung
  11. {
  12.     public partial class UZiehung : UserControl
  13.     {
  14.         public UZiehung()
  15.         {
  16.             InitializeComponent();
  17.  
  18.             lblDatum.Text = DateTime.Now.ToLongDateString();
  19.  
  20.             int u = Ziehung.zwischenSpeicher.Count;
  21.             int zwischen = 0;
  22.             Label[] lbls = new Label[u];
  23.             while (zwischen < u)
  24.             {
  25.                 lbls[zwischen] = new Label();
  26.                 zwischen++;
  27.             }
  28.  
  29.             int a = 0;
  30.             int x = 31;
  31.  
  32.             while (a < Ziehung.zwischenSpeicher.Count)
  33.             {
  34.                 lbls[a].Location = new Point(15 + a * x, 59);
  35.                 lbls[a].Size = new Size(25, 20);
  36.                 lbls[a].Text = Ziehung.zwischenSpeicher.ElementAt(a).ToString();
  37.                 this.Controls.Add(lbls[a]);
  38.                 a++;    
  39.             }
  40.  
  41.             Label lblZusatzZahlText = new Label();
  42.             lblZusatzZahlText.Text = "Zusatzzahl:";
  43.             lblZusatzZahlText.Size = new Size(67, 20);
  44.             lblZusatzZahlText.Location = new Point(15 + (a * x), 39);
  45.             this.Controls.Add(lblZusatzZahlText);
  46.  
  47.             Label lblZusatzZahl = new Label();
  48.             lblZusatzZahl.Location = new Point(15 + (a * x) + 20, 59);
  49.             lblZusatzZahl.Size = new Size(25, 20);
  50.             lblZusatzZahl.Text = Ziehung.zusatzZahl.ToString();
  51.             this.Controls.Add(lblZusatzZahl);
  52.         }
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement