Beispiel #1
0
        public void SetPortData(PortData data)
        {
            portData = data;

            UsingDefaultValue = portData.DefaultValue != null;
            RaisePropertyChanged("DefaultValueEnabled");
            RaisePropertyChanged("PortName");
            RaisePropertyChanged("TooltipContent");
        }
Beispiel #2
0
        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;
        }
        /// <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;
            KeepListStructure = false;
            Level             = 2;

            Height            = data.Height;
            DefaultValue      = data.DefaultValue;
            UsingDefaultValue = DefaultValue != null;
            LineIndex         = data.LineIndex;
            toolTip           = data.ToolTipString;
            Name = data.Name;

            MarginThickness = new Thickness(0);
            Height          = Math.Abs(data.Height) < 0.001 ? Configurations.PortHeightInPixels : data.Height;
        }
Beispiel #4
0
        /// <summary>
        /// Sets the port data.
        /// </summary>
        /// <param name="data">The data.</param>
        public void SetPortData(PortData data)
        {
            portData = data;

            UsingDefaultValue = portData.DefaultValue != null;
            RaisePropertyChanged("DefaultValueEnabled");
            RaisePropertyChanged("PortName");
            RaisePropertyChanged("TooltipContent");
        }
Beispiel #5
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;
        }
Beispiel #6
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;
        }
Beispiel #7
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;
        }