• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Models.ConnectorModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Dynamo.Models.ConnectorModel的典型用法代码示例。如果您正苦于以下问题:C# ConnectorModel类的具体用法?C# ConnectorModel怎么用?C# ConnectorModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ConnectorModel类属于Dynamo.Models命名空间,在下文中一共展示了ConnectorModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnConnectorAdded

 protected virtual void OnConnectorAdded(ConnectorModel obj)
 {
     RegisterConnector(obj);
     var handler = ConnectorAdded;
     if (handler != null) handler(obj);
 }
开发者ID:ke-yu,项目名称:Dynamo,代码行数:6,代码来源:WorkspaceModel.cs


示例2: PortConnectedHandler

 protected override void PortConnectedHandler(PortModel arg1, ConnectorModel arg2)
 {
     UpdateUpstream();
 }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:4,代码来源:HelixWatch3DNodeViewModel.cs


示例3: IsInternalNodeToCodeConnection

 /// <summary>
 /// Checks whether the given connection is inside the node to code set or outside it. 
 /// This determines if it should be redrawn(if it is external) or if it should be 
 /// deleted (if it is internal)
 /// </summary>
 private static bool IsInternalNodeToCodeConnection(IEnumerable<NodeModel> nodes, ConnectorModel connector)
 {
     return nodes.Contains(connector.Start.Owner) && nodes.Contains(connector.End.Owner);
 }
开发者ID:ke-yu,项目名称:Dynamo,代码行数:9,代码来源:WorkspaceModel.cs


示例4: OnPortConnected

 /// <summary>
 /// Called when a port is connected.
 /// </summary>
 /// <param name="connector"></param>
 protected virtual void OnPortConnected(ConnectorModel connector)
 {
     if (PortConnected != null)
         PortConnected(this, connector);
 }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:9,代码来源:PortModel.cs


示例5: DynamoModel_ConnectorDeleted

        /// <summary>
        /// Handler for the model's ConnectorDeleted event.
        /// </summary>
        /// <param name="connector"></param>
        private void DynamoModel_ConnectorDeleted(ConnectorModel connector)
        {
            // TODO: Ian should remove this when the CBN reconnection bug is solved.
            /*if (connector.Start.Owner.GetType() == typeof(CodeBlockNodeModel))
            {
                return;
            }

            //we are given the connector that was deleted
            //if it's end node still exists, clear the package for 
            //the node and trigger an update.
            if (connector.End != null)
                connector.End.Owner.ClearRenderPackages();

            //tell the watches that they require re-binding.
            QueueRenderTask();*/
        }
开发者ID:jbenoit44,项目名称:Dynamo,代码行数:21,代码来源:VisualizationManager.cs


示例6: OnConnectorDeleted

 internal void OnConnectorDeleted(ConnectorModel connector)
 {
     if (ConnectorDeleted != null)
     {
         ConnectorDeleted(connector);
     }
 }
开发者ID:whztt07,项目名称:Dynamo,代码行数:7,代码来源:DynamoModelEvents.cs


