當前位置: 首頁>>代碼示例>>C#>>正文


C# ProgressBar.increment方法代碼示例

本文整理匯總了C#中System.Windows.Forms.ProgressBar.increment方法的典型用法代碼示例。如果您正苦於以下問題:C# ProgressBar.increment方法的具體用法?C# ProgressBar.increment怎麽用?C# ProgressBar.increment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.ProgressBar的用法示例。


在下文中一共展示了ProgressBar.increment方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: createAllMethodsStreams

		public static string createAllMethodsStreams(this O2MappedAstData astData, string targetFolder, ProgressBar TopProgressBar, Func<string,bool> statusMessage)
		{				
			var iMethods = astData.iMethods(astData.methodDeclarations()); 
			TopProgressBar.maximum(iMethods.size());
			int count = 0;
			int total = iMethods.size();
			//this.MethodStreams = new Dictionary<IMethod, string>();    		
			foreach(var iMethod in iMethods)
			{
				TopProgressBar.increment(1);				
				astData.createO2MethodStreamFile(iMethod,targetFolder);
				
    			//MethodStreams.Add(iMethod,AstData.createO2MethodStream(iMethod).csharpCode());  
    			if (statusMessage.notNull())
					if (statusMessage("calculating methodStream: {0}/{1}".format(count++, total)).isFalse())
					{
						"Scan Cancel/Stop request received".info();
						return targetFolder;
					}	
			}
			return targetFolder;
		}
開發者ID:pusp,項目名稱:o2platform,代碼行數:22,代碼來源:Ast_Engine_ExtensionMethods.cs

示例2: calculate_Url_to_EntryMethod_Mappings

    	public static List<IO2Finding> calculate_Url_to_EntryMethod_Mappings(string pathWithSourceFiles, string urlBase, string port, ProgressBar progressBar)
    	{
    		var o2Findings = new List<IO2Finding>();
			var filesToAnalyze = pathWithSourceFiles.files("*.cs",true);
			progressBar.maximum(filesToAnalyze.size());
			foreach(var file in filesToAnalyze)
			{	
					"Processing file:{0}".info(file);
				var url = urlBase.format(port, file.replace(pathWithSourceFiles,"").replace(".ascx.cs",""));
				
				foreach(var type in file.csharpAst().types(true))
					foreach(var baseType in type.BaseTypes)			
						if (baseType.str() == "System.Web.UI.UserControl")				
						{
							var astData = new O2MappedAstData();
							astData.loadFile(file);
							foreach(var iMethod in astData.iMethods())
							{
								var o2Finding = new O2Finding();
								o2Finding.vulnName = url;
								o2Finding.vulnType = "Web EntryPoint";
								var source = new O2Trace(url);
								var sink = new O2Trace(iMethod.fullName());
								source.traceType = TraceType.Source;
								sink.traceType = TraceType.Known_Sink;					
								source.childTraces.Add(sink);
								o2Finding.o2Traces.Add(source);					
								o2Findings.Add(o2Finding);
							}									
						}	
				progressBar.increment(1);				
			}		
			return o2Findings;
    	}
開發者ID:CallMeSteve,項目名稱:O2.Platform.Scripts,代碼行數:34,代碼來源:API_HacmeBank.cs


注:本文中的System.Windows.Forms.ProgressBar.increment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。