ILNEditor 1.4.0

dotnet add package ILNEditor --version 1.4.0                
NuGet\Install-Package ILNEditor -Version 1.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ILNEditor" Version="1.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ILNEditor --version 1.4.0                
#r "nuget: ILNEditor, 1.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ILNEditor as a Cake Addin
#addin nuget:?package=ILNEditor&version=1.4.0

// Install ILNEditor as a Cake Tool
#tool nuget:?package=ILNEditor&version=1.4.0                

ILNEditor

Editor for ILNumerics (http://ilnumerics.net/) scene graphs and plot cubes.

How to use

Attach the editor to your ILPanel instance:

ILPanelEditor.AttachTo(ilPanel);

or (if you want to interact with the editor in code, e.g. serialization)

var editor = ILPanelEditor.AttachTo(ilPanel);

Open the editor dialog by clicking on an object in the graph/plot. For example, click on

  • the Axes X/Y/Z for axis properties
  • the SurfacePlot for ILSurface properties
  • a LinePlot line for ILLinePlot properties
  • etc.

Context menu (right click) provides additional options.

Public Methods

There are a few public methods on the panel editor:

  • ShowEditor() open the panel editor (interactively change properties) from code
  • ShowPlotBrowser() open the plot browser (list of known plot types) from code
De/Serialize scene state

Scene state refers to the properties of all objects in the scene graph. It does NOT (de)serialize the actual scene graph, i.e. it does NOT restore the graph on deserialization. The scene state captures colors, line styles, visibility, fonts and font sizes, etc., all the properties defining the visual appearance of the scene. The primary use case is to save and re-apply or transfer the style to a new scene graph. To some degree the serialization is fuzzy, i.e. it still applies if objects are removed or added to the original scene (new objects obviously won't receive any styling).

Serialize settings from the current scene:

var serializer = new XmlSerializer();
editor.Serialize(serializer);
//string xmlString = serializer.SaveToString();
serializer.SaveToFile(filePath);

Deserialize settings to the current scene:

var deserializer = new XmlDeserializer();
//deserializer.LoadFromString(xmlString);
deserializer.LoadFromFile(filePath);
editor.Deserialize(deserializer);
PropertyChanged notifications

You can monitor for changes of the current scene's state by subscribing to the PropertyChanged event of the panel editor:

editor.PropertyChanged += myChangeHandler;
PlotCube menu

To customize the PlotCube menu obtain a reference to it by calling the GetPlotCubeMenu() method of the panel editor.

var menu = editor.GetPlotCubeMenu();

menu.Add("-"); // Separator
menu.Add("Click Me", null, (sender, args) => { /* do something*/ });

Disclaimer

ILNEditor is in an early phase of development and should be considered experimental.

As of today (Jan 2023) the plot types in ILNumerics.Toolboxes.Drawing2 are not supported yet. However, you can inject support for custom types (and still unsupported types) by adding your own wrappers to the WrapperMap of panel editor. Of course, I hope to add support in the future.

License

ILNEditor is licensed under the terms of the MIT license (http://opensource.org/licenses/MIT, see LICENSE.txt).

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 386 2/3/2023
1.3.0 415 12/1/2021
1.2.0 464 10/8/2021
1.1.5 360 8/26/2021
1.1.4 380 8/19/2021
1.1.3 435 7/28/2021
0.5.0 2,427 1/14/2014
0.4.1 1,286 1/9/2014
0.3.0 1,265 1/7/2014
0.2.1 1,387 12/4/2013
0.2.0 1,440 9/20/2013
0.1.1 1,542 6/24/2013