Lucky 35, 7

Source: Internet
Author: User

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 ";
}
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.