本文整理匯總了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;
}
示例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;
}