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

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

?? linenumberview.cs

?? CSharpDevelop:這是一個包含源代碼的C#、VB.NET的編輯器。
?? CS
字號:
//  LineNumberView.cs
//  Copyright (C) 2000 Mike Krueger
//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;

namespace SharpDevelop.Gui.Edit.Text {
	
	/// <summary>
	/// This class views the line numbers and folding markers.
	/// </summary>
	public class LineNumberView : UserControl
	{
		TextAreaPainter  textarea;
//		GraphicsBuffer buffer;
		
		public LineNumberView(TextAreaPainter textarea)
		{
//			buffer = GraphicsBuffer.CreateOptimal();
			this.textarea = textarea;
			Visible       = true;
			textarea.Buffer.FoldChanged += new EventHandler(RepaintMeEvent);
			textarea.Buffer.LineCountChanged += new EventHandler(LineCountChange);
			ResizeRedraw  = false;
		}
		
		void LineCountChange(object sender, EventArgs e)
		{
			int y1 = (int)(lastline * textarea.FontHeight);
			int y2 = (int)(textarea.Buffer.Length* textarea.FontHeight);
			Invalidate(new Rectangle(0, Math.Min(y1, y2), Width, Math.Max(y1, y2)));
			Update();
			RepaintMeEvent(sender, e);
//			Refresh();
		}
		
		void RepaintMeEvent(object sender, EventArgs e)
		{
			int ll = lastline;
			Invalidate(new Rectangle(Width - 13, 0,  13, Height));
			Update();
			lastline = ll;
		}
		
		int lastline = -1;
		
		void DrawFoldState(Graphics g, Rectangle rectangle, bool open)
		{
			
			g.FillRectangle(new SolidBrush(textarea.Buffer.Syntax.FoldMarker.BackgroundColor), rectangle);
			g.DrawRectangle(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldMarker.Color)), rectangle);
			g.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.BackgroundColor)), rectangle.X + 2, rectangle.Y + rectangle.Height / 2, rectangle.X + rectangle.Width - 2, rectangle.Y + rectangle.Height / 2);
			if (!open) {
				g.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.BackgroundColor)), rectangle.X + rectangle.Width / 2, rectangle.Y + 2, 
					                                             rectangle.X + rectangle.Width / 2, rectangle.Y + rectangle.Height - 2);
			}
		}
		
		protected override void OnClick(EventArgs e)
		{
			Point mousepos  = PointToClient(Control.MousePosition);
			int   clickline = (int)(mousepos.Y / textarea.FontHeight);
			int   realline  = textarea.Buffer.Foldings.GetPhysicalLine(clickline);
			if (textarea.Buffer[realline].foldon && realline + 1 < textarea.Buffer.Length) {
				if (textarea.Buffer[realline + 1].Visible) {
					textarea.Buffer.Foldings.FoldPos(new Point(0, realline));
					textarea.Caret.CheckCaretPos();
					Refresh();
					textarea.Refresh();
				} else {
					textarea.Buffer.Foldings.UnFold(realline + 1);
					textarea.Caret.CheckCaretPos();
					Refresh();
					textarea.Refresh();
				}
			}
			
		}
		
		protected override void OnPaint(PaintEventArgs pe)
		{
//			Graphics  drawTo     =  buffer.RequestBuffer(pe.Graphics, Width, Height);
			Graphics  drawTo     =  pe.Graphics;
			
			if (textarea.Options.UseAntiAliasFont) {
				drawTo.CompositingQuality = CompositingQuality.AssumeLinear;
				drawTo.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
				drawTo.SmoothingMode  = SmoothingMode.AntiAlias;
				drawTo.InterpolationMode = InterpolationMode.High;
			}
			
			Color color = Enabled ? textarea.Buffer.Syntax.LineNumberColor.BackgroundColor : SystemColors.InactiveBorder;
			drawTo.FillRectangle(new SolidBrush(color), pe.ClipRectangle);
			
			if (Enabled) {
				int realline  = textarea.Buffer.Foldings.GetPhysicalLine((int)(pe.ClipRectangle.Y / textarea.FontHeight));
				for (int line = (int)(pe.ClipRectangle.Y / textarea.FontHeight); textarea.FontHeight * (line - 1) <= pe.ClipRectangle.Y + pe.ClipRectangle.Height; ++line) {
					if (realline >= textarea.Buffer.Length) 
						break;
					if (!textarea.Buffer[realline].Visible) {
						if (textarea.Buffer.Foldings.foldings[realline] != null) {
							realline += (int)textarea.Buffer.Foldings.foldings[realline];
						} else {
							while (!textarea.Buffer[realline].Visible)
								++realline;
						}
					}
					
//					if (textarea.FontHeight * (line + 1) >= pe.ClipRectangle.Y) 
					{
						int number = line + 1;
						string text = "";
						bool drawfoldstate = false;
						
						if (textarea.Options.ShowLineNumbers && number <= textarea.Buffer.Length ) {
							lastline = number;
							text = String.Format("{0} ", realline + 1); 
							
							while (text.Length < 4) 
								text = " " + text;
							drawTo.DrawString(text,
									textarea.Options.DefaultFont,
	//						         textarea.Buffer.Syntax.LineNumberColor.Font,
							         new SolidBrush(textarea.Buffer.Syntax.LineNumberColor.Color), 
							         new PointF(0, textarea.FontHeight * line)
							         );
						}
						
						if (realline + 1 < textarea.Buffer.Length && textarea.Buffer[realline].foldon) {
							drawfoldstate = true;
							DrawFoldState(drawTo,new Rectangle(Width - 9, 
						                                          (int)(textarea.FontHeight * line + (textarea.FontHeight - 8) / 2), 
						                                          8, 
						                                          8),
						                         textarea.Buffer[realline + 1].Visible);
							drawTo.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.Color)), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight / 2), 
								       Width - 9, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight / 2));
						}
						
						/*
						if (textarea.Buffer[realline].FoldLevel > 0)
						{
							bool last  = realline + 1 >= textarea.Buffer.Length || textarea.Buffer[realline + 1].FoldLevel == 0; 
							bool first = realline <= 0 || textarea.Buffer[realline - 1].FoldLevel == 0;
							
							if (first) {
							drawTo.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.Color)), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight / 2));
							} else
							if (last) {
								drawTo.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.Color)), 
									       Width - 12, 
									       (int)(textarea.FontHeight * line + textarea.FontHeight / 2), 
									       Width - 12, 
									       (int)(textarea.FontHeight * line + textarea.FontHeight + 1));
							} else
							drawTo.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.Color)), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight + 1));
						}*/
						
						if (realline < textarea.Buffer.Length && textarea.Buffer[realline].foldoff) {
							if (!drawfoldstate)
							drawTo.DrawLine(new Pen(new SolidBrush(textarea.Buffer.Syntax.FoldLine.Color)), 
								       Width - 12, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight / 2), 
								       Width - 3, 
								       (int)(textarea.FontHeight * line + textarea.FontHeight / 2));
							
						}
					}
					++realline;
				}
			}
