zoukankan      html  css  js  c++  java
  • 实现Windows程序的数据更新

    一.枚举
      枚举是一组描述性的名称
       定义一组有限的值,不能包含方法
       对可能的值进行约束
      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];
  • 相关阅读:
    hdoj:2075
    hdoj:2072
    hdoj:2071
    hdoj:2070
    hdoj:2069
    test001
    hdoj:2067
    hdoj:2061
    hdoj:2058
    hdoj:2057
  • 原文地址:https://www.cnblogs.com/rzbwyj/p/9443398.html
Copyright © 2011-2022 走看看