Code Monkey home page Code Monkey logo

nodeeditorwinforms's People

Contributors

komorra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodeeditorwinforms's Issues

Example of creating a node through code

I'd like to setup the control so that it starts with a 'Starter' node by default every time the control is loaded. I assume I need to set nodesControl1.Context.CurrentProcessingNode to a new Node but it isn't clear through the NodeVisual class how this is done.

Loop with conditions exemple ?

Hello, my project is to make a packet editor my game.

I need to make something like :
1 - Walk to a Point.
2 - Attack Monster
3 - ( Condition : If Life < 50% )
3.1 - Walk to a Point
3.2 - Wait x second
4 -LOOP BACK to 1-

Your project look very great and simple and i should be able to adapt it to my situation. Unfortunately there is no "complex" example of how to use it and I'm struggling by understand it by myself.

I read that i should use "ExecutionPath" from another issue (#15 (comment)), but the example isn't reproducible.

Any help would be appreciate !
Thank you.

Zooming and mouse control enhancements

First of all, great work on this! I've been willing to include this into one of my projects, and I am thinking to contribute a little bit with the following:

  • Zooming: Allow the consumer to set the zooming level (zoom on and out). Setting default to 1f for 100% zooming level. I'm thinking it would be good if the control does it automatically for you when you use the wheel but also allow you invalidate it and set it manually throw a ZoomLevel property.

  • Move through the control using mouse drag: When you press Alt + Click, you enter now into Drag mode, where the cursor is changed to a grabbing hand and allow you to move thorugh the graph without scrolling. Stop pressing Alt and you will stop this behaviour.

Let me know if the project is open to contributions and how.

Thank you.

Great job....but how to....

Hi, really love what you did...but I need some guidance on how to develop nodes with complex logic.
For instance I would like to make a node that takes an INT as input and it output TRUE/FALSE is the value is above a set number. The number must be entered in a text box on the node. How do I add the text box or other components to a node?

Thx!!!

output string parameter

Hello, thanks for the work this is great !

I encountered an issue when trying to create a simple "String Value" node, based on the MathSample :

[Node("String Value", "Input", "Basic", "Allows to output a simple string value.", false)]
public void InputStringValue(string inValue, out string outValue)
{
    outValue = inValue;
}

When creating the node, I have this exception :

System.MissingMethodException: 'Constructor on type 'System.String' not found.'

This breaks into NodeVisual.cs line 193, because the tested out type is not 'String' but 'String&'.

I worked around it by replacing the test this way :

var p = output.ParameterType.Name.TrimEnd('&').ToLower() == "string"

I thought this would require your attention for a proper fix :)

Custom editor help

Fantastic project thankyou for sharing your code)
please help me .

PVE4 FE NODE EDIOR (screen shot)
Example parameter module shows
a slider and a combo box how can this be acheived
or otjer multiple components
is it possible for an example
how to change code below ?

[Node("IsGreater",customEditor:typeof(NumericUpDown))]
public void IsGreater(int input, out bool output)
{
var userThreshold = (int)(CurrentProcessingNode.CustomEditor as NumericUpDown).Value;
output = input > userThreshold;
}

Test example?

Any chance of a runnable test example? As it stands there's bits missing from the example usage code to get it to do anything:
Error CS0535 'FContext' does not implement interface member 'INodesContext.FeedbackInfo' etc.

Serialize User Control ?

Hi there, this is awesome!
I need a little guidance, if I have a node which shows an User control with a textbox, it is possible to serialize and deserialize that textbox value?
Thanks!
Rodo

Proposal and Question

Hi, first of all I want to thank you for this great library, I am using it in my project and have expanded it to use Direct2D for graphics rendering (among other things). I have only one question:
How can I make or create a node that has multiple outputs?
For example, fork a Boolean value.
I can not find ways to do it at the moment, any help will be greatly appreciated, it is more if you want it, I can give you my expanded code.

Error when "out string" is used

Hello,

If we use string parameter as output we get error on control.
pasted image at 2016_12_28 09_50 am

What can we do about it?

