本文整理汇总了C#中Robot.shutdown方法的典型用法代码示例。如果您正苦于以下问题:C# Robot.shutdown方法的具体用法?C# Robot.shutdown怎么用?C# Robot.shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Robot
的用法示例。
在下文中一共展示了Robot.shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main()
{
Console.WriteLine ("Starting");
IceApp app = null;
Holon holon = null;
Robot robot = null;
try
{
//app = new IceApp("localhost", 12000);
app = new IceApp("MyTestAdapter", "localhost", 12000);
holon = new Holon(app, "MyTestHolon");
robot = new Robot(app, "MyRobot");
Console.WriteLine(holon.Name + " starting");
app.subscribeEvent(holon, "MyTopic");
hms.GenericEventInterfacePrx pub = app.getEventPublisher("MyTopic");
Thread.Sleep(1000);
hms.Message msg = new hms.Message() ;
msg.arguments = new System.Collections.Generic.Dictionary<string, string>();
msg.arguments.Add("mynewargs", "totoisback");
pub.putMessage(msg);
Thread.Sleep(10000);
pub.putMessage(msg);
Console.WriteLine ("Sleeping");
Thread.Sleep(10000);
Console.WriteLine ("Cleanup");
}
finally
{
if (robot != null )
{
robot.shutdown();
}
if (holon != null )
{
holon.shutdown();
}
if ( app != null )
{
app.shutdown();
}
}
}