Implementing Windows Data Updates

Source: Internet
Author: User

One. Enumeration

Enumerations are a descriptive set of names
Define a limited set of values that cannot contain methods
To constrain a possible value

1. Defining enum Classes

public enum Gender
{
Male,female
}

2. Using enumerations to represent integer values

public enum Gender
{
Male=1,
Female=0
}

Console.WriteLine ((int) gender.male);

3. Enumeration type and string conversions

Enumeration to String
Gender.Female.ToStirng ();
String conversion to Enumeration
(Gender) (Enum.parse (typeof (Gender), "Male");

Two. Pictruebox

Image to display in the control
SizeMode How to handle the size relationship of images and controls

Three. Timer

The frequency, in milliseconds, that the interval event occurred
Whether enabled events are raised on a timed basis
Tick events that occur periodically

Four. Timed switching of images

if (Index < this.ilabout.images.count-1)
{
index++;
}
Else
{
index = 0;
}
This.picabout.Image = This.ilabout.images[index];

Implementing Windows Data Updates

Related Article

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.