//			buffer.PaintBuffer(pe.Graphics, 0, 0);
		}
		
		protected override void OnPaintBackground(PaintEventArgs pe)
		{}
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品综合二区| 国产在线观看一区二区| 精品嫩草影院久久| 在线看日韩精品电影| 国产成人综合亚洲91猫咪| 视频在线观看91| 中文字幕一区二区视频| 久久嫩草精品久久久久| 欧美精品日韩一区| 91精品1区2区| 91毛片在线观看| 国产成人亚洲综合a∨婷婷图片 | 国产日韩欧美一区二区三区综合| 欧美在线小视频| 成人精品高清在线| 国产精品一区在线| 蜜臀av国产精品久久久久| 亚洲第一搞黄网站| 一区二区三区不卡视频| 中文字幕日韩一区| 26uuu欧美| 91小宝寻花一区二区三区| 午夜精品在线视频一区| 99久免费精品视频在线观看 | 中文字幕精品在线不卡| 国产精品911| 激情深爱一区二区| 国产日产欧美一区| 美女网站色91| 亚洲成a人v欧美综合天堂下载 | 亚洲精品成人少妇| 国产精品萝li| 国产精品午夜免费| 欧美国产日韩一二三区| 久久九九久久九九| 国产亚洲人成网站| 国产午夜精品一区二区三区嫩草| xfplay精品久久| 26uuu成人网一区二区三区| 欧美变态凌虐bdsm| 国产亚洲一二三区| 亚洲r级在线视频| 一区二区三区四区蜜桃| 亚洲国产精品一区二区www在线 | 国产盗摄女厕一区二区三区| 国产在线精品一区二区| 国产一区在线观看麻豆| 国产美女精品一区二区三区| 国产精品一线二线三线| 国产精品99久久久久久宅男| 成人免费看视频| 一本久久a久久免费精品不卡| 91麻豆.com| 欧美性受极品xxxx喷水| 欧美疯狂做受xxxx富婆| 日韩一区二区免费视频| 国产亚洲欧洲一区高清在线观看| 亚洲国产精品激情在线观看| 中文字幕一区二区三区不卡| 亚洲午夜精品一区二区三区他趣| 亚洲成人高清在线| 韩国精品主播一区二区在线观看| 成人午夜私人影院| 欧美色网一区二区| 精品国产sm最大网站免费看| 欧美国产日韩一二三区| 亚洲一区二区三区四区在线免费观看| 日韩电影一区二区三区四区| 国产一区二区三区视频在线播放| 成人国产视频在线观看| 欧美视频一区二区三区四区| 日韩欧美成人一区| 中文欧美字幕免费| 婷婷综合久久一区二区三区| 国产精品12区| 欧美在线观看视频在线| 欧美mv和日韩mv国产网站| 国产精品福利影院| 午夜精品久久久久久久| 国产成人啪午夜精品网站男同| 91小视频免费看| 欧美成人一区二区三区| 自拍av一区二区三区| 日韩国产成人精品| 99久久精品国产网站| 欧美高清dvd| 亚洲婷婷综合色高清在线| 免费在线观看一区二区三区| 成人av网站在线观看| 日韩精品在线看片z| 一区二区三区中文字幕电影| 国产一区二区三区高清播放| 91国偷自产一区二区开放时间| 精品国产3级a| 亚洲国产精品精华液网站| 成人免费视频视频在线观看免费| 欧美日韩精品欧美日韩精品一综合| 国产片一区二区三区| 日本不卡不码高清免费观看| 一本一道久久a久久精品| 久久久综合精品| 天堂影院一区二区| 91视视频在线观看入口直接观看www | 99在线热播精品免费| 精品人在线二区三区| 亚洲成a人片在线观看中文| 9i在线看片成人免费| 久久精品在线免费观看| 久久99精品网久久| 欧美日韩国产成人在线免费| 一区二区三区免费观看| 99精品欧美一区二区三区综合在线| 26uuu亚洲婷婷狠狠天堂| 亚洲成av人片在线| 在线观看免费亚洲| 亚洲免费在线看| 高清beeg欧美| 国产女主播一区| 久久se精品一区二区| 欧美精品久久99| 亚洲aaa精品| 欧美精品在线一区二区三区| 亚洲一区二区av电影| 色婷婷av久久久久久久| 国产精品久久久久永久免费观看 | 91色在线porny| 国产精品三级av| 国产·精品毛片| 国产亚洲精品精华液| 国产精品资源在线观看| 欧美精品一区视频| 寂寞少妇一区二区三区| 日韩精品一区二区在线观看| 久久99国产精品免费| 日韩欧美黄色影院| 九色综合国产一区二区三区| 日韩免费高清av| 99久久免费视频.com| 亚洲欧洲无码一区二区三区| 久久国产精品一区二区| 欧美一区午夜精品| 国产精品日产欧美久久久久| 国产综合色在线| 久久久99精品久久| 波多野结衣一区二区三区| 一区免费观看视频| 成人a级免费电影| 亚洲女同一区二区| 欧美丝袜丝交足nylons图片| 午夜精品一区二区三区电影天堂| 在线播放一区二区三区| 久久国产福利国产秒拍| 国产欧美日韩精品在线| 91美女视频网站| 婷婷开心激情综合| 日韩午夜中文字幕| 国产精品18久久久久久久久久久久| 国产日产精品一区| 色综合天天综合网国产成人综合天| 一区二区三区四区五区视频在线观看| 欧美日韩欧美一区二区| 精品无码三级在线观看视频| 国产精品久久久久9999吃药| 色94色欧美sute亚洲13| 丝袜亚洲精品中文字幕一区| 精品国产凹凸成av人导航| 99r国产精品| 婷婷综合另类小说色区| 国产无人区一区二区三区| 欧洲精品在线观看| 精品综合免费视频观看| 亚洲色图在线播放| 欧美一级久久久| 91香蕉视频在线| 免费看日韩a级影片| 国产精品拍天天在线| 欧美日韩成人激情| 国产99久久久精品| 亚洲成人先锋电影| 国产人久久人人人人爽| 欧美美女黄视频| 国产99一区视频免费| 日韩精品电影在线观看| 国产精品成人免费在线| 日韩三级中文字幕| 91视频你懂的| 国产在线精品一区二区夜色| 亚洲一区二区三区在线| 国产欧美日韩亚州综合| 欧美日韩一级片网站| jlzzjlzz欧美大全| 美女视频黄a大片欧美| 亚洲乱码日产精品bd| 久久久精品国产免大香伊| 欧美精品乱码久久久久久按摩| 成人国产电影网| 极品美女销魂一区二区三区| 亚洲综合色区另类av| 国产精品女同一区二区三区| 日韩一区二区三区免费看|