Lucky 35, 7
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;
Namespace caipiao
{
Public partial class form1: Form
{
Public form1 ()
{
Initializecomponent ();
}
Public void rand ()
{
Random r = new random ();
List <int> lT = new list <int> ();
For (INT I = 0; I <1000; I ++)
{
// Generate a random number between 1 and 35
Int number = R. Next (1, 36 );
// Add the randomly generated 35 random numbers to the list
If (! Lt. Contains (number ))
{
Lt. Add (number );
}
}
Int Index = 0;
// Traverse the controls in the form
Foreach (control CTL in this. Controls)
{
If (CTL is textbox)
{
(CTL as textbox). Text = lt [Index]. tostring ();
Index ++;
}
}
}
Private void btnstart_click (Object sender, eventargs E)
{
If (this. btnstart. Text = "start ")
{
Timer1.enabled = true;
This. btnstart. Text = "stop ";
}
Else if (this. btnstart. Text = "stop ")
{
This. btnstart. Text = "start ";
Timer1.enabled = false;
}
}
Private void timereffectick (Object sender, eventargs E)
{
Rand ();
}
Private void form1_load (Object sender, eventargs E)
{
This. skinengine1.skinfile = "warmcolor2.ssk ";
}
Private void btnchange_click (Object sender, eventargs E)
{
If (this. skinengine1.skinfile = "warmcolor2.ssk ")
{
This. skinengine1.skinfile = "sportsgreen. SSK ";
}
Else
{
This. skinengine1.skinfile = "warmcolor2.ssk ";
}
}
}
}