本文整理汇总了C#中Network.findNode方法的典型用法代码示例。如果您正苦于以下问题:C# Network.findNode方法的具体用法?C# Network.findNode怎么用?C# Network.findNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network.findNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: newNode
protected override Node newNode(Network net, int instance)
{
String node_name = NameString;
if (net.findNode(SymbolManager.theSymbolManager.registerSymbol(node_name), 0) != null)
{
ErrorDialog ed = new ErrorDialog();
ed.post("Only one {0} is allowed in a network.", node_name);
return null;
}
SequencerNode d = new SequencerNode(this, net, instance);
return d;
}
示例2: initialize
//.........这里部分代码省略.........
// Decorator Styles
DecoratorStyle.BuildtheDecoratorStyleDictionary();
// load the initial set of user macros.
MacroDefinition.LoadMacroDirectories(resource.macros);
// Create the anchor window
if (!InEditMode)
{
if (InImageMode)
anchor = newImageWindow(network);
else if (InMenuBarMode)
anchor = new DXAnchorWindow("dxAnchor", true, true);
else
{
MessageBox.Show("Unrecognized anchor mode.", "Startup Error");
Application.Exit();
}
// Initialize the anchor window so it can handle reading in the network
// before being managed.
if (applyWindowPlacements() ||
resource.noAnchorAtStartup)
{
anchor.Show();
anchor.Visible = true;
}
else
{
anchor.Show();
anchor.Visible = true;
setBusyCursor(true);
wasSetBusy = true;
}
}
else
{
anchor = newNetworkEditor(network);
if (anchor == null)
return false;
anchor.Show();
setBusyCursor(true);
wasSetBusy = true;
}
// Create the message and debug windows
messageWindow = newMsgWin();
// If quested, read in the network. This is after opening the anchor
// window because image nodes may wish to bind with the initial image
// window, etc.
if (resource.program != null)
openFile(resource.program, resource.cfgfile);
if (InDataViewerMode)
{
Node n = network.findNode("Import");
if (n == null)
{
ErrorDialog ed = new ErrorDialog();
ed.post("Can not find Import tool in viewing program.");
}
else
{
String s = resource.viewDataFile;
Debug.Assert(s != null);
n.setInputValue(1, s);
}
}
if (resource.noAnchorAtStartup)
{
anchor.Show();
}
else if (!anchor.Visible)
{
anchor.Show();
setBusyCursor(true);
wasSetBusy = true;
}
if (!resource.runUIOnly)
{
// Connect to exec first
DXChild c = startServer();
completeConnection(c);
}
// If there is an application to talk to, connect to it.
if (resource.applicationPort != 0)
connectToApplication(resource.applicationHost,
resource.applicationPort);
if (wasSetBusy)
setBusyCursor(false);
return true;
}