-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathFormMathSample.cs
More file actions
38 lines (33 loc) · 1.04 KB
/
FormMathSample.cs
File metadata and controls
38 lines (33 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MathSample
{
public partial class FormMathSample : Form
{
//Context that will be used for our nodes
MathContext context = new MathContext();
public FormMathSample()
{
InitializeComponent();
}
private void FormMathSample_Load(object sender, EventArgs e)
{
//Context assignment
controlNodeEditor.nodesControl.Context = context;
controlNodeEditor.nodesControl.OnNodeContextSelected += NodesControlOnOnNodeContextSelected;
//Loading sample from file
controlNodeEditor.nodesControl.Deserialize(File.ReadAllBytes("default.nds"));
}
private void NodesControlOnOnNodeContextSelected(object o)
{
controlNodeEditor.propertyGrid.SelectedObject = o;
}
}
}