Ejemplo n.º 1
0
        /// <summary>
        /// Creates PortModel.
        /// </summary>
        /// <param name="portType">Type of the Port</param>
        /// <param name="owner">Parent Node</param>
        /// <param name="data">Information about port</param>
        public PortModel(PortType portType, NodeModel owner, PortData data)
        {
            IsConnected = false;
            PortType = portType;
            Owner = owner;

            SetPortData(data);

            MarginThickness = new Thickness(0);
            Height = Math.Abs(data.Height) < 0.001 ? Configurations.PortHeightInPixels : data.Height;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates PortModel.
        /// </summary>
        /// <param name="portType">Type of the Port</param>
        /// <param name="owner">Parent Node</param>
        /// <param name="data">Information about port</param>
        public PortModel(PortType portType, NodeModel owner, PortData data)
        {
            PortType = portType;
            Owner = owner;
            UseLevels = false;
            ShouldKeepListStructure = false;
            Level = 2;

            Height = data.Height;
            DefaultValue = data.DefaultValue;
            UsingDefaultValue = DefaultValue != null;
            LineIndex = data.LineIndex;
            toolTip = data.ToolTipString;
            PortName = data.NickName;
            
            MarginThickness = new Thickness(0);
            Height = Math.Abs(data.Height) < 0.001 ? Configurations.PortHeightInPixels : data.Height;
        }
Ejemplo n.º 3
0
        internal PortModel(string nickName, string toolTip)
        {
            IsConnected = false;
            UseLevels = false;
            ShouldKeepListStructure = false;
            Level = 2;

            var data = new PortData(nickName, toolTip);
            data.LineIndex = -1;
            data.Height = 0.0;

            SetPortData(data);

            MarginThickness = new Thickness(0);
            Height = Math.Abs(data.Height) < 0.001 ? Configurations.PortHeightInPixels : data.Height;
        }
Ejemplo n.º 4
0
        internal PortModel(string nickName, string toolTip)
        {
            UseLevels = false;
            ShouldKeepListStructure = false;
            Level = 2;

            Height = 0.0;
            DefaultValue = null;
            LineIndex = -1;
            this.toolTip = toolTip;
            this.PortName = nickName;

            MarginThickness = new Thickness(0);
            Height = Math.Abs(Height) < 0.001 ? Configurations.PortHeightInPixels : Height;
        }