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


C# ProgressBar.maximum方法代码示例

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


在下文中一共展示了ProgressBar.maximum方法的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.maximum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。