当前位置: 首页>>代码示例>>C#>>正文


C# Network.findNode方法代码示例

本文整理汇总了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;
 }
开发者ID:BackupTheBerlios,项目名称:opendx2,代码行数:12,代码来源:SequencerDefinition.cs

示例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;
        }
开发者ID:BackupTheBerlios,项目名称:opendx2,代码行数:101,代码来源:DXApplication.cs


注:本文中的Network.findNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。