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


C# Panel.add_GroupBox方法代码示例

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


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

示例1: add_Chrome_To_Panel

		public static API_Chrome_Hijack add_Chrome_To_Panel(this API_Chrome_Hijack chromeHijack, Panel targetPanel)
		{
			var chrome_Panel 	   = targetPanel.add_GroupBox("Chrome").add_Panel();
			var chromeDriver_Panel = chromeHijack.Panel_Chrome.parent().insert_Below(150,"Chrome WebDriver");			
						
			return chromeHijack.hijack_Chrome	   (chrome_Panel,false)
							   .hijack_ChromeDriver(chromeDriver_Panel);						
		}
开发者ID:o2platform,项目名称:O2.Platform.Scripts,代码行数:8,代码来源:API_Chrome_Hijack.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: addStopInstanceGui

		public static API_AmazonEC2 addStopInstanceGui(this API_AmazonEC2 amazonEC2, Panel targetPanel, TreeView treeViewWithInstances)
		{						
			Action startTimer = null;
			Action stopTimer = null;
			var instancesToStop = targetPanel.add_GroupBox("Stop Instance in {0} minutes".format((amazonEC2.TimerCount * amazonEC2.TimerCount / 60))) 
									         .add_TreeView();						
			var timerBar = instancesToStop.insert_Below(20).add_ProgressBar();
			instancesToStop.add_ContextMenu().add_MenuItem("Stop now",true, 
													()=>{
															"Stopping {0} instances now".debug(instancesToStop.nodes().size()); 
															foreach(var node in instancesToStop.nodes())
																amazonEC2.stopInstance((RunningInstance)node.get_Tag());
														})
											 .add_MenuItem("Clear list", ()=>instancesToStop.clear());
			var startTimerLink = instancesToStop.insert_Above(15).add_Link("Add instance to list",0,0, 
													()=>{
															var selectedNode = treeViewWithInstances.selected();
															if (selectedNode.notNull())
															{
																var tag = selectedNode.get_Tag();  
																if (tag is RunningInstance)
																{
																	var selectedInstance = (RunningInstance)tag;
																	var nodeText = "{0} - {1}".format(selectedInstance.InstanceId, selectedInstance.IpAddress);
																	instancesToStop.add_Node(nodeText, selectedInstance);
																}
															}
															//treeViewWithInstances.nodes().showInfo();
														})
											.append_Link("Start timer", ()=>startTimer());  
			var timerEnabled = false;								
			var	stopTimerLink = startTimerLink.append_Link("Stop timer", ()=>stopTimer()).enabled(false);  							
			startTimer = ()=>{											
									"starting timer".info();
									timerEnabled = true;												
									timerBar.maximum(amazonEC2.TimerCount);
									timerBar.value(0);
									startTimerLink.enabled(false);
									stopTimerLink.enabled(true);
									while(timerEnabled && timerBar.Value < amazonEC2.TimerCount)
									{
										"In StopInstances Timer [{0}/{1}], sleeping for {2} seconds".info(timerBar.Value, amazonEC2.TimerCount, amazonEC2.TimerSleep/1000);
										timerBar.sleep(amazonEC2.TimerSleep, false);
										timerBar.increment(1);																										
									}
									if (timerEnabled)
									{													
										"Timer is completed stopping {0} instances now".debug(instancesToStop.nodes().size());
										foreach(var node in instancesToStop.nodes())
											amazonEC2.stopInstance((RunningInstance)node.get_Tag());
									}
									else
										"Timer was stopped so nothing to do".debug();			
									startTimerLink.enabled(true);
									stopTimerLink.enabled(false);

							 };
			stopTimer = ()=>{
								
									"stopping timer".info();
									timerEnabled = false; 
									
									startTimerLink.enabled(true);
									stopTimerLink.enabled(false);
							 };
			targetPanel.onClosed(()=> 	timerEnabled=false);					 
			
			return amazonEC2;
		}						
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:69,代码来源:API_AmazonEC2.cs

示例4: 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

