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

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

?? dictionary.cs

?? 這是一個(gè)用C#寫的翻譯小助手
?? CS
字號(hào):
using System;using System.IO;using System.Text;using System.Collections;using System.Diagnostics;using System.Windows.Forms;namespace DLTool{	[Serializable]	public class DictionaryDefinition	{		public string Language = "";		public string Filename = "";		public int CodePage = -1;		public DictionaryDefinition()		{			Language = "";			Filename = "";			CodePage = -1;		}		public override bool Equals( object o )		{			DictionaryDefinition def = o as DictionaryDefinition;			if( def == null ) return false;			return( def.Filename == this.Filename && def.CodePage == this.CodePage );		}		public override int GetHashCode()		{			return Language.GetHashCode() ^ Filename.GetHashCode() ^ CodePage.GetHashCode();		}	}	public class Dictionary	{		public int CodePage = 950; 
		public class Entry		{			public string Text, TextTrad, TextSimp; 			public byte[] Data;			public string Pronounciation;			public string[] Translations;			public bool showBoth = false, searchedSimp;						public override string ToString()			{				if (TextTrad != null && TextSimp != null) 
				{					if (showBoth == true) 
					{
						if (TextTrad != "" && TextSimp != "" && TextTrad != TextSimp)
						{       							Text = TextTrad + " " + TextSimp;						} 
						else if (TextTrad != "" && TextSimp != "" && TextTrad == TextSimp) 
						{							Text = TextSimp;						}					}
					else
					{						if (searchedSimp == true) Text = TextSimp;						else Text = TextTrad;					}									}				string result = Text + " [" + Pronounciation + "] /";				foreach( string e in Translations )				{					result = result + e + "/";				}				return result;			}		};		public enum MatchMode		{			Loose,			Exact,			Subchars,			Subphrases,			ReverseLookup,			Pronounciation		}				public bool showBothChars = false;  				private bool m_canLookup;		public bool CanLookup { get { return m_canLookup; } }		public ArrayList m_list;		public Dictionary()		{			m_list = new ArrayList();		}				public ArrayList Lookup(string text, MatchMode mode)		{			if( ! this.CanLookup ) return new ArrayList();			if( text == string.Empty ) return new ArrayList();			ArrayList exactMatches = new ArrayList();						if (this.CodePage == 65001)			{				switch (mode)				{					case MatchMode.Exact:						foreach( Entry e in m_list )						{							e.showBoth = showBothChars;															if( e.TextSimp.Length < text.Length ) continue; 							if( e.TextSimp == text)
							{ 								exactMatches.Add( e ); 								e.searchedSimp = true;								continue;							}
							else if( e.TextTrad == text)
							{								exactMatches.Add( e );								e.searchedSimp = false;							}														}						return exactMatches;					case MatchMode.Loose:					{													ArrayList initialMatches = new ArrayList();						ArrayList looseMatches = new ArrayList();						foreach( Entry e in m_list )						{															e.showBoth = showBothChars;							if( e.TextSimp.Length < text.Length ) continue;							if( e.TextSimp == text ){ exactMatches.Add( e ); e.searchedSimp = true; }							else if( e.TextTrad == text ){ exactMatches.Add( e ); e.searchedSimp = false; }  							else if ( e.TextSimp.StartsWith(text) ){ initialMatches.Add(e); e.searchedSimp = true; }							else if ( e.TextTrad.StartsWith(text) ){ initialMatches.Add(e); e.searchedSimp = false; } 							else if( e.TextSimp.IndexOf(text) >= 0 ){ looseMatches.Add(e); e.searchedSimp = true; }							else if( e.TextTrad.IndexOf(text) >= 0 ){ looseMatches.Add( e ); e.searchedSimp = false; }						}													looseMatches.InsertRange(0, initialMatches);						looseMatches.InsertRange(0, exactMatches);						return looseMatches;					}					case MatchMode.Pronounciation:					{						ArrayList initialMatches = new ArrayList();						ArrayList looseMatches = new ArrayList();						foreach( Entry e in m_list )						{							if( e.Pronounciation.Length < text.Length ) continue;							if( e.Pronounciation == text ) exactMatches.Add( e );							else if ( e.Pronounciation.StartsWith( text ) ) initialMatches.Add( e );							else if( e.Pronounciation.IndexOf( text ) >= 0 ) looseMatches.Add( e );						}													looseMatches.InsertRange(0, initialMatches);						looseMatches.InsertRange(0, exactMatches);						return looseMatches;					}					case MatchMode.Subchars:						for( int i=0; i < text.Length; i++ )						{							string s = text.Substring(i,1);							foreach( Entry e in m_list )							{																	e.showBoth = showBothChars;								if( e.TextSimp == s ){ exactMatches.Add(e); e.searchedSimp = true; } 								else if( e.TextTrad == s ){ exactMatches.Add(e); e.searchedSimp = false; } 							}						}						return exactMatches;					case MatchMode.Subphrases:						for( int i=0; i < text.Length; i++ )						{							string s = text.Substring(i);							int longestMatchLen = 0;							ArrayList LongestMatches = new ArrayList();							bool matchedOnce = false;							for( int j=1; j <= s.Length; j++ )							{								string t = s.Substring(0,j);								bool matchedLast = false;								foreach( Entry e in m_list )								{									e.showBoth = showBothChars;									if( e.TextSimp.Length < t.Length) continue;																			if( e.TextSimp == t)  									{										e.searchedSimp = true;										if( j > longestMatchLen )										{											LongestMatches.Clear();											longestMatchLen = j;										}										LongestMatches.Add( e );										matchedOnce = true;										matchedLast = true;									}									else if (e.TextTrad == t)									{										e.searchedSimp = false;										if( j > longestMatchLen )										{											LongestMatches.Clear();											longestMatchLen = j;										}										LongestMatches.Add( e );										matchedOnce = true;										matchedLast = true;									}								}								if( matchedOnce && ! matchedLast ) break;							}							if( LongestMatches.Count > 0 ) 							{								exactMatches.AddRange( LongestMatches );								i += longestMatchLen - 1;							}						}						return exactMatches;					case MatchMode.ReverseLookup:						text = text.ToLower();						foreach( Entry e in m_list )						{							foreach( string s in e.Translations )							{								if( s.Length < text.Length ) continue;								if( s.ToLower().IndexOf( text ) >= 0 ) exactMatches.Add( e );							}						}						return exactMatches;							}				return null;			} 
			else 
			{				switch (mode)
				{
					case MatchMode.Exact:
						foreach( Entry e in m_list )
						{
							if( e.Text.Length < text.Length ) continue;
							if( e.Text == text ) exactMatches.Add( e );
						}
						return exactMatches;
					case MatchMode.Loose:
					{
						ArrayList initialMatches = new ArrayList();
						ArrayList looseMatches = new ArrayList();
						foreach( Entry e in m_list )
						{
							if( e.Text.Length < text.Length ) continue;

							if( e.Text == text ) exactMatches.Add( e );
							else if ( e.Text.StartsWith( text ) ) initialMatches.Add( e );
							else if( e.Text.IndexOf( text ) >= 0 ) looseMatches.Add( e );
						}
					
						looseMatches.InsertRange(0, initialMatches);
						looseMatches.InsertRange(0, exactMatches);
						return looseMatches;
					}
					case MatchMode.Pronounciation:
					{
						ArrayList initialMatches = new ArrayList();
						ArrayList looseMatches = new ArrayList();
						foreach( Entry e in m_list )
						{
							if( e.Pronounciation.Length < text.Length ) continue;

							if( e.Pronounciation == text ) exactMatches.Add( e );
							else if ( e.Pronounciation.StartsWith( text ) ) initialMatches.Add( e );
							else if( e.Pronounciation.IndexOf( text ) >= 0 ) looseMatches.Add( e );
						}
					
						looseMatches.InsertRange(0, initialMatches);
						looseMatches.InsertRange(0, exactMatches);
						return looseMatches;
					}
					case MatchMode.Subchars:
						for( int i=0; i < text.Length; i++ )
						{
							string s = text.Substring(i,1);
							foreach( Entry e in m_list )
							{
								if( e.Text == s ) exactMatches.Add( e ); 
							}
						}
						return exactMatches;
					case MatchMode.Subphrases:
						for( int i=0; i < text.Length; i++ )
						{
							string s = text.Substring(i);
							int longestMatchLen = 0;
							ArrayList LongestMatches = new ArrayList();
							bool matchedOnce = false;
							for( int j=1; j <= s.Length; j++ )
							{
								string t = s.Substring(0,j);
								bool matchedLast = false;
								foreach( Entry e in m_list )
								{
									if( e == null ) continue;
									if( e.Text.Length < t.Length ) continue;
									if( e.Text == t ) 
									{
										if( j > longestMatchLen )
										{
											LongestMatches.Clear();
											longestMatchLen = j;
										}
										LongestMatches.Add( e );
										matchedOnce = true;
										matchedLast = true;
									}
								}
								if( matchedOnce && ! matchedLast ) break;
							}
							if( LongestMatches.Count > 0 ) 
							{
								exactMatches.AddRange( LongestMatches );
								i += longestMatchLen - 1;
							}
						}
						return exactMatches;
					case MatchMode.ReverseLookup:
						text = text.ToLower();
						foreach( Entry e in m_list )
						{
							foreach( string s in e.Translations )
							{
								if( s.Length < text.Length ) continue;
								if( s.ToLower().IndexOf( text ) >= 0 ) exactMatches.Add( e );
							}
						}
						return exactMatches;			
				}
				return null;			}		}		public void SetBothChars(bool choice)		{			showBothChars = choice;		}						public void LoadFile(string file, int codePage)		{			m_list.Clear();			StreamReader reader;			this.CodePage = codePage;			Encoding enc = Encoding.GetEncoding(CodePage);			try			{				reader = new StreamReader(file, Encoding.GetEncoding(CodePage));			}			catch( FileNotFoundException )			{				MessageBox.Show("Couldn't load dictionary file \"" + file + "\"!!");				m_canLookup = false;				return;			}			int numEntries = 0;			Trace.WriteLine("Displaying first 20 entries", "Dictionary");			
			if (this.CodePage == 65001) 
			{				while(true)				{					string currentLine = reader.ReadLine();					if( currentLine == null ) break;					if( currentLine[0] == '#' ) continue;					Entry newEntry = new Entry();															int mark1 = currentLine.IndexOf(" "); 					if( mark1 < 0 ) mark1 = currentLine.IndexOf("/");					if( mark1 < 0 )					{						throw new System.IO.FileLoadException("bad file format");					}										int mark2 = currentLine.IndexOf(' ', mark1+1); 					int mark3 = currentLine.IndexOf(']', mark2+2);					newEntry.TextTrad = currentLine.Substring(0, mark1);					newEntry.TextSimp = currentLine.Substring(mark1+1, mark1); 					newEntry.Text = ""; 					newEntry.Data = enc.GetBytes(newEntry.Text);					string defstring;					if( mark3 >= 0 )					{						newEntry.Pronounciation = currentLine.Substring(mark2 + 2, mark3 - (mark2 + 2));						defstring = currentLine.Substring(mark3+3);					}					else 					{						newEntry.Pronounciation = "";						defstring = currentLine.Substring( mark2 + 2 );					}										defstring = defstring.TrimEnd('/');					defstring = defstring.TrimStart('/');					newEntry.Translations = defstring.Split('/');					m_list.Add( newEntry );					numEntries++;					if( numEntries < 20 ) 					{						Trace.WriteLine(newEntry, "Dictionary");					}				}			}
			if (this.CodePage != 65001) 
			{				while(true)
				{
					string currentLine = reader.ReadLine();
					if( currentLine == null ) break;
					if( currentLine[0] == '#' ) continue;
					Entry newEntry = new Entry();

					int mark1 = currentLine.IndexOf(" ");
					if( mark1 < 0 ) mark1 = currentLine.IndexOf("/");
					if( mark1 < 0 )
					{
						throw new System.IO.FileLoadException("bad file format");
					}
					int mark2 = currentLine.IndexOf(']', mark1+2);

					newEntry.Text = currentLine.Substring(0, mark1);
					newEntry.Data = enc.GetBytes(newEntry.Text);
					string defstring;

					if( mark2 >= 0 )
					{
						newEntry.Pronounciation = currentLine.Substring(mark1 + 2, mark2 - (mark1 + 2));
						defstring = currentLine.Substring(mark2+3);
					}
					else 
					{
						newEntry.Pronounciation = "";
						defstring = currentLine.Substring( mark1 + 2 );
					}
				
					defstring = defstring.TrimEnd('/');
					defstring = defstring.TrimStart('/');
					newEntry.Translations = defstring.Split('/');

					m_list.Add( newEntry );
					numEntries++;

					if( numEntries < 20 ) 
					{
						Trace.WriteLine(newEntry, "Dictionary");
					}
				}			}			reader.Close();			Trace.WriteLine("Scanned " + numEntries + " dictionary entries",				"Dictionary");			m_canLookup = true;		}	}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久久精品齐齐 | 成人免费黄色大片| 国产精品久久国产精麻豆99网站| 在线观看免费视频综合| 国内外成人在线| 亚洲伊人色欲综合网| 精品av久久707| 欧美午夜在线观看| 高清av一区二区| 秋霞午夜鲁丝一区二区老狼| 日韩理论片中文av| 久久综合色播五月| 555夜色666亚洲国产免| 99久久免费精品高清特色大片| 免费美女久久99| 亚洲一区二区三区影院| 国产精品美女久久久久久久久 | 国产成人综合精品三级| 亚洲国产成人高清精品| 国产精品网站在线播放| 精品国精品国产| 欧美精品免费视频| 在线观看免费视频综合| av电影天堂一区二区在线| 精品一区二区三区在线视频| 亚洲超碰精品一区二区| 亚洲精品写真福利| 国产精品欧美久久久久一区二区| 欧美tickling挠脚心丨vk| 欧美日韩精品一区二区| 91黄色小视频| 一本大道久久a久久综合| 成人h精品动漫一区二区三区| 精品无人区卡一卡二卡三乱码免费卡 | 国产女主播一区| 精品福利在线导航| 日韩欧美黄色影院| 777xxx欧美| 3d成人h动漫网站入口| 欧美日韩一级大片网址| 欧美色爱综合网| 欧美怡红院视频| 欧美影院精品一区| 欧美视频在线观看一区二区| 欧美在线观看你懂的| 欧美在线免费观看亚洲| 欧美亚洲动漫另类| 欧美视频一区二区三区四区| 欧美吞精做爰啪啪高潮| 欧美三级电影在线看| 欧美日韩一区二区欧美激情| 在线91免费看| 日韩情涩欧美日韩视频| 欧美精品一区二区高清在线观看| 精品国产乱码久久久久久影片| 精品国产欧美一区二区| 久久先锋影音av| 日本一区二区视频在线| 中文字幕一区二区在线播放| 亚洲美女在线国产| 亚洲国产va精品久久久不卡综合| 婷婷成人激情在线网| 美腿丝袜亚洲三区| 国产乱码精品一区二区三区av | 日韩一区二区三区四区五区六区| 日韩一区二区三区三四区视频在线观看 | 亚洲一区二区三区国产| 天天综合色天天综合色h| 蜜臀久久99精品久久久久宅男 | 国产精品久久夜| 亚洲男人的天堂av| 午夜免费久久看| 精品一区中文字幕| www.在线欧美| 欧美日韩高清一区| 精品国产乱码久久久久久闺蜜| 国产欧美一区二区精品性色 | 欧美视频精品在线| 91精品国产高清一区二区三区蜜臀| 欧美日韩精品免费观看视频| 日韩欧美国产系列| 国产精品久线在线观看| 自拍偷在线精品自拍偷无码专区 | 日韩亚洲欧美一区| 国产亚洲va综合人人澡精品| 亚洲精品高清视频在线观看| 免费在线一区观看| av激情成人网| 日韩一区二区麻豆国产| 中文字幕制服丝袜一区二区三区 | 亚洲午夜一二三区视频| 麻豆精品久久精品色综合| 成人精品免费看| 欧美精品tushy高清| 国产精品美女久久久久久久久 | 日本成人中文字幕在线视频| 国产不卡在线一区| 欧美高清你懂得| 国产精品女同一区二区三区| 日本伊人色综合网| 91麻豆国产在线观看| 精品国产乱码久久久久久久久| 亚洲精品国产一区二区精华液 | 亚洲综合在线免费观看| 国产一区二区三区高清播放| 日本精品一区二区三区四区的功能| 欧美精品一区二区高清在线观看| 一区二区免费在线播放| 国产精品888| 91精品在线一区二区| 一区二区三区鲁丝不卡| 成人午夜激情影院| 日韩欧美综合一区| 亚洲成a人片在线不卡一二三区| 成人精品视频网站| 久久综合狠狠综合| 奇米亚洲午夜久久精品| 欧美曰成人黄网| 最新中文字幕一区二区三区 | 国产欧美1区2区3区| 麻豆精品久久久| 欧美精选一区二区| 亚洲电影你懂得| 色婷婷久久久久swag精品| 欧美国产精品专区| 国产在线观看一区二区| 日韩欧美一区在线观看| 午夜久久久久久电影| 欧美在线免费播放| 最好看的中文字幕久久| a级高清视频欧美日韩| 中文字幕免费观看一区| 国产精品香蕉一区二区三区| 精品国产免费一区二区三区香蕉| 人人超碰91尤物精品国产| 欧美日韩aaaaa| 亚洲成人av电影| 亚洲伦理在线免费看| 成人精品国产一区二区4080| 中文字幕精品在线不卡| 成人午夜在线免费| 国产精品三级视频| av中文字幕不卡| 亚洲精品成人精品456| 色天使色偷偷av一区二区| 一区二区在线观看免费视频播放 | 在线免费观看不卡av| 亚洲美女少妇撒尿| 欧美在线短视频| 亚洲成人动漫在线免费观看| 9191久久久久久久久久久| 七七婷婷婷婷精品国产| 精品国产露脸精彩对白| 国产成人啪午夜精品网站男同| 国产婷婷色一区二区三区 | 欧美日韩国产不卡| 日韩激情在线观看| 日韩欧美区一区二| 国产一区激情在线| 中文在线免费一区三区高中清不卡| va亚洲va日韩不卡在线观看| 一区二区三区视频在线看| 欧美色综合影院| 精油按摩中文字幕久久| 中文一区二区在线观看| 色婷婷亚洲精品| 日本系列欧美系列| 精品99久久久久久| av不卡在线播放| 亚洲高清免费视频| 精品处破学生在线二十三| 成人美女视频在线看| 一区二区三区精品视频| 日韩欧美123| yourporn久久国产精品| 亚洲国产精品精华液网站| 精品国产一区二区精华| 精品精品国产高清一毛片一天堂| 丁香桃色午夜亚洲一区二区三区| 亚洲美女电影在线| 日韩女优av电影| 99视频在线精品| 日韩精彩视频在线观看| 欧美激情一区二区三区四区| 欧美亚洲精品一区| 国内精品伊人久久久久av影院 | 国产精品传媒在线| 欧美日韩久久一区二区| 国产裸体歌舞团一区二区| 亚洲最大成人综合| 久久伊99综合婷婷久久伊| 在线观看视频91| 国产精品一级在线| 日日夜夜免费精品视频| 国产精品大尺度| 精品国产乱码久久久久久老虎| 日本精品一级二级| 丰满白嫩尤物一区二区| 奇米色一区二区| 亚洲精品国久久99热|