...
Add to the plugin project a new folder named ObjectProperties. In this folder, create a new class named VolumeModelObjectPropertiesVolumeModelProperties.cs and adapt the contents to the code shown below:
...
Register the object properties in the gui plugin by adding the following code to VolumeModelGuiPlugin.cs:
Code Block | ||
---|---|---|
| ||
using System.Collections.Generic;
using DeltaShell.Plugins.VolumeModel.ObjectProperties;
|
and
Code Block | ||
---|---|---|
| ||
public override IEnumerable<PropertyInfo> GetPropertyInfos() { yield return new PropertyInfo<Models.VolumeModel, VolumeModelProperties>(); } |
...
Then, select the created volume model in the Project window and inspect the Properties window; a properties grid should be visible as shown in the following image:
Make sure
You can now see that editing the Name property in the panel actually results in a change of the name of the volume model in the Project tree-view window, and vice-versa. Also, if you import precipitation or basin data, the properties of the volume model will be automatically updated.
Info |
---|
Clicking on other items in the Project window results in showing their respective property grid in the Properties window too; . Delta Shell already defines object properties for all its basic data structures. |
...