Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Laboration_1_U12
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         int ett, kryss, två = 0;
  16.         Random rand;
  17.         int tips = 0;
  18.  
  19.         public Form1()
  20.         {
  21.             InitializeComponent();  
  22.         }
  23.  
  24.         //public class Tipsen
  25.         //{
  26.         //}    
  27.        
  28.  
  29.         private void Form1_Load(object sender, EventArgs e)
  30.         {
  31.             Random randomTips = new Random();
  32.             tips = randomTips.Next();
  33.         }
  34.  
  35.         private void KnappGenerera_Click(object sender, EventArgs e)
  36.         {
  37.             ett = int.Parse(txtRutaHemmaseger.Text);
  38.             kryss = int.Parse(txtRutaOavgjort.Text);
  39.             två = int.Parse(txtRutaBortaSeger.Text);
  40.            
  41.             for (int i = 1; i < 14; i++)
  42.             {
  43.                 rand = new Random();
  44.                 {
  45.                     listBox1.Items.Add(i + ":\t" + tips);
  46.                 }
  47.             }
  48.            
  49.                
  50.         }
  51.  
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement