Get Type


Node Information
Select and get static types.
General Information
• This node has other options, you can view them by clicking on the info button, this also means according to the node you might be able to add more ports than what is already listed.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Get OUT Object MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Types
{
    [IsNode("Get Type")]
    public class GetType : Node
    {
        Port gettype = new Port(PortType.OUT, typeof(object), AcceptsLinks.MULTIPLE, "Get");
        public GetType()
        {
            Name = "Get Type";
            AddPort(gettype);
            OptionsAvilable = true;
            Information = "Select and get static types.";
            InfoButton.Click += InfoButton_Click;
            InfoButton.Cursor = System.Windows.Input.Cursors.Hand;
        }
        void InfoButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            OpenTypeSelectionMenu(false, false);
        }
        public override void OnTypeSelected(Type type)
        {
            Name = GraphCore.GetTypeName(type);
            ReferenceType = type;
            gettype.DataType = type;
        }
        public override void UpdateResults()
        {
            gettype.Instructions = GraphCore.GetFullTypeName(gettype.DataType);
        }
    }
}