30種圖像動畫特效算法(C#多線程版)(中)

這是截屏動畫效果:

此次是(中),共10種特效:php

  
  
  
  
  1. #region 隨機豎條  
  2.  
  3. // 原理:將圖像分紅寬度相等的列,而後隨機選擇每一列並從上到下顯示  
  4. private void Animator11()  
  5. {  
  6.     const float lineWidth = 40; // 豎條寬度  
  7.     const int stepCount = 12; // 豎條每次前進量  
  8.     try 
  9.     {  
  10.         OnDrawStarted(this, EventArgs.Empty);  
  11.         ClearBackground();  
  12.  
  13.         Random rnd = new Random(); // 隨機數類  
  14.         // 生成每一個列隨機顯示的次序  
  15.         int[] colIndex = new int[(int)Math.Ceiling(bmp.Width / lineWidth)];  
  16.         int index = 1; // 數組索引  
  17.         // 數組被自動初始化爲0,所以能夠經過判斷其中的元素是否爲0而得知該位置是否產生了隨機數  
  18.         // 爲了區別自動初始化的元素值,index從1開始  
  19.         do 
  20.         {  
  21.             int s = rnd.Next(colIndex.Length);  
  22.             if (colIndex[s] == 0)  
  23.             {  
  24.                 colIndex[s] = index++;  
  25.             }  
  26.         } while (index <= colIndex.Length);  
  27.         // 按照上面隨機生成的次序逐一顯示每一個豎條  
  28.         for (int i = 0; i < colIndex.Length; i++)  
  29.         {  
  30.             for (int y = 0; y < bmp.Height; y += stepCount)  
  31.             {  
  32.                 RectangleF rect = new RectangleF((colIndex[i] - 1) * lineWidth, y, lineWidth, stepCount);  
  33.                 dc.DrawImage(bmp, rect, rect, GraphicsUnit.Pixel);  
  34.  
  35.                 Thread.Sleep(1 * delay);  
  36.                 ShowBmp(rect);  
  37.             }  
  38.  
  39.             Thread.Sleep(10 * delay);  
  40.         }  
  41.     }  
  42.     catch (Exception ex)  
  43.     {  
  44.         ShowError(ex.Message);  
  45.     }  
  46.     finally 
  47.     {  
  48.         OnDrawCompleted(this, EventArgs.Empty);  
  49.     }  
  50. }  
  51.  
  52. #endregion  
  53.  
  54. #region 隨機拉絲  
  55.  
  56. // 原理:每次隨機顯示圖像的一個像素行  
  57. private void Animator12()  
  58. {  
  59.     try 
  60.     {  
  61.         OnDrawStarted(this, EventArgs.Empty);  
  62.         ClearBackground();  
  63.  
  64.         Random rnd = new Random(); // 隨機數類  
  65.         // 生成每一個像素行的顯示次序  
  66.         int[] rowIndex = new int[bmp.Height];  
  67.         int index = 1; // 數組索引  
  68.         do 
  69.         {  
  70.             int s = rnd.Next(rowIndex.Length);  
  71.             if (rowIndex[s] == 0)  
  72.             {  
  73.                 rowIndex[s] = index++;  
  74.             }  
  75.         } while (index <= rowIndex.Length);  
  76.         // 按照上面隨機生成的次序逐一顯示每一個像素行  
  77.         for (int i = 0; i < rowIndex.Length; i++)  
  78.         {  
  79.             RectangleF rect = new RectangleF(0, (rowIndex[i] - 1), bmp.Width, 1);  
  80.             dc.DrawImage(bmp, rect, rect, GraphicsUnit.Pixel);  
  81.  
  82.             ShowBmp(rect);  
  83.             Thread.Sleep(1 * delay);  
  84.         }  
  85.     }  
  86.     catch (Exception ex)  
  87.     {  
  88.         ShowError(ex.Message);  
  89.     }  
  90.     finally 
  91.     {  
  92.         OnDrawCompleted(this, EventArgs.Empty);  
  93.     }  
  94. }  
  95.  
  96. #endregion  
  97.  
  98. #region 垂直對切  
  99.  
  100. // 原理:由圖像中心向分左右兩半分別向上下兩個方向顯示,到達邊緣後按一樣方向補齊另外的部分  
  101. private void Animator13()  
  102. {  
  103.     const int stepCount = 4; // 上下前進的增量像素,應能被高度整除  
  104.     try 
  105.     {  
  106.         OnDrawStarted(this, EventArgs.Empty);  
  107.         ClearBackground();  
  108.  
  109.         // 第一次循環,左半部分從垂直中心向上顯示,右半部分從垂直中心向下顯示  
  110.         for (int y = 0; y <= bmp.Height / 2; y += stepCount)  
  111.         {  
  112.             // 左半部分  
  113.             Rectangle rectLeft = new Rectangle(0, bmp.Height / 2 - y - stepCount, bmp.Width / 2, stepCount);  
  114.             dc.DrawImage(bmp, rectLeft, rectLeft, GraphicsUnit.Pixel);  
  115.             // 右半部分  
  116.             Rectangle rectRight = new Rectangle(bmp.Width / 2, bmp.Height / 2 + y, bmp.Width / 2, stepCount);  
  117.             dc.DrawImage(bmp, rectRight, rectRight, GraphicsUnit.Pixel);  
  118.  
  119.             ShowBmp(Rectangle.Union(rectLeft, rectRight));  
  120.             Thread.Sleep(10 * delay);  
  121.         }  
  122.         // 第二次循環,左半部分從底邊向上顯示,右半部分從頂邊向下顯示  
  123.         for (int y = 0; y <= bmp.Height / 2; y += stepCount)  
  124.         {  
  125.             // 左半部分  
  126.             Rectangle rectLeft = new Rectangle(0, bmp.Height - y - stepCount, bmp.Width / 2, stepCount);  
  127.             dc.DrawImage(bmp, rectLeft, rectLeft, GraphicsUnit.Pixel);  
  128.             // 右半部分  
  129.             Rectangle rectRight = new Rectangle(bmp.Width / 2, y, bmp.Width / 2, stepCount);  
  130.             dc.DrawImage(bmp, rectRight, rectRight, GraphicsUnit.Pixel);  
  131.  
  132.             ShowBmp(Rectangle.Union(rectLeft, rectRight));  
  133.             Thread.Sleep(10 * delay);  
  134.         }  
  135.     }  
  136.     catch (Exception ex)  
  137.     {  
  138.         ShowError(ex.Message);  
  139.     }  
  140.     finally 
  141.     {  
  142.         OnDrawCompleted(this, EventArgs.Empty);  
  143.     }  
  144. }  
  145.  
  146. #endregion  
  147.  
  148. #region 隨機分塊  
  149.  
  150. // 原理:框像分割爲相等的正方塊,而後逐個隨機顯示其中之一,直到所有顯示完成  
  151. private void Animator14()  
  152. {  
  153.     const float blockSize = 50; // 分塊尺寸,若是該尺寸爲4到6時,顯示效果爲隨機圖點  
  154.     try 
  155.     {  
  156.         OnDrawStarted(this, EventArgs.Empty);  
  157.         ClearBackground();  
  158.  
  159.         Random rnd = new Random(); // 隨機數類  
  160.         // 定義二維數組,對應每一個分塊,其中保存該塊的位置索引(基於總塊數)  
  161.         int[,] blockIndex = new int[(int)Math.Ceiling(bmp.Width / blockSize), (int)Math.Ceiling(bmp.Height / blockSize)];  
  162.  
  163.         // 生成隨機快座標,並填充順序號  
  164.         int s = 1; // 分塊次序(從左到右,從上到下)  
  165.         do 
  166.         {  
  167.             int x = rnd.Next(blockIndex.GetLength(0));  
  168.             int y = rnd.Next(blockIndex.GetLength(1));  
  169.             if (blockIndex[x, y] == 0)  
  170.             {  
  171.                 blockIndex[x, y] = s++;  
  172.             }  
  173.         } while (s <= blockIndex.GetLength(0) * blockIndex.GetLength(1));  
  174.  
  175.         // 按照上面隨機生成的次序逐一顯示全部分塊  
  176.         for (int x = 0; x < blockIndex.GetLength(0); x++)  
  177.         {  
  178.             for (int y = 0; y < blockIndex.GetLength(1); y++)  
  179.             {  
  180.                 // blockIndex[x, y]中保存的是分塊的顯示次序,能夠將其轉換爲對應的座標  
  181.                 RectangleF rect = new RectangleF(((blockIndex[x, y] - 1) % blockIndex.GetLength(0)) * blockSize,  
  182.                     ((blockIndex[x, y] - 1) / blockIndex.GetLength(0)) * blockSize, blockSize, blockSize);  
  183.                 dc.DrawImage(bmp, rect, rect, GraphicsUnit.Pixel);  
  184.  
  185.                 ShowBmp(rect);  
  186.                 Thread.Sleep(10 * delay);  
  187.             }  
  188.         }  
  189.     }  
  190.     catch (Exception ex)  
  191.     {  
  192.         ShowError(ex.Message);  
  193.     }  
  194.     finally 
  195.     {  
  196.         OnDrawCompleted(this, EventArgs.Empty);  
  197.     }  
  198. }  
  199.  
  200. #endregion  
  201.  
  202. #region 對角閉幕  
  203.  
  204. // 原理:每次繪製全部圖像內容,而後將不可見的區域生成閉合GraphicsPath並用背景色填充該區域  
  205. private void Animator15()  
  206. {  
  207.     const int stepCount = 4; // y軸的增量像素,應能被高度整除  
  208.     try 
  209.     {  
  210.         OnDrawStarted(this, EventArgs.Empty);  
  211.         ClearBackground();  
  212.  
  213.         // 左上角座標p0(x0, y0)從左到右,p1(x1, y1)從上到下  
  214.         // 右下角座標p2(x2, y2)從右到左,p3(x3, y3)從下到上  
  215.         // 這四個點與左下角點和右上角點構成不可見區域  
  216.         PointF p0 = new Point(0, 0);  
  217.         PointF p1 = new Point(0, 0);  
  218.         PointF p2 = new Point(bmp.Width - 1, bmp.Height - 1);  
  219.         PointF p3 = new Point(bmp.Width - 1, bmp.Height - 1);  
  220.         // 表示不可見區域的閉合路徑  
  221.         GraphicsPath path = new GraphicsPath();  
  222.         // 以y軸stepCount個像素爲增量,也可使用x軸爲增量,通常使用較短的那個軸  
  223.         for (int y = 0; y < bmp.Height; y += stepCount)  
  224.         {  
  225.             p0.X = y * Convert.ToSingle(bmp.Width) / Convert.ToSingle(bmp.Height); // 以浮點數計算,保證精度  
  226.             p1.Y = y;  
  227.             p2.X = bmp.Width - 1 - p0.X;  
  228.             p3.Y = bmp.Height - 1 - p1.Y;  
  229.             path.Reset();  
  230.             path.AddPolygon(new PointF[] { p0, new PointF(bmp.Width, 0), p3, p2, new PointF(0, bmp.Height), p1 });  
  231.             dc.DrawImage(bmp, 0, 0); // 繪製所有圖像  
  232.             dc.FillPath(new SolidBrush(Color.FromKnownColor(KnownColor.ButtonFace)), path); // 填充不可見區域  
  233.  
  234.             ShowBmp(path.GetBounds());  
  235.             Thread.Sleep(10 * delay);  
  236.         }  
  237.         // 因爲最後一次繪製的不可見區域並不須要,在這裏使所有區域可見  
  238.         dc.DrawImage(bmp, 0, 0);  
  239.  
  240.         ShowBmp();  
  241.     }  
  242.     catch (Exception ex)  
  243.     {  
  244.         ShowError(ex.Message);  
  245.     }  
  246.     finally 
  247.     {  
  248.         OnDrawCompleted(this, EventArgs.Empty);  
  249.     }  
  250. }  
  251.  
  252. #endregion  
  253.  
  254. #region 垂直百葉(改進版)  
  255.  
  256. // 原理:在圖像的垂直方向分爲高度相等的若干條,而後從上到下計算每次須要顯示的區域  
  257. private void Animator16()  
  258. {  
  259.     const float lineHeight = 50; // 百葉高度  
  260.     try 
  261.     {  
  262.         OnDrawStarted(this, EventArgs.Empty);  
  263.         ClearBackground();  
  264.  
  265.         GraphicsPath path = new GraphicsPath();  
  266.         TextureBrush textureBrush = new TextureBrush(bmp);  
  267.         for (int i = 0; i < lineHeight; i++) // 每條百葉逐行像素顯示  
  268.         {  
  269.             for (int j = 0; j < Math.Ceiling(bmp.Height / lineHeight); j++)  
  270.             {  
  271.                 RectangleF rect = new RectangleF(0, lineHeight * j + i, bmp.Width, 1);  
  272.                 path.AddRectangle(rect);  
  273.             }  
  274.             dc.FillPath(textureBrush, path);  
  275.  
  276.             ShowBmp();  
  277.             Thread.Sleep(10 * delay);  
  278.         }  
  279.     }  
  280.     catch (Exception ex)  
  281.     {  
  282.         ShowError(ex.Message);  
  283.     }  
  284.     finally 
  285.     {  
  286.         OnDrawCompleted(this, EventArgs.Empty);  
  287.     }  
  288. }  
  289.  
  290. #endregion  
  291.  
  292. #region 壓縮豎條(改進版)  
  293.  
  294. // 原理:在圖像的水平方向分爲寬度相等的若干條,而後逐一加寬每條豎條的寬度,並在其中顯示該條圖像的所有內容  
  295. private void Animator17()  
  296. {  
  297.     const float lineWidth = 100; // 分條寬度  
  298.     const int stepCount = 4; // 每次加寬的步進像素,應能被lineWidth整除  
  299.     try 
  300.     {  
  301.         OnDrawStarted(this, EventArgs.Empty);  
  302.         ClearBackground();  
  303.  
  304.         for (int i = 0; i < Math.Ceiling(bmp.Width / lineWidth); i++)  
  305.         {  
  306.             for (int j = stepCount; j <= lineWidth; j += stepCount) // 每條寬度逐漸增長,以產生縮放效果  
  307.             {  
  308.                 RectangleF sourRect = new RectangleF(lineWidth * i, 0, lineWidth, bmp.Height);  
  309.                 RectangleF destRect = new RectangleF(lineWidth * i, 0, j, bmp.Height);  
  310.                 dc.DrawImage(bmp, destRect, sourRect, GraphicsUnit.Pixel);  
  311.  
  312.                 ShowBmp(destRect);  
  313.                 Thread.Sleep(10 * delay);  
  314.             }  
  315.         }  
  316.     }  
  317.     catch (Exception ex)  
  318.     {  
  319.         ShowError(ex.Message);  
  320.     }  
  321.     finally 
  322.     {  
  323.         OnDrawCompleted(this, EventArgs.Empty);  
  324.     }  
  325. }  
  326.  
  327. #endregion  
  328.  
  329. #region 水平拉入(改進版)  
  330.  
  331. // 原理:因爲內存位圖與設備無關,故不能使用在水平方向逐漸改變圖像分辨率(每英寸點數)的辦法  
  332. // 而改成使用在水平方向拉伸顯示,並逐步縮小  
  333. private void Animator18()  
  334. {  
  335.     try 
  336.     {  
  337.         OnDrawStarted(this, EventArgs.Empty);  
  338.         //ClearBackground();  
  339.  
  340.         for (float i = 1; i <= dc.DpiX; i++)  
  341.         {  
  342.             RectangleF destRect = new RectangleF(0, 0, bmp.Width * dc.DpiX / i, bmp.Height);  
  343.             RectangleF sourRect = new RectangleF(0, 0, bmp.Width, bmp.Height);  
  344.             dc.DrawImage(bmp, destRect, sourRect, GraphicsUnit.Pixel);  
  345.  
  346.             ShowBmp();  
  347.             Thread.Sleep(10 * delay);  
  348.         }  
  349.     }  
  350.     catch (Exception ex)  
  351.     {  
  352.         ShowError(ex.Message);  
  353.     }  
  354.     finally 
  355.     {  
  356.         OnDrawCompleted(this, EventArgs.Empty);  
  357.     }  
  358. }  
  359.  
  360. #endregion  
  361.  
  362. #region 三色對接(改進版)  
  363.  
  364. // 原理:使用ImageAttributes類和顏色轉換矩陣處理圖像,首先R和B分別從左右向中心移動,相遇後繼續移動,且G從兩側向中間移動,直到相遇  
  365. private void Animator19()  
  366. {  
  367.     const int stepCount = 4; // 各個區域每次增長的像素量  
  368.     try 
  369.     {  
  370.         OnDrawStarted(this, EventArgs.Empty);  
  371.         ClearBackground();  
  372.  
  373.         // 創建三個時間段所需的5個不一樣顏色轉換後的位圖  
  374.         Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); // 位圖的所有矩形區域  
  375.         // 紅色份量位圖  
  376.         ColorMatrix matrix = new ColorMatrix();  
  377.         matrix.Matrix00 = 1f; // R  
  378.         matrix.Matrix11 = 0f; // G  
  379.         matrix.Matrix22 = 0f; // B  
  380.         ImageAttributes attributes = new ImageAttributes();  
  381.         attributes.SetColorMatrix(matrix); // 使用R份量轉換矩陣  
  382.         Bitmap redBmp = new Bitmap(bmp.Width, bmp.Height);  
  383.         Graphics.FromImage(redBmp).DrawImage(bmp, rect, 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, attributes);  
  384.         // 藍色份量位圖  
  385.         matrix.Matrix00 = 0f; // R  
  386.         matrix.Matrix11 = 0f; // G  
  387.         matrix.Matrix22 = 1f; // B  
  388.         attributes.SetColorMatrix(matrix); // 使用B份量轉換矩陣  
  389.         Bitmap blueBmp = new Bitmap(bmp.Width, bmp.Height);  
  390.         Graphics.FromImage(blueBmp).DrawImage(bmp, rect, 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, attributes);  
  391.         // 紅藍份量位圖  
  392.         matrix.Matrix00 = 1f; // R  
  393.         matrix.Matrix11 = 0f; // G  
  394.         matrix.Matrix22 = 1f; // B  
  395.         attributes.SetColorMatrix(matrix); // 使用B份量轉換矩陣  
  396.         Bitmap redBlueBmp = new Bitmap(bmp.Width, bmp.Height);  
  397.         Graphics.FromImage(redBlueBmp).DrawImage(bmp, rect, 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, attributes);  
  398.         // 紅綠份量位圖  
  399.         matrix.Matrix00 = 1f; // R  
  400.         matrix.Matrix11 = 1f; // G  
  401.         matrix.Matrix22 = 0f; // B  
  402.         attributes.SetColorMatrix(matrix); // 使用B份量轉換矩陣  
  403.         Bitmap redGreenBmp = new Bitmap(bmp.Width, bmp.Height);  
  404.         Graphics.FromImage(redGreenBmp).DrawImage(bmp, rect, 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, attributes);  
  405.         // 藍綠份量位圖  
  406.         matrix.Matrix00 = 0f; // R  
  407.         matrix.Matrix11 = 1f; // G  
  408.         matrix.Matrix22 = 1f; // B  
  409.         attributes.SetColorMatrix(matrix); // 使用B份量轉換矩陣  
  410.         Bitmap blueGreenBmp = new Bitmap(bmp.Width, bmp.Height);  
  411.         Graphics.FromImage(blueGreenBmp).DrawImage(bmp, rect, 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, attributes);  
  412.  
  413.  
  414.         // 第1段:1/2時間(設從左到右時間爲1),R和B分別從左右向中間移動,在1/2處相遇  
  415.         for (int x = 0; x < bmp.Width / 2; x += stepCount)  
  416.         {  
  417.             Rectangle rectR = new Rectangle(x, 0, stepCount, bmp.Height); // R的區域,從左到右  
  418.             dc.DrawImage(redBmp, rectR, rectR, GraphicsUnit.Pixel);  
  419.  
  420.             Rectangle rectB = new Rectangle(bmp.Width - x - stepCount, 0, stepCount, bmp.Height); // B的區域,從右到左  
  421.             dc.DrawImage(blueBmp, rectB, rectB, GraphicsUnit.Pixel);  
  422.  
  423.             ShowBmp(Rectangle.Union(rectR, rectB));  
  424.             Thread.Sleep(10 * delay);  
  425.         }  
  426.  
  427.         // 第2段:1/4時間,R和B從中間分別向右、左移動,G從左右向中間移動,在1/4和3/4處相遇  
  428.         ColorMatrix matrixGLeft = new ColorMatrix(); // 處理從左到右的G  
  429.         ColorMatrix matrixGRight = new ColorMatrix(); // 處理從右到左的G  
  430.         for (int x = 0; x < bmp.Width / 4; x += stepCount)  
  431.         {  
  432.             Rectangle rectBR = new Rectangle(bmp.Width / 2 - x - stepCount, 0, 2 * (x + stepCount), bmp.Height); // B和R的區域(位於中心)  
  433.             dc.DrawImage(redBlueBmp, rectBR, rectBR, GraphicsUnit.Pixel);  
  434.  
  435.             Rectangle rectGLeft = new Rectangle(x, 0, stepCount, bmp.Height); // 左側G的區域,從左到右  
  436.             dc.DrawImage(redGreenBmp, rectGLeft, rectGLeft, GraphicsUnit.Pixel);  
  437.  
  438.             Rectangle rectGRight = new Rectangle(bmp.Width - x - stepCount, 0, stepCount, bmp.Height); // 右側G的區域,從右到左  
  439.             dc.DrawImage(blueGreenBmp, rectGRight, rectGRight, GraphicsUnit.Pixel);  
  440.  
  441.             ShowBmp(Rectangle.Union(Rectangle.Union(rectBR, rectGLeft), rectGRight));  
  442.             Thread.Sleep(10 * delay);  
  443.         }  
  444.  
  445.         // 第3段:1/4時間,顯示全色,在1/4處同時向左右兩側擴展(即每次左右各擴展stepCount像素),3/4處與1/4處相同  
  446.         for (int x = 0; x < bmp.Width / 4; x += stepCount)  
  447.         {  
  448.             Rectangle rect1_4 = new Rectangle(bmp.Width / 4 - x - stepCount, 0, 2 * (x + stepCount), bmp.Height); // 1/4處的區域  
  449.             dc.DrawImage(bmp, rect1_4, rect1_4, GraphicsUnit.Pixel);  
  450.  
  451.             Rectangle rect3_4 = new Rectangle(bmp.Width / 4 * 3 - x - stepCount, 0, 2 * (x + stepCount), bmp.Height); // 3/4處的區域  
  452.             dc.DrawImage(bmp, rect3_4, rect3_4, GraphicsUnit.Pixel);  
  453.  
  454.             ShowBmp(Rectangle.Union(rect1_4, rect3_4));  
  455.             Thread.Sleep(10 * delay);  
  456.         }  
  457.  
  458.     }  
  459.     catch (Exception ex)  
  460.     {  
  461.         ShowError(ex.Message);  
  462.     }  
  463.     finally 
  464.     {  
  465.         OnDrawCompleted(this, EventArgs.Empty);  
  466.     }  
  467. }  
  468.  
  469. #endregion  
  470.  
  471. #region 對角滑動(改進版)  
  472.  
  473. // 原理:在水平方向從右到左,在垂直方向從下到上移動圖像  
  474. private void Animator20()  
  475. {  
  476.     const int movePixel = 4; // 每次移動的像素,應能被圖像高度整除  
  477.     try 
  478.     {  
  479.         OnDrawStarted(this, EventArgs.Empty);  
  480.         ClearBackground();  
  481.  
  482.         RectangleF sourRect = new RectangleF(0, 0, bmp.Width, bmp.Height);  
  483.         for (int y = bmp.Height; y >= 0; y -= movePixel) // 從下到上移動圖像  
  484.         {  
  485.             // 按比例計算水平方向移動的量  
  486.             RectangleF destRect = new RectangleF(y * Convert.ToSingle(bmp.Width) / bmp.Height, y, bmp.Width, bmp.Height);  
  487.             dc.DrawImage(bmp, destRect, sourRect, GraphicsUnit.Pixel);  
  488.  
  489.             ShowBmp(destRect);  
  490.             Thread.Sleep(10 * delay);  
  491.         }  
  492.     }  
  493.     catch (Exception ex)  
  494.     {  
  495.         ShowError(ex.Message);  
  496.     }  
  497.     finally 
  498.     {  
  499.         OnDrawCompleted(this, EventArgs.Empty);  
  500.     }  
  501. }  
  502.  
  503. #endregion 

    源程序沒有必要解釋了,當初編寫的時候我就加了很是詳細的註釋,只要你又必定的.NET基礎,應該徹底能夠讀懂!
這裏是本文的最後一部分:http://mengliao.blog.51cto.com/876134/473214
windows

相關文章
相關標籤/搜索