Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to support Multi Object editing in Delft Shell an extended property editor called FilteredPropertyGrid has been added to the DelftShell GridUI.

Multi Object Editing in Visual Studio
The standard System.Windows.Forms.PropertyGrid supports editing of multiple objects by exposing a SelectedObjects property. This functionality is also found in Visual Studio 2005. In the image below you can see 3 different views of the grid when editing a form using the form editor.

figure 1 - Some sample views from the multi object property editor in Microsoft Visual Studio

PropertyGrid analyses the objects set to SelectedObjects and makes the following adjustments:

  • Show empty property value if the values of the different objects are different (See blue boxes in image)
  • Remove all properties that are not found in all selected objects (see column 2 and 3 in image)
  • It removes the Name property is if more than 1 object is selected. This is probably an addition from Visual Studio.

...

The combobox at the top of the FilteredPropertyGrid tries to mimic the behaviour of the combobox in Visual Studio. If 1 object is selected the Id is shown bold followed by the type description.

some figure 2 - Some sample views from the multi object property editor in Delft Shell DelftShell and a RR schematisation. Note that this model only has object of type string or UrbanNode.

...

  • Add option to add indivual objects to the combobox like visual studio.
  • remove the Id property if more than 1 object is selected.
  • The functionality of the original PropertyGrid class in Delft Shell (keyboard support) has not yet been copied to FilteredPropertyGrid.
  • Add a icon/symbol for each type of object in the combobox to enable the user to respond/select more quickly.

Notes:

  • This is not a replacement for the Multiple Data Editor found in Sobek. This editor uses a table to show multiple objects. This editor allows individual editing of object and multi-editing by selecting ranges in the grid. Some objects are subdivided for to keep it comprehensible (e.g. Flow - Cross Section is split in Cross Section, Friction and Initial Values) This functionality - if needed - can possibly be best implemented by using (custom generated) DataTables bound to a DataGrid.