示例7: Disconnect

        public void Disconnect(ConnectorModel connector)
        {
            if (!connectors.Contains(connector))
                return;

            //throw the event for a connection
            OnPortDisconnected(EventArgs.Empty);

            //also trigger the model's connector deletion
            owner.Workspace.DynamoModel.OnConnectorDeleted(connector);

            connectors.Remove(connector);

            //don't set back to white if
            //there are still connectors on this port
            if (connectors.Count == 0)
            {
                IsConnected = false;
            }

            Owner.ValidateConnections();
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:22,代码来源:PortModel.cs


示例8: IsInternalNodeToCodeConnection

 /// <summary>
 /// Checks whether the given connection is inside the node to code set or outside it. 
 /// This determines if it should be redrawn(if it is external) or if it should be 
 /// deleted (if it is internal)
 /// </summary>
 private bool IsInternalNodeToCodeConnection(ConnectorModel connector)
 {
     return DynamoSelection.Instance.Selection.Contains(connector.Start.Owner) && DynamoSelection.Instance.Selection.Contains(connector.End.Owner);
 }
开发者ID:heegwon,项目名称:Dynamo,代码行数:9,代码来源:WorkspaceModel.cs


示例9: Connectors_ConnectorAdded

 void Connectors_ConnectorAdded(ConnectorModel c)
 {
     var viewModel = new ConnectorViewModel(this, c);
     if (_connectors.All(x => x.ConnectorModel != c))
         _connectors.Add(viewModel);
 }
开发者ID:jimb000,项目名称:Dynamo,代码行数:6,代码来源:WorkspaceViewModel.cs


示例10: ConnectorViewModel

        /// <summary>
        /// Construct a view and respond to property changes on the model. 
        /// </summary>
        /// <param name="model"></param>
        public ConnectorViewModel(ConnectorModel model)
        {
            _model = model;

            _model.PropertyChanged += Model_PropertyChanged;
            _model.Start.Owner.PropertyChanged += StartOwner_PropertyChanged;
            _model.End.Owner.PropertyChanged += EndOwner_PropertyChanged;

            dynSettings.Controller.DynamoViewModel.PropertyChanged += DynamoViewModel_PropertyChanged;

            Redraw();
        }
开发者ID:algobasket,项目名称:Dynamo,代码行数:16,代码来源:ConnectorViewModel.cs


示例11: ConnectorViewModel

        /// <summary>
        /// Construct a view and respond to property changes on the model. 
        /// </summary>
        /// <param name="model"></param>
        public ConnectorViewModel(WorkspaceViewModel workspace, ConnectorModel model)
        {
            this.workspaceViewModel = workspace;
            _model = model;

            _model.PropertyChanged += Model_PropertyChanged;
            _model.Start.Owner.PropertyChanged += StartOwner_PropertyChanged;
            _model.End.Owner.PropertyChanged += EndOwner_PropertyChanged;

            workspaceViewModel.DynamoViewModel.PropertyChanged += DynamoViewModel_PropertyChanged;

            Redraw();
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:17,代码来源:ConnectorViewModel.cs


示例12: DynamoModel_ConnectorDeleted

        /// <summary>
        /// Handler for the model's ConnectorDeleted event. Clears the visualization for
        /// the node at the 'end' of the connector.
        /// </summary>
        /// <param name="connector"></param>
        void DynamoModel_ConnectorDeleted(ConnectorModel connector)
        {
            if (Visualizations.ContainsKey(connector.End.Owner.GUID.ToString()))
            {
                Visualizations.Remove(connector.End.Owner.GUID.ToString());

                //tell the watches that they require re-binding.
                //OnVisualizationUpdateComplete(this, new VisualizationEventArgs(AggregateRenderDescriptions()));
                OnVisualizationUpdateComplete(this, EventArgs.Empty);
            }
        }
开发者ID:jimmplan,项目名称:Dynamo,代码行数:16,代码来源:VisualizationManager.cs


示例13: DynamoModel_ConnectorDeleted

        /// <summary>
        /// Handler for the model's ConnectorDeleted event.
        /// </summary>
        /// <param name="connector"></param>
        void DynamoModel_ConnectorDeleted(ConnectorModel connector)
        {
            //we are given the connector that was deleted
            //if it's end node still exists, clear the package for
            //the node and trigger an update.
            if (connector.End != null)
                connector.End.Owner.ClearRenderPackages();

            //tell the watches that they require re-binding.
            OnVisualizationUpdateComplete(this, EventArgs.Empty);
        }
开发者ID:TheChosen0ne,项目名称:Dynamo,代码行数:15,代码来源:VisualizationManager.cs


示例14: OnConnectorAdded

 /// <summary>
 /// Called when a connector is added.
 /// </summary>
 /// <param name="connector"></param>
 private void OnConnectorAdded(ConnectorModel connector)
 {
     if (ConnectorAdded != null)
     {
         ConnectorAdded(connector);
     }
 }
开发者ID:heegwon,项目名称:Dynamo,代码行数:11,代码来源:DynamoModel.cs


示例15: RegisterConnector

 private void RegisterConnector(ConnectorModel connector)
 {
     connector.Deleted += () => OnConnectorDeleted(connector);
 }
开发者ID:ke-yu,项目名称:Dynamo,代码行数:4,代码来源:WorkspaceModel.cs


示例16: Connectors_ConnectorDeleted

 void Connectors_ConnectorDeleted(ConnectorModel c)
 {
     var connector = _connectors.FirstOrDefault(x => x.ConnectorModel == c);
     if (connector != null)
         _connectors.Remove(connector);
 }
开发者ID:jimb000,项目名称:Dynamo,代码行数:6,代码来源:WorkspaceViewModel.cs


示例17: OnConnectorDeleted

 protected virtual void OnConnectorDeleted(ConnectorModel obj)
 {
     var handler = ConnectorDeleted;
     if (handler != null) handler(obj);
 }
开发者ID:ke-yu,项目名称:Dynamo,代码行数:5,代码来源:WorkspaceModel.cs


示例18: PortConnected

        private void PortConnected(PortModel port, ConnectorModel connector)
        {
            ValidateConnections();

            if (port.PortType != PortType.Input) return;

            var data = InPorts.IndexOf(port);
            var startPort = connector.Start;
            var outData = startPort.Owner.OutPorts.IndexOf(startPort);
            ConnectInput(data, outData, startPort.Owner);
            startPort.Owner.ConnectOutput(outData, data, this);
            OnConnectorAdded(connector);

            OnNodeModified();
        }
开发者ID:w-fish,项目名称:Dynamo,代码行数:15,代码来源:NodeModel.cs


示例19: Connect

        public void Connect(ConnectorModel connector)
        {
            connectors.Add(connector);

            //throw the event for a connection
            OnPortConnected(EventArgs.Empty);

            IsConnected = true;
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:9,代码来源:PortModel.cs


示例20: OnConnectorDeleted

        protected virtual void OnConnectorDeleted(ConnectorModel obj)
        {
            if (hasNodeInSyncWithDefinition)
            {
                undoRecorder.RecordModelAsOffTrack(obj.GUID);
            }

            var handler = ConnectorDeleted;
            if (handler != null) handler(obj);
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:10,代码来源:WorkspaceModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Models.DynamoModel类代码示例发布时间:2022-05-24
下一篇:
C# Engine.EngineController类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap