實現Windows資料更新

來源:互聯網
上載者:User

標籤:大小   關係   typeof   nbsp   名稱   枚舉   使用   資料   enabled   

一.枚舉

枚舉是一組描述性的名稱
定義一組有限的值,不能包含方法
對可能的值進行約束

1.定義枚舉類

public enum Gender
{
Male,Female
}

2.使用枚舉表示整數值

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

Console.WriteLine((int)Gender.Male);

3.枚舉類型和字串的相互轉換

枚舉轉換為字串
Gender.Female.ToStirng();
字串轉換為枚舉
(Gender)(Enum.Parse(typeof(Gender), "Male");

二.PictrueBox

Image 在控制項中顯示的映像
SizeMode如何處理映像和控制項的大小關係

三.Timer

Interval事件發生的頻率,以毫秒為單位
Enabled是否定時引發事件
Tick定時發生的事件

四.定時切換映像

if (index < this.ilabout.Images.Count - 1)
{
index++;
}
else
{
index = 0;
}
this.picabout.Image = this.ilabout.Images[index];

 

實現Windows資料更新

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.