本文整理汇总了C#中Canguro.GetProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Canguro.GetProperties方法的具体用法?C# Canguro.GetProperties怎么用?C# Canguro.GetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Canguro
的用法示例。
在下文中一共展示了Canguro.GetProperties方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
/// <summary>
/// Executes the command.
/// Creates a series of connected Line Elements given at least 2 points. Each subsequent point given adds a new Line Element.
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
LineElement line;
Joint joint1, joint2;
LineProps props = new StraightFrameProps();
List<LineElement> newLines = new List<LineElement>();
List<AreaElement> newAreas = new List<AreaElement>();
services.GetProperties(Culture.Get("addLineProps"), props);
joint1 = services.GetJoint(newLines);
services.TrackingService = LineTrackingService.Instance;
services.TrackingService.SetPoint(joint1.Position);
try
{
while ((joint2 = services.GetJoint(newLines)) != null)
{
if (joint2 != joint1)
{
services.Model.LineList.Add(line = new LineElement(props, joint1, joint2));
newLines.Add(line);
joint1 = joint2;
services.TrackingService.SetPoint(joint1.Position);
// Para que se refleje el cambio inmediatamente
services.Model.ChangeModel();
}
}
}
catch (Canguro.Controller.CancelCommandException) { }
if (newLines.Count == 0)
services.Model.Undo.Rollback();
else
JoinCmd.Join(services.Model, new List<Joint>(), newLines, newAreas);
}
示例2: Run
/// <summary>
/// Executes the command.
/// Asks the User for parameters and adds the Load to all selected Joints.
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
GroundDisplacementLoad load = new GroundDisplacementLoad();
services.GetProperties(Title, load);
Joint joint;
while ((joint = services.GetJoint()) != null)
{
// TODO: Checar validez
joint.Loads.Add(load);
// Para que se refleje el cambio inmediatamente
services.Model.ChangeModel();
}
}
示例3: Run
/// <summary>
/// Executes the command.
/// Creates one AreaElement.
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
AreaElement area;
List<Joint> joints = new List<Joint>();
Joint joint1, joint2, joint3, joint4;
AreaProps props = new AreaProps();
List<LineElement> newLines = new List<LineElement>();
try
{
services.GetProperties(Culture.Get("addAreaProps"), props);
joint1 = services.GetJoint(newLines);
services.TrackingService = PolygonTrackingService.Instance;
services.TrackingService.SetPoint(joint1.Position);
services.Model.ChangeModel();
joint2 = services.GetJoint(newLines);
services.TrackingService.SetPoint(joint2.Position);
services.Model.ChangeModel();
joint3 = services.GetJoint(newLines);
services.TrackingService.SetPoint(joint3.Position);
services.Model.ChangeModel();
joint4 = services.GetJoint(newLines);
if (joint4 != null)
services.TrackingService.SetPoint(joint4.Position);
services.Model.AreaList.Add(area = new AreaElement(props, joint1, joint2, joint3, joint4));
services.Model.ChangeModel();
}
catch (Canguro.Controller.CancelCommandException) { }
//if (newLines.Count == 0)
// services.Model.Undo.Rollback();
//else
// JoinCmd.Join(services.Model, new List<Joint>(), newLines);
}
示例4: Run
/// <summary>
/// Executes the command.
/// Gets the parameters and calls createCylinder to add a Cylinder to the model
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
if (section == null)
section = Canguro.Model.Section.SectionManager.Instance.DefaultFrameSection as Canguro.Model.Section.FrameSection;
services.GetProperties(Culture.Get("cylinderCmdTitle"), this);
Controller.Snap.Magnet m = services.GetPoint(Culture.Get("selectCylinderCenter"));
if (m == null) return;
Microsoft.DirectX.Vector3 o = m.SnapPosition;
StraightFrameProps props = new StraightFrameProps();
props.Section = section;
createCylinder(services.Model, o, r, c, h, s + 1, props);
}
示例5: 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);
}
示例6: Run
/// <summary>
/// Executes the command.
/// Gets the parameters and calls beamGrid3D() to make the grid.
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
if (section == null)
section = Canguro.Model.Section.SectionManager.Instance.DefaultFrameSection as Canguro.Model.Section.FrameSection;
services.GetProperties(Culture.Get("gridCmdTitle"), this);
Controller.Snap.Magnet m = services.GetPoint(Culture.Get("selectGridOrigin"));
if (m == null) return;
Microsoft.DirectX.Vector3 o = m.SnapPosition;
StraightFrameProps props = new StraightFrameProps();
props.Section = section;
beamGrid3D(services.Model, o.X, o.Y, o.Z, dx, 0, 0, 0, dy, 0, 0, 0, dz, nx + 1, ny + 1, nz + 1, true, props);
}
示例7: Run
/// <summary>
/// Executes the command.
/// Opens the properties window to edit the Active Layer
/// </summary>
/// <param name="services">CommandServices object to interact with the system</param>
public override void Run(Canguro.Controller.CommandServices services)
{
Layer layer = services.Model.ActiveLayer;
services.GetProperties(Culture.Get("editCmdTitle"), layer, false);
}