Code Example:
[Node("XML Data", "Input", "Basic", "Allows to output a XML value.",false)] public void InputXml(string inValue, out string outValue) { outValue = inValue; string strOut = ""; //MessageBox("strOut"); }

Adding combo box to a standary node

Hi there,
thanks for sharing this great project. I am using it like you said as a signal routing patcher for an osc/midi/dmx system for our band. I have sucsessfully added and expanded to it. However I have a couple of issues and I need help. To make things easier I have taken your original code and made a very minor change but I still have the same issue. I made a minor change to the Serialise function to enable me to save .nds with filename, its now a void function and return commented out. If I add a modified module with a combo box save and reload the nds file the app dies in .also how to I access combo box ie read or write entry.

    public void Deserialize(byte[] data)
    {
        using (var br = new BinaryReader(new MemoryStream(data)))
        {
            var ident = br.ReadString();
        //unable to read past end of file


       //modified node added combo box
   [Node("Value", "Input", "Basic", "Allows to output a simple value.",false,false, typeof(ComboBox))]
    public void InputValue(float inValue, out float outValue)
    {
        outValue = inValue;
    }


    public void Serialize(string fn)
    {

        using (BinaryWriter bw = new BinaryWriter(File.Open(fn, FileMode.Create)))

        {
            bw.Write("NodeSystemP"); //recognization string
            bw.Write(1000); //version
            bw.Write(graph.Nodes.Count);
            foreach (var node in graph.Nodes)
            {
                SerializeNode(bw, node);
            }
            bw.Write(graph.Connections.Count);
            foreach (var connection in graph.Connections)
            {
                bw.Write(connection.OutputNode.GUID);
                bw.Write(connection.OutputSocketName);

                bw.Write(connection.InputNode.GUID);
                bw.Write(connection.InputSocketName);
                bw.Write(0); //additional data size per connection
            }
            bw.Write(0); //additional data size per graph
            // return (bw.BaseStream as MemoryStream).ToArray();
        }
    }

Eto.Forms variant?

This is fantastic. I wondered whether you'd considered a version based on something like Eto.Forms, where it might be possible to use this on multiple platforms.

Autoscroll Doesn't Seem to work

Great library. I found it very quick and generally easy to use.
One thing that doesn't seem to work, though is the AutoScroll property of the control. If you make the control anchored inside a form, and then you change the size of the form, its easy to lose your nodes by shrinking the control. It seems like there's no good way to navigate the control "canvas". Normally, this would be handled by the autoscroll property. Unless, I'm maybe using it wrong.

Wpf Version ?

Great NodeEditor. Thanks a lot.

Do you have any plans to port this to WPF ?

Straightforward example to add customized nodes?

Hi, Thanks for making this project public, I did try the example and it is perfect for generic usage.

Although I am having hard time to figure out exactly how do you create new nodes. Ideally I would like to have some guidance example, that show how did you make the nodes for the various operations; and what is the minimum viable code to actually get just the "work area" where to add nodes; and how to make nodes Input and Output.

The example that you made is really helpful but it is taking me some time to get to the basics; I know that you may not have time, but something step by step, that show starting from the inclusion of the control on the form, creation of a couple of different node types and how they interact with each other; would really be the fastest way to dive into your project.

Thanks for your efforts!

AssemblyResolver can't find the Assembly [NodesControl.cs]

I found an issue in the AssemblyResolver here:
https://github.com/komorra/NodeEditorWinforms/blob/master/NodeEditor/NodesControl.cs#L368

x => x.GetName() == assemblyName this compares two different physical identities of assemblies, which returns 'null' as a result.

To resolve this issue you just need to compare their Assembly.FullNames like this:

x => x.GetName().ToString() == assemblyName.FullName;


I was trying to connect two identical List sockets, but the connection failed. After applying the above mentioned fix, it is possible to work with generic Lists in the NodeGraph, as the AssemblyResolver will find the correct connected Assembly.

Are you accepting pull request? Then I could do it for you if wished.

BTW: NodeEditorWinforms is very nice. You did a great job. Thank you!

Difference between yellow and black connections

Hi,
If I understand correctly the yellow connections between nodes are the order of execution, since they go from Exit of one node to Enter of the next node.
However what are the black connections and how are thy executed, I see that the nodes with black connections don't have exit and enter?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.