本文整理汇总了C#中ResourceInfo.canQueue方法的典型用法代码示例。如果您正苦于以下问题:C# ResourceInfo.canQueue方法的具体用法?C# ResourceInfo.canQueue怎么用?C# ResourceInfo.canQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResourceInfo
的用法示例。
在下文中一共展示了ResourceInfo.canQueue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: writeLine
/// <summary>Escreve um item</summary>
private void writeLine( HtmlTextWriter writer, ResourceInfo resources, string res )
{
if( ShowImagePreview ) {
writer.WriteLine("<td class='resourceManagement'><img src='{0}.gif' style='width:20px;height:20px;'/></td>", OrionGlobals.getCommonImagePath(res.ToLower()));
}
if( ShowQuantity ) {
writeQuantity(writer, resources, res);
}
writer.WriteLine("<td class='resource'>");
if( ShowDocumentation ) {
writer.WriteLine( "<a class='docs' href='{1}/{2}.{3}' {4}>{0}</a>",
info.getContent(res),
OrionGlobals.getSectionBaseUrl("wiki"),
resources.Category, res,
getTooltipText(resources, res)
);
} else {
writer.WriteLine( info.getContent(res) );
}
writer.WriteLine("</td>");
bool canBuild = resources.canQueue(res, 1).Ok;
if( ShowCost ) {
writeCost( writer, resources, res);
}
if( ShowDuration ) {
ResourceFactory factory = (ResourceFactory) resources.AvailableFactories[res];
int duration = QueueItem.BaseDuration(Manager, factory, 1);
int real = QueueItem.RealDuration(Manager, factory, 1);
if( duration == real ) {
writer.WriteLine("<td class='resourceCell'>{0}</td>", factory.Duration.Value);
} else {
string css = "green";
if( real > duration ) {
css = "red";
}
writer.WriteLine("<td class='resourceCell'><span class='{0}'>{1}</span> ({2})</td>", css, real, duration);
}
}
writeBuild( writer, resources, res, canBuild );
if( ShowDemolish ) {
writeDemolish( writer, res, resources );
}
}