<pstyle="margin-top:2rem;text-align:left;">STNodeEditor is a lightweight and powerful node editor, very simple to use. Provides a wealth of properties and events, which can easily complete the data interaction and notification between nodes. A large number of vitual functions are available for developers to use. It is very free.</p>
<pclass="quote_symbol">In this case, only a node editor control is provided, and the TreeView,PropertyGrid is not included. If I have time later, I will make a complete framework.</p>
<p>The above is what the author of the first version mentioned in the document. <spanstyle="font-size:2rem;color:hotpink">NOW <spanstyle="font-size:1.2rem;"> it's </span> COME TRUE</span></p>
<p><spanclass="span_key">STNodeEditor</span>has a very powerful function. It supports the movement and zooming of the canvas and can lock the position of the node and the connection. When connecting, it will automatically check whether the data type is compatible, and whether the connection is repeated or whether it is a loop path, etc.</p>
<ul>
<li>Drag the title to move the node</li>
<li>Right-click the title to pop up the menu <spanstyle="color:gray;">(set<spanclass="span_key">ContextMenuStrip</span>)</span></li>
<li>Drag the connection points to connect</li>
<li>Right-click on the connection to disconnect</li>
<li>Middle-drag to move the canvas <spanstyle="color:gray;">(If the notebook touchpad supports it, it can be dragged with two fingers)</span></li>
<li>CTRL+mouse wheel to zoom the canvas</li>
</ul>
<pstyle="color:hotpink">Note: The operation editor performed in the node client area will not respond, because the operations in the node client area will be converted into node events.</p>
<pstyle="color:hotpink">Because the author regards a node as a Form and the editor container is Desktop, the developer can develop a node like a WinForm program.</p>
<p><spanclass="span_key">STNodeHub</span>is a built-in node that can disperse one output to multiple inputs or concentrate multiple outputs on one input point to prevent repeated connections. It can also be used for layout when the node connection is complicated</p>
<p>The input and output of HUB are of <spanclass="span_key">object</span> type by default. When a connection is connected, the data type will be automatically changed and a new row will be added.</p>
<pstyle="color:hotpink">Note: Only <spanclass='span_key'>STNodeHub</span> can modify the data type of the connection point. Because the field is marked <spanclass='span_key'>internal</span>, the data type of the added connection point cannot be modified in the extended <spanclass='span_key'>STNode</span>.</p>
<p><spanclass='span_key'>STNodeTreeView</span> is easy to use, and there is no need to create a tree directory by yourself like <spanclass='span_key'>System.Windows.Forms.TreeView</span>.</p>
<p>Mark the <spanclass='span_key'>STNode</span> subclass by <spanclass='span_key'>STNodeAttribute</span> to set the path you want to display in <spanclass='span_key'>STNodeTreeView</span> and the information you want to display in <spanclass='span_key'>STNodePropertyGrid</span>.</p>
<pstyle='color:hotpink'>Note: If you want nodes to be displayed in <spanclass='span_key'>STNodeTreeView</span>, you must use <spanclass='span_key'>STNodeAttribute</span> to mark the <spanclass='span_key'>STNode</span> subclass.</p>
<p>If the property in <spanclass='span_key'>STNode</span> is marked by <spanclass='span_key'>STNodePropertyAttribute</span>, it will be displayed in <spanclass='span_key'>STNodePropertyGrid</span>. By default, <spanclass='span_key'>int, float, double, bool, string, enum</span> and <spanclass='span_key'>Array</span> of the above data types are supported. If the property data type you want to display is not supported, you can extended <spanclass='span_key'>STNodePropertyDesciptor</span>, please refer to DEMO for details.</p>
<p>You can see that some information about the node can be displayed in the <spanclass='span_key'>STNodePropertyGrid</span> panel. The author believes that this is a framework, and everyone can build another framework based on this framework. <spanstyle='color:hotpink'>And the <spanclass='span_key'>Coder</span> that writes the node for the framework can add personal information for this node.</span></p>
<p><spanclass='span_key'>STNodeEditorPannel</span> is a combination control of <spanclass='span_key'>STNodeEditor</span><spanclass='span_key'>STNodeTreeView</span><spanclass='span_key'>STNodePropertyGrid</span>.</p>
<p>You can control the layout by dragging the handle</span>
<pid="p_mengbi"attr_text='This is good question,The author doesn’t know how to answer'style="position:relative;display:inline-block;"><spanid="span_sticker"style="font-size:2rem;color:hotpink;">SO </span> what <spanstyle="font-size:3rem;color:hotpink;"> CAN </span> it <spanclass="question_symbol"style="font-size:2rem;color:hotpink;"> DO</span></p>
<pstyle="color:gray;font-size:0.8rem;">This animation is the best explanation the author can think of</p>
<p>When there are many applications (modules), they need to call each other to transfer data to complete a set of processes.<br/>
It is easy to develop a single-function application (module), but it is tedious to develop a whole set of applications that call each other with many functions.<br/>
Developers using this framework only need to define the data type, and then develop a single function node, as for the execution process, hand it over to the framework and the user connection.</p>
<p>From the picture, you can see that the node UI definition is very free.</p>
<p><spanclass='span_key'>STNodeControl</span> provides the same common functions and properties as <spanclass='span_key'>System.Windows.Forms.Control</span>, so developers only need to develop <spanclass='span_key'>STNode</span> controls like <spanclass='span_key'>WinForm</span> controls.</p>
<p>The <spanclass='span_key'>AttrTestNode</span> node in the picture does not have special UI definition requirements. You only need to provide <spanclass='span_key'>STNode</span> with the input and output data types and display text. <spanclass='span_key'>STNode.AutoSize</span> will automatically calculate the size and layout. <spanclass='span_key'>STNode.AutoSize</span> is <spanclass='span_key'>true</span> by default.</p>
<p>Maybe you have never used node editing, but node editing is more and more, especially in the design software Blender, C4D, Houdini, Davinci, etc.</p>
<p>The biggest advantage of node editing is the visual operation. A single function is completed in the node and the user can combine the required logic through the node connection to make the process visible, instead of fixing the execution process of the function in the program. Of course, the data type of the node needs to be defined before this. <spanstyle="color:orangered">Incompatible data types are not allowed to connect.</span> Normally, the connection points of the same color have the same data type.</p>
<p>Let developers only need to focus on the development of a single function, so that the coupling between functions and functions is reduced. The developer completes the required function in the node without knowing how to call the next program. You only need to pack the result data into the output option, no matter how complicated the node connection is, the node editor will automatically complete the data transfer.</p>
<pclass="quote_symbol">In this case, only a few node control writing examples are provided in the Demo, and the control is not included. If there is time, the author will make some common controls that can be used by the node.</p>
<p>The above is what the author mentioned when this version was released <spanstyle="font-size:2rem;color:hotpink">Are you <spanstyle="font-size:1.2rem;">looking forward to</span> completion</span> ???</p>