当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.onEnter方法代码示例

本文整理汇总了C#中System.Windows.Forms.TextBox.onEnter方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.onEnter方法的具体用法?C# TextBox.onEnter怎么用?C# TextBox.onEnter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TextBox的用法示例。


在下文中一共展示了TextBox.onEnter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: buildGui

    	public void buildGui()
    	{
    		var topPanel = this.add_Panel();
    		Path = topPanel.insert_Above<TextBox>(20);
			sourceCode = topPanel.add_SourceCodeEditor();
			dataGridView = sourceCode.insert_Above<Panel>(100).add_DataGridView();
			leftPanel = topPanel.insert_Left<Panel>(300);									
			
			Path.onEnter(loadFiles);
			Path.onDrop(
				(fileOrFolder)=>{
									Path.set_Text(fileOrFolder);
									loadFiles(fileOrFolder);
								}); 	   	   	   	   
			dataGridView.SelectionChanged+= 
				(sender,e) => {
						if (dataGridView.SelectedRows.size() == 1)
						{
							var selectedRow = dataGridView.SelectedRows[0]; 
							var filePath = selectedRow.Cells[0].Value.str();
							var filename = selectedRow.Cells[1].Value.str();
							var lineNumber = selectedRow.Cells[2].Value.str();
							"opening up source code: {0}".info(filePath);
							sourceCode.open(filePath.pathCombine(filename));  
							sourceCode.gotoLine(lineNumber.toInt() + 1);
							dataGridView.focus();
						}
				  };
								
		}
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Scripts,代码行数:30,代码来源:ascx_SimpleFileSearch.cs

示例2: loadFiles

		public void loadFiles(string filesPath, List<string> filesToLoad)
		{						
			sourceCode.set_Text("Loading files from: {0}".format(filesPath));
			Path.set_Text(filesPath);
			var filesContent = new Dictionary<string,string>();
			var nonBinaryFiles = new List<string>();
			foreach(var file in filesToLoad) 
				if (file.isBinaryFormat().isFalse()) 
					nonBinaryFiles.add(file);
			
			foreach(var file in nonBinaryFiles) 
					filesContent.add(file.remove(filesPath),file.contents());	
					
			searchEngine = new SearchEngine();
			searchEngine.loadFiles(nonBinaryFiles); 			
			
			//searchEngine.fixH2FileLoadingIssue();
			
			leftPanel.clear();
			treeView = leftPanel.add_TreeViewWithFilter(filesContent); 
			treeView.afterSelect<string>(
				(fileContents)=>{					
									sourceCode.open(filesPath + treeView.selected().get_Text());
								});						
			sourceCode.colorCodeForExtension(treeView.selected().str());
			sourceCode.set_Text("");
			textSearch_TextBox = leftPanel.controls<TextBox>(true)[1];
			textSearch_TextBox.onEnter(
				(text)=>{
					var searchResults = searchEngine.searchFor(text);
					dataGridView.loadInDataGridView_textSearchResults(searchResults);  
				});
			
			
		}		
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Scripts,代码行数:35,代码来源:ascx_SimpleFileSearch.cs

示例3: buildGui

		public ascx_HtmlTagViewer buildGui(bool addLoadUrlTextBox, bool addHtmlCodeViewer)
		{
			//return (ascx_HtmlTagViewer)this.invokeOnThread(
			//	()=>{
			var TopPanel = this.add_Panel();
			HtmlTags_TreeView =  TopPanel.add_TreeView_for_HtmlTags()
									 	 .showSelection();			
			
			if (addHtmlCodeViewer)
			{
				HtmlCodeViewer = HtmlTags_TreeView.insert_Left<Panel>(TopPanel.width()/2).add_SourceCodeViewer(); 
				
				HtmlTags_TreeView.after_TagSelect_showIn_SouceCodeViewer(HtmlCodeViewer);
				
				var optionsPanel = HtmlCodeViewer.insert_Below<Panel>(50);
				optionsPanel.add_CheckBox("View as Xml",0,5, 
					(value)=>{
								ViewAsXml = value;
								reloadPage();
							 })
							 .append_Label("Search html code:")
							 .top(5)
							 .append_TextBox("")
							 .onTextChange((text)=> HtmlCodeViewer.editor().invoke("searchForTextInTextEditor_findNext",text))
							 .onEnter((text)=> HtmlCodeViewer.editor().invoke("searchForTextInTextEditor_findNext",text))
							 .align_Right(optionsPanel);
				
				optionsPanel.add_Link("Refresh tags",30,0,()=> show(HtmlCodeViewer.get_Text()));
			}
			
			if (addLoadUrlTextBox)	
			{
				PageToOpen = TopPanel.insert_Above<Panel>(20).add_TextBox().fill();
				var propertyGrid = HtmlTags_TreeView.insert_Right<Panel>(150).add_PropertyGrid();
				
				
				HtmlTags_TreeView.afterSelect<HtmlAgilityPack.HtmlNode>(
				  (htmlNode)=> propertyGrid.show(htmlNode));
				
				PageToOpen.onEnter(
							(text)=>{
										if (text.fileExists())
											show(text.fileContents());
										else 
											show(text.uri());
									}); 
			}																						
			
			HtmlNodeFilter = HtmlTags_TreeView.insert_Below_HtmlTagFilter((filter) => show(HtmlCode, filter) );
			
			return this;
		//});
		}
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:53,代码来源:ascx_HtmlTagViewer.cs


注:本文中的System.Windows.Forms.TextBox.onEnter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。