亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? leddisplay.cs

?? 基于wince的LED時鐘 c#實(shí)現(xiàn),達(dá)到和電子表一樣的效果
?? CS
字號:
// Digital Clock Display by Sriram Chitturi (c) Copyright 2004
// A class to display digital digits and characters on a rectangular area

using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Consomen
{
	// A digit class which can draw a number on a graphics surface
	internal sealed class LEDDisplay
	{
		// pens used to draw the digits
		private static Pen pen = new Pen(Color.FromArgb(255,0,0));
		private static Pen dimPen = null;

		private float linewidth = 20.0F;
		private Point[] Points; // end point coordinates of lines in the digital display

		// for each digit the display bits are set into an int
		// 'A' and 'P' are included for AM and PM display in the clock
		private int[] displayNum = new int[12]{63,12,118,94,77,91,123,14,127,95,
												  111, // to display 'A'
												  103}; // to display 'P'

		// Rectangles in which colons are displayed
		private Rectangle colonRect1, colonRect2;
	
		// This function is called by the paint method to display the numbers
		// A set of bits in the 'displayNum' variable define which of the
		// display legs to display
		// Based on this the ones with a '1' are in bright color and the rest
		// with '0's are in a dull color giving the effect of a digital clock
		internal void Draw(int num,  // number to display
			Graphics g) // graphics object for drawing
		{
			int check; // used to check if a leg of digit should be bright or dull

			// although pens are global linewidths are specific to each instance
			pen.Width = dimPen.Width = linewidth;

			for (int i=0; i<7; i++)
			{
				check = (int)System.Math.Pow(2, i);
				if ((check & displayNum[num])==0)
                    g.DrawLine(dimPen, Points[i * 2].X, Points[i * 2].Y, Points[i * 2 + 1].X, Points[i * 2 + 1].Y);
				else
                    g.DrawLine(pen, Points[i * 2].X, Points[i * 2].Y, Points[i * 2 + 1].X, Points[i * 2 + 1].Y);
			}
		}

		static private void setDimPen()
		{
			if (dimPen == null) dimPen = (Pen)pen.Clone();
			dimPen.Width = pen.Width;
			dimPen.Color = Color.FromArgb(
				pen.Color.R > 0 ? 60:0,
				pen.Color.G > 0 ? 60:0,
				pen.Color.B > 0 ? 60:0);
		}

		static internal void SetPenColor(DigitalColor dclr)
		{
			pen.Color = Color.FromArgb(
				(dclr == DigitalColor.RedColor) ? 255:0 ,
				(dclr == DigitalColor.GreenColor) ? 255:0,
				(dclr == DigitalColor.BlueColor) ? 255:0);
			setDimPen();
		}

		// function that draws a colon in the middle of the rectangular panel
		// possible modes are circular or rectangular points in the colon
		internal void DrawColon(Graphics g, ColonType type, bool dim)
		{
			pen.Width = dimPen.Width = linewidth;
			Pen p = (dim) ? dimPen : pen; // choose a pen for blinkin

			switch(type)
			{
				case ColonType.Circular:
					g.DrawEllipse(p, colonRect1);
					g.DrawEllipse(p, colonRect2);
					break;
				case ColonType.Rectangular:
					g.DrawRectangle(p, colonRect1);
					g.DrawRectangle(p, colonRect2);
					break;
			}
		}

		// Draws the complete rectangle in dim shade to give the digital effect :-)
		internal void Draw(Graphics g)
		{
			// althought pens are static, linewidths are specific to each instance
			dimPen.Width = linewidth;
			for (int i=0; i<7; i++)
                g.DrawLine(dimPen, Points[i * 2].X, Points[i * 2].Y, Points[i * 2 + 1].X, Points[i * 2 + 1].Y);
		}

		// Overloaded function to display characters 'A' and 'P' for AM and PM
		// Using the same algorithm used to display numbers above
		internal void Draw(char ch, // character to display
						Graphics g) // graphics object for drawing
		{
			// 10 and 11 are indices of A and P in the displayNum array
			switch(Char.ToUpper(ch))
			{
				case 'A':
					Draw(10, g);
					break;
				case 'P':
					Draw(11, g);
					break;
			}
		}

		// Constructor takes a rectangle and prepares the end points
		// of the lines to be drawn for the clock
		internal DigitalDisplay(Rectangle rect)
		{
// 			pen.StartCap = LineCap.Triangle;
// 			pen.EndCap = LineCap.Triangle;

			Points = new Point[14]; // there are 7 lines in a display
			for (int i=0; i<14; i++)
				Points[i] = new Point(0,0);
			CalculateAllParameters(rect);
		}

		internal void CalculateAllParameters(Rectangle rect)
		{
			linewidth = (int)(rect.Width/5);
			if (linewidth < 2) linewidth = 2;
			if (linewidth > 20) linewidth = 20;
			pen.Width = linewidth;
			setDimPen();

			CalculateLineEnds(rect);
			CalculateColonRectangles(rect);
		}

		// Function calculates end points of lines to display
		// The draw function will draw lines using this data
		private void CalculateLineEnds(Rectangle rect)
		{
			// 0,1,2,9,10,11,12 points share the same left edge X coordinate
			Points[0].X = Points[1].X = Points[2].X = Points[9].X = 
				Points[10].X = Points[11].X = Points[12].X = rect.Left;
 
			// points 3,4,5,6,7,8,13 the right edge X coordinate
			Points[3].X = Points[4].X = Points[5].X = Points[6].X =
					Points[7].X = Points[8].X = Points[13].X= rect.Right-(int)linewidth;

			// Points 1,2,3,4 are the top most points
			Points[1].Y = Points[2].Y = Points[3].Y = Points[4].Y = (int)(rect.Top);

			// Points 0,11,12,13,5,6 are the middle points
			Points[0].Y = Points[11].Y = Points[12].Y = Points[13].Y =
						Points[5].Y = Points[6].Y = 
							rect.Top + (int)((rect.Height-linewidth)/2.0);
			// points 7,8,9,10 are on the bottom edge
			Points[7].Y = Points[8].Y = Points[9].Y = Points[10].Y 
							= rect.Top + (int)(rect.Height-linewidth);

			// now adjust the coordinates that were computed, to get the digital look
			AdjustCoordinates();
		}
	
		// This function is necessary to give the lines a digital clock look
		// Push the coordinates a little away so that they look apart
		private void AdjustCoordinates()
		{
			Point swap; // required in case points have to be swapped
			for (int i=0; i<7; i++)
			{
				// Always draw from left to right and top to bottom
				// Adjust the end points accordingly
				if (Points[i*2].X > Points[(i*2)+1].X || Points[i*2].Y > Points[(i*2)+1].Y)
				{
					swap = Points[i*2]; Points[i*2]= Points[(i*2)+1]; Points[(i*2)+1]=swap;
				}

				// for horizontal lines adjust the X coord
				if (Points[i*2].X != Points[(i*2)+1].X)
				{
					Points[i*2].X += (int)(linewidth/1.6);
					Points[(i*2)+1].X -= (int)(linewidth/1.6);
				}
				// for vertical lines adjust the y coord
				if (Points[i*2].Y != Points[(i*2)+1].Y)
				{
					Points[i*2].Y += (int)(linewidth/1.6);
					Points[(i*2)+1].Y -= (int)(linewidth/1.6);
				}
			}
		}

		// function to calculate the rectangles required to drawn colon dot inside
		private void CalculateColonRectangles(Rectangle rect)
		{
			colonRect1 = colonRect2 = rect;
			colonRect1.X = colonRect2.X = rect.X + (int)((rect.Width - linewidth)/2.0);
			colonRect1.Y = rect.Y + rect.Height/3;
			colonRect2.Y = rect.Y + (rect.Height*2)/3;
			colonRect1.Width = colonRect1.Height = 
				colonRect2.Width = colonRect2.Height = (int) linewidth;
		}
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品第四页| 成人黄色a**站在线观看| 欧美午夜一区二区| 性感美女久久精品| 欧美一区二区三区成人| 久草精品在线观看| 久久人人97超碰com| 成人性生交大片免费看中文| 国产精品乱码一区二区三区软件 | 亚洲成a人v欧美综合天堂| 亚洲成a人v欧美综合天堂下载| 亚洲最快最全在线视频| 欧美福利视频导航| 91久久精品一区二区| 91精品国产91久久久久久一区二区| 欧美日韩在线观看一区二区| 日韩一级片在线观看| 亚洲午夜一二三区视频| 亚洲欧美日韩国产综合在线| 午夜精品免费在线观看| 国产成人在线视频免费播放| 色综合一个色综合亚洲| 久久亚洲精品国产精品紫薇| 免费看黄色91| 制服丝袜日韩国产| 国精产品一区一区三区mba桃花| 国产精品美女久久久久久| 欧美日韩在线亚洲一区蜜芽| 国产一区二区三区黄视频 | 国产精品国产自产拍高清av | 自拍偷在线精品自拍偷无码专区| 欧洲精品视频在线观看| 精品一区二区三区在线播放 | 久久亚洲捆绑美女| 欧美性色综合网| 国产91在线|亚洲| 天堂精品中文字幕在线| 国产欧美日韩精品一区| 911国产精品| 在线播放国产精品二区一二区四区 | 亚洲一区二区三区自拍| 日韩午夜小视频| 色狠狠一区二区| 国产夫妻精品视频| 五月婷婷另类国产| 中文字幕中文在线不卡住| 日韩欧美激情在线| 欧美视频在线一区二区三区| 国产69精品久久99不卡| 青青草伊人久久| 亚洲亚洲精品在线观看| 国产精品美女久久久久aⅴ国产馆| 欧美一区欧美二区| 欧美丝袜丝交足nylons| 97国产精品videossex| 国产精品 欧美精品| 精品在线一区二区| 日韩综合小视频| 夜夜精品浪潮av一区二区三区| 国产精品视频麻豆| 久久久精品2019中文字幕之3| 欧美在线视频不卡| 国产精品婷婷午夜在线观看| 色综合久久九月婷婷色综合| 国产精品影视在线| 九九热在线视频观看这里只有精品| 成人国产精品免费网站| 国内外成人在线| 麻豆国产欧美日韩综合精品二区| 三级欧美韩日大片在线看| 亚洲自拍偷拍欧美| 亚洲午夜激情av| 亚洲综合色自拍一区| 亚洲精品成人悠悠色影视| 亚洲色图在线视频| 亚洲色欲色欲www| 一区二区三区欧美| 亚洲一区二区三区免费视频| 亚洲午夜免费视频| 午夜精品123| 蜜桃视频在线观看一区二区| 久久精品免费观看| 国产一区二区三区在线观看免费视频| 久久黄色级2电影| 黄色日韩三级电影| 国产高清在线观看免费不卡| 欧美一区二区国产| 久久久激情视频| 欧美色视频在线| 欧美二区在线观看| 日韩你懂的在线观看| 精品久久久久久久人人人人传媒| ww久久中文字幕| 中文字幕一区二区三| 一区二区激情视频| 日本不卡的三区四区五区| 精品一区二区三区久久久| 国产乱码一区二区三区| 白白色 亚洲乱淫| 欧美图区在线视频| 精品国产91洋老外米糕| 中文字幕免费一区| 亚洲一区二区在线视频| 久久疯狂做爰流白浆xx| 99精品黄色片免费大全| 欧美日韩综合一区| 精品捆绑美女sm三区| 国产精品国产三级国产| 亚洲成人一二三| 国产一区啦啦啦在线观看| 91在线观看视频| 在线综合视频播放| 国产精品高潮呻吟| 精品一区二区三区免费视频| 日本网站在线观看一区二区三区 | 日韩一区二区不卡| 欧美国产97人人爽人人喊| 亚洲欧美中日韩| 日韩国产精品91| 成人av电影观看| 91精品久久久久久久91蜜桃| 国产欧美日韩精品在线| 日韩精品亚洲专区| 成人污视频在线观看| 91精品国产综合久久国产大片| 国产欧美一区二区精品性色超碰 | 亚洲视频小说图片| 精品一区二区三区在线播放视频| 97久久精品人人做人人爽| 精品日韩一区二区三区免费视频| 亚洲少妇30p| 国产激情视频一区二区三区欧美| 欧美日韩亚洲丝袜制服| 国产精品午夜免费| 欧美日韩国产另类不卡| 精品亚洲成a人在线观看| 91在线国产观看| 国产精品美女久久久久久2018| 亚洲精品国产精品乱码不99| 国产精品亚洲一区二区三区妖精| 欧美亚洲国产一卡| 国产精品国产三级国产aⅴ入口 | 亚洲视频狠狠干| 国产精品77777| 日韩一区二区免费电影| 亚洲靠逼com| 成人福利视频在线| 国产欧美日韩久久| 国产呦精品一区二区三区网站| 欧美色图在线观看| 亚洲精品视频免费看| 粉嫩av一区二区三区在线播放| 精品国免费一区二区三区| 五月婷婷综合网| 欧美日韩一区二区三区不卡| 亚洲色图19p| 91小视频在线| 亚洲视频精选在线| 93久久精品日日躁夜夜躁欧美| 中文字幕第一区二区| 国产精品资源在线看| 欧美精品一区二区久久婷婷| 免费欧美高清视频| 亚洲国产精品久久人人爱蜜臀| 欧美乱妇15p| 26uuuu精品一区二区| 久久99精品久久久久婷婷| 欧美四级电影网| 亚洲午夜精品在线| 欧美日韩精品免费| 日韩电影免费在线| 欧美一区二区三级| 精品中文字幕一区二区| 久久综合给合久久狠狠狠97色69| 国产一区欧美二区| 国产三区在线成人av| 大美女一区二区三区| 最新成人av在线| 91久久国产综合久久| 亚洲在线免费播放| 3d成人动漫网站| 麻豆精品在线播放| 国产清纯白嫩初高生在线观看91 | 综合色天天鬼久久鬼色| 成人av中文字幕| 亚洲精品中文字幕乱码三区| 欧美色网站导航| 捆绑紧缚一区二区三区视频| 久久综合久久99| 99精品偷自拍| 日韩电影在线观看一区| 亚洲成人免费观看| 精品国产91久久久久久久妲己| 国产高清精品网站| 亚洲免费电影在线| 日韩一级欧美一级| av在线不卡网| 久色婷婷小香蕉久久| 中文字幕一区二区三区四区| 国产精一区二区三区|