示例5: buildGui

        public REPL_Gui buildGui(Control targetControl)
        {
            try
            {
                TopPanel = targetControl.clear().add_Panel();

                Code_Panel = TopPanel.insert_Left("Code");

                Output_Panel = TopPanel.add_GroupBox("Invoke and Result")
                                       .add_GroupBox("Output").add_Panel();
                Execute_Button = Output_Panel.parent().insert_Above(60).add_Button("Execute").fill();
                Execute_Button.insert_Below(20).add_Link("stop execution", () => this.stopCurrentExecution());
                Output_View_RichTextBox = Output_Panel.add_RichTextBox();
                Output_View_Object = Output_Panel.add_Panel();
                //set actions

                Execute_Button.onClick(
                    () =>
                        {
                            try
                            {
                                ExecutionThread = O2Thread.mtaThread(() => On_ExecuteCode.invoke());
                            }
                            catch (Exception ex)
                            {
                                ex.log();
                            }
                        });
            }
            catch (Exception ex)
            {
                ex.log("[REPL_Gui] in buildGui");
            }
            return this;
        }
开发者ID:njmube,项目名称:FluentSharp,代码行数:35,代码来源:REPL_Gui.cs

示例6: buildGui

		public Win32_Handle_Hijack buildGui()
		{									
			Action restore = 
				()=>{												
						if (hijackedHandle != IntPtr.Zero)
						{
							"restoring {0} to parent {1}".info(hijackedHandle, hijackedParent);
							hijackedHandle.setParent(hijackedParent);
							hijackedParent.window_Redraw();
							hijackedHandle.window_Redraw();
						}
					};
					
			Action hijack = 
				()=>{ 
						restore();
						var handle = targetHandle.get_Text().toInt().intPtr();						
						var newParent = hijackedWindow.clear().handle();
						"Hijacking {0} into window {1}".info(handle, newParent);
						hijackedHandle = handle;
						hijackedParent = parentHandle.get_Text().toInt().intPtr();
						handle.setParent(newParent);						
					};					
			Action screenShot = 
				()=>{	
						restore();
						try
						{
							var handle = targetHandle.get_Text().toInt().intPtr();						
							var bitmap = handle.window_ScreenShot();
							hijackedWindow.clear().add_PictureBox().layout_Zoom().show(bitmap);
						}
						catch(Exception ex)
						{
							ex.log();
						}
					};
			Action<IntPtr> setTarget = 
				(handle)=>{
							 	targetHandle.set_Text(handle.str());
							 	className.set_Text(handle.className());
							 	pictureBox.show(handle.window_ScreenShot());
								//pictureBox
							};
			topPanel = this.add_Panel();				
			topPanel.insert_Above(35).splitContainerFixed()
						.add_WindowFinder(ref windowFinder) 
						.append_Label("Handle:").top(10).append_TextBox(ref targetHandle)
						.append_Label("Parent:").top(10).append_TextBox(ref parentHandle)
						.append_Link("Hijack", ()=> hijack()).top(10)
						.append_Link("Restore", ()=> restore()) 
						.append_Link("Screenshot", ()=> screenShot()) 
						.append_PictureBox(ref pictureBox)
						.append_TextBox(ref test).set_Text("Hijack me").top(10) 
						.append_Label(ref className).topAdd(2);

				
						
			hijackedWindow = topPanel.add_GroupBox("Hijacked Window/Control").add_Panel();		
					
			targetHandle.onTextChange((text)=> parentHandle.set_Text(text.toInt().intPtr().parent().str())); 
			windowFinder.Window_Changed = setTarget; 
				
//			setTarget(test.handle()); 
			
			pictureBox.layout_Zoom();					  
			this.onClosed(
				()=>{
						"On Closed".info();
						restore();
					});
			var groupBox = hijackedWindow.parent();;
			var originalText = groupBox.get_Text();
			var splitcontainer = groupBox.splitContainer();
			
			groupBox.DoubleClick+=(sender,e)=>
				{		
					var collapsed = splitcontainer.Panel1Collapsed;
					if (collapsed)
					{
						splitcontainer.panel1Collapsed(false);					
						groupBox.set_Text(originalText);		
					}
					else
					{
						splitcontainer.panel1Collapsed(true);		
						groupBox.set_Text(".");			
					}
				};	
			return this;	
		}
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:91,代码来源:API_Win32_Handle_Hijack.cs


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