Exemple #1
0
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                nodeGraphPanel1.LoadCurrentView(openFileDialog1.FileName);
            }

            foreach (NodeGraphNode i_Node in this.nodeGraphPanel1.View.NodeCollection)
            {
                if (i_Node is RootNode)
                {
                    RootNode = i_Node as RootNode;
                }
            }
        }
Exemple #2
0
        public MainForm()
        {
            InitializeComponent();

            Tools.CustomTypeDescriptorProvider.Register(typeof(Vector3ConstNode));
            Tools.CustomTypeDescriptorProvider.Register(typeof(Vector4ConstNode));
            Tools.CustomTypeDescriptorProvider.Register(typeof(ColorConstNode));

            nodeGraphPanel1.View.RegisterDataType(new NodeGraphDataTypeFloat());
            nodeGraphPanel1.View.RegisterDataType(new NodeGraphDataTypeVector3());
            nodeGraphPanel1.View.RegisterDataType(new NodeGraphDataTypeVector4());

            RootNode = new RootNode(100, 0, nodeGraphPanel1.View);
            nodeGraphPanel1.AddNode(RootNode);
        }