本文整理汇总了C#中Canguro.GetItem方法的典型用法代码示例。如果您正苦于以下问题:C# Canguro.GetItem方法的具体用法?C# Canguro.GetItem怎么用?C# Canguro.GetItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Canguro
的用法示例。
在下文中一共展示了Canguro.GetItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
/// <summary>
/// Executes the command.
/// Activates the layer containing the selected items
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
Layer layer = null;
bool oneLayer = false;
foreach (Joint j in services.Model.JointList)
{
if (j != null && j.IsSelected)
{
if (layer == null)
{
layer = j.Layer;
oneLayer = true;
}
else if (layer.Id != j.Layer.Id)
{
oneLayer = false;
break;
}
}
}
if (oneLayer || layer == null)
{
foreach (LineElement l in services.Model.LineList)
{
if (l != null && l.IsSelected)
{
if (layer == null)
{
layer = l.Layer;
oneLayer = true;
}
else if (layer.Id != l.Layer.Id)
{
oneLayer = false;
break;
}
}
}
}
if (oneLayer)
services.Model.ActiveLayer = layer;
else
{
Item item = services.GetItem();
services.Model.ActiveLayer = item.Layer;
}
services.Model.ChangeModel();
}
示例2: Run
/// <summary>
/// Executes the command.
/// Opens the properties window to edit the selected Item.
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
Item item = services.GetItem();
services.GetProperties(Culture.Get("editCmdTitle"), item, false);
}