.NET Component Browser: Modifications

About this task

The .NET Component Browser can be modified to accommodate your system's .NET requirements.

  • Add a group.
  • Add components to a group.
  • Delete nodes.
  • Delete .NET Components.

Add a Group

Procedure

  1. Open the .NET Component Browser.
  2. Do the following.
    A Select the folder that will include the new group.
    B Click Add Group.
  3. Enter the following.
    Group Name Name that will clearly identify the group of .NET controls that will be added.
    Description (Optional) Additional information to help users know what controls are in the group. Note: The description will display as the tooltip of the group name.
  4. Click OK.

    Result: A group folder is added to the .NET Component Browser at the level in which it was inserted.

    Add Components to a Group

  5. Open the .NET Component Browser.
  6. Do the following.
    A Select the folder that will include the added component.
    B Click Add Components.

    An Add .NET Components dialog box opens.

  7. Do the following.
    A Select a Component Source
    1. Click the Browse button to the right of the field to open the folder that contains the appropriate Control file.
    2. Select the ChartControls.dll file in the selected folder.
    Example C:\Program Files (x86)\Proficy\Proficy CIMPLICITY\exe\DotNet Components\My Samples\ChartControls.dll
    B Component Assembly Name The assembly name, which is the name of the selected .dll, will be entered automatically.
    C Select Components to Add Check the components, located in the selected assembly, which will be added to the .NET Components Browser.
    D Click OK.

    The .NET Components Browser now lists the selected components in the selected folder.

    Result: Two additional files are added to the new directory.

    A Occ.ChartControls.dll Component assembly
    B Occ.ChartControls.tlb Component type library

    .NET Controls with Non-System References

    This example (depends on) only system assemblies (as listed for the /r command option.

    They are:

    • System.dll
    • System.Windows.Forms.dll
    • System.Windows.Forms.DataVisualization.dll.

    Third-party controls, however, usually reference their own supporting assemblies. When a control assembly is compiled, the compiler copies all non-system reference assemblies to the output folder.

    The control assembly and its supporting reference assemblies should be copied to a specific folder under the ..\<CIMPLICITY Installation>\exe\DotNet Components folder. However, some third-party common assemblies may need to be installed into the system assembly cache or be copied to the ..\<CIMPLICITY Installation>\exe folder.

    Delete Nodes

    You can delete a group or an assembly node from the .NET Component Browser.

    Do the following.

    A Select the node to delete.
    B Click Delete Node.
    guide: Delete Node Guidelines

    The Delete feature can help to keep the browser clean and well organized. However, be very cautious when deleting components such as the ChartControls node. A CIMPLICITY screen will fail to load if it contains any control objects created from the components of the deleted assembly.

    The deletion action includes the following safeguards.

    • Custom nodes that are deleted can be recovered by adding their assemblies (Add Components).
    • If any node under .NET Framework is deleted, the .NET Component feature will have to be reinstalled to recover the deleted node.
    • The root Group node (.NET Components) cannot be deleted;
    • A Group node cannot be deleted if it contains child nodes.
    • An Assembly node cannot be deleted if any opened CIMPLICITY screens contain control objects created from its components.
    • An assembly node added in the current session cannot be deleted.

    Note: The generated supporting assembly is loaded when performing an Add Components action; it cannot be deleted unless it is unloaded at the session's end. If you are certain that the assembly entry  should no longer be available it can be deleted by closing and reopening CimEdit.

    Problems with deletion arise if a closed picture that contains components from the deleted assembly is then opened, because CimEdit cannot check references in closed screens. This is the same behavior as that of CIMPLICITY ActiveX controls in case that they are unregistered.

    Delete .NET Components

    Deleting a component entry is a serious action and is a rarely used feature.

    However, if it is necessary to delete a .NET component,

  8. Click the Browse button to the right of the field to open the folder that contains the appropriate Control file.
  9. Select the ChartControls.dll file in the selected folder.
    ExampleC:\Program Files (x86)\Proficy\Proficy CIMPLICITY\exe\DotNet Components\My Samples\ChartControls.dll
  10. All of the .NET component's children (e.g. groups, assembly nodes, etc.) must be deleted first.
  11. CimEdit must be closed and re-opened.