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


C# Panel.insert_Right方法代码示例

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


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

示例1: buildGui

		public API_MSBuild_Gui buildGui(Panel _topPanel)
		{
			topPanel = _topPanel;
			msBuild = new API_MSBuild(); 
			buildEnabled = true;
			consoleOut_TextArea = topPanel.insert_Right(300).add_GroupBox("Console Out details").add_TextArea_With_SearchPanel().wordWrap(false);
			tableList = topPanel.clear().add_TableList("VisualStudio MSBuild results");
			tableList.add_Columns("Project", "Path", "Status", "Time", "Console Out");
			 
			startBuild = (pathToProject) =>
								{
									var buildStatus = "SKIPPED";
									var buildResult = false;
									if (buildEnabled)
									{															
										buildResult = msBuild.build_Ok(pathToProject); 
										buildStatus = buildResult ? "OK" :  "FAILED";																				
									}
									else
									{
										"buildEnabled was set to false, so skipping build for: {0}".error(pathToProject);
										msBuild.ConsoleOut = new StringBuilder();
									}
										
									tableList.add_ListViewItem(	pathToProject.fileName(), 
															   	pathToProject, 
															   	buildStatus, 
															   	msBuild.BuildDuration.timeSpan_ToString(),
															   	msBuild.ConsoleOut.str())
											 .foreColor(buildResult, Color.Green, Color.Red);
										
							   	}; 
			 
			tableList.afterSelect_get_Cell(4, (value)=>consoleOut_TextArea.set_Text(value)); 
			buildEnabled_CheckBox  	= tableList.insert_Below(50,"Config")
									 			.add_CheckBox("Build Enabled",3,0,(value) => buildEnabled = value).check();
			//currentTarget_TextBox	= buildEnabled_CheckBox.append_Label("Current Target").top(8).autoSize().append_TextBox("").width(300);
			status_Label 			= buildEnabled_CheckBox.append_Label("...").autoSize().top(8);
			
			tableList.add_ContextMenu()
					 .add_MenuItem("Recompile project" , true ,
					 	()=>{		 			
					 			startBuild(tableList.selected().values().second());
							})
					 .add_MenuItem("Open Project folder" ,  true,
					 	()=>{		 			
					 			tableList.selected().values()
					 								.second()
					 								.directoryName()
					 								.startProcess();
							})
					.add_MenuItem("Clear table" ,
						()=> tableList.clearRows() ); 
			
			//tableList.onDoubleClick_get_Row((row)=> buildProject(row.values().second()));
			tableList.columns_Width(200,200,50, 100,-2);
			
			buildProjects = (fileOrFolder, onBuildComplete)=>
								{
									//currentTarget_TextBox.set_Text(fileOrFolder);
									O2Thread.mtaThread(
										()=>{												
												var start = DateTime.Now;
												tableList.listView().backColor(Color.Azure);
												"Loading file(s) from: {0}".info(fileOrFolder);
												if (fileOrFolder.fileExists())
												{
													status_Label.set_Text("[1/1] Building: {0}".format(fileOrFolder.fileName()));
													startBuild(fileOrFolder);
												}
												else
												{
													var files = fileOrFolder.csproj_Files();
													"Found {0} csproj files to process: {0}".debug(files.size());
													var processed = 1;
													foreach(var file in files)
													{
														status_Label.set_Text("[{0}/{1}] Building: {2}".format(processed ++, files.size(), file.fileName()));
														startBuild(file);																											
													}
												}
												status_Label.set_Text("Build complete");
												tableList.listView().backColor(Color.White);		
												"Build Projects action was completed in: {0}".info(start.timeSpan_ToString());
												onBuildComplete();
											});
								};	
			
			tableList.listView().onDrop((fileOrFolder)=> buildProjects(fileOrFolder, ()=>{}));
			return this;
		}
开发者ID:CallMeSteve,项目名称:O2.Platform.Scripts,代码行数:91,代码来源:API_MSBuild.cs

示例2: show_Gui_with_ListAdmins_Mappings

		public static Panel show_Gui_with_ListAdmins_Mappings(this API_Mailman apiMailman, Panel topPanel) 		
		{
			var tableList = topPanel.add_GroupBox("OWASP Mailing list mappings").add_TableList();  
			var browser = topPanel.insert_Right("List Admin WebPage").add_WebBrowser_Control();
			tableList.add_Columns("email", "list name", "list #", "href" );
			tableList.afterSelect_get_Cell(3,
				(href)=>{ 
							browser.open(href);
						});
			
			
			var listNumber = 0;
			foreach(var listName in apiMailman.mailingLists())
			{
				listNumber++;
				foreach(var email in apiMailman.get_Admins_For_MailingList(listName))
				{
					tableList.add_Row(email,							
									  listName, 
									  listNumber.str() ,
									  "{0}admin/{1}".format(apiMailman.BaseUrl, listName));							
				}
			}
			tableList.makeColumnWidthMatchCellWidth();
			return topPanel;
		}
开发者ID:pusp,项目名称:o2platform,代码行数:26,代码来源:API_Mailman.cs

示例3: show_Gui_with_ListAdmins_Mappings

		public static Panel show_Gui_with_ListAdmins_Mappings(this API_Mailman apiMailman, Panel topPanel) 		
		{
			var tableList = topPanel.add_GroupBox("OWASP Mailing list mappings").add_TableList();  
			var browser = topPanel.insert_Right("List Admin WebPage").add_WebBrowser_Control();
			tableList.add_Columns("email", "list name", "list #", "href" );
			tableList.afterSelect_get_Cell(3,
				(href)=>{ 
							browser.open(href);														
						});
						
			/*browser.onNavigated( // not working the browser still gets the focus
				(url)=> {
							"onNavigated".info();							
							tableList.listView().focus();
							tableList.focus();
							
						});*/
			
			var listNumber = 0;
			tableList.visible(false);
			foreach(var listName in apiMailman.mailingLists().Take(20))
			{
				listNumber++;
				foreach(var email in apiMailman.get_Admins_For_MailingList(listName))
				{
					tableList.add_Row(email,							
									  listName, 
									  listNumber.str() ,
									  "{0}admin/{1}".format(apiMailman.BaseUrl, listName));							
				}
			}
			tableList.visible(true);
			tableList.makeColumnWidthMatchCellWidth();
			return topPanel;
		}
开发者ID:CallMeSteve,项目名称:O2.Platform.Scripts,代码行数:35,代码来源:API_Mailman.cs


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