ShowDependencies(View: IWxView; [Recursive: Boolean = false]);
ShowDependencies(View: Prognoz.Platform.Interop.Andy.IWxView; Recursive: System.Boolean);
View. The parameter determines the workspace on which the selection points of objects' shapes are displayed, on which the given object depends.
Recursive. The parameter indicates whether the whole tree of objects is displayed, on which the given object depends. By default the parameter value is False, in which the workspace displays only objects of the first level of hierarchy.
The ShowDependencies method displays the objects on which the given object depends, on the workspace.
The objects on which the given object depends, are displayed on the workspace, where the object itself is also displayed. Selection points of objects' shapes are displayed on the workspace, passed by the View parameter.
Executing this example requires an object of the Workspace type. Create a form, add the button with the Button1 name to it, the WorkspaceBox component with the WorkspaceBox1 name, the UiWorkspaceObject component with the UiWorkspaceObject1 name, specify the workspace as an object of theUiWorkspaceObject1 component, the UiWorkspaceObject1 component as the source of the WorkspaceBox1 component and the True value of the Active property of the UiWorkspaceObject1 component. Add the CheckBox component named CheckBox1. Add links to the Collections, Metabase and Workspace system assemblies.
Class OBJ48413Form: Form
UiWorkspaceObject1: UiWorkspaceObject;
WorkspaceBox1: WorkspaceBox;
Button1: Button;
CheckBox1: CheckBox;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
(WorkspaceBox1.View.Workspace.Shapes.Item(3).Extension As IWxMetabaseObject).ShowDependencies(WorkspaceBox1.View, CheckBox1.Checked);
End Sub Button3OnClick;
End Class OBJ48413Form;
When the CheckBox1 checkbox is selected, on pressing the Button1 button the WorkspaceBox1 component area displays the whole tree of objects, on which the object with index 3 depends, if the CheckBox1 checkbox is deselected, objects of the first level of hierarchy are displayed.
Executing this example requires an object of the Workspace type. Create a form, add the button with the Button1 name to it, the WorkspaceBoxNet component with the WorkspaceBoxNet1 name, the UiWorkspaceObjectNet component with the UiWorkspaceObjectNet1 name, specify the workspace as an object of theUiWorkspaceObjectNet1 component, the UiWorkspaceObjectNet1 component as the source of the WorkspaceBoxNet1 component and the True value of the Active property of the UiWorkspaceObjectNet1 component. Add the CheckBoxNet component named CheckBoxNet1. Add links to the Collections, Metabase and Workspace system assemblies.
Imports System;
Imports System.Collections.Generic;
Imports System.ComponentModel;
Imports System.Data;
Imports System.Drawing;
Imports System.Text;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Workspace;
Public Partial Class OBJ995Form: Prognoz.Platform.Forms.Net.ForeNetForm
Public Constructor OBJ995Form();
Begin
InitializeComponent();
End Constructor;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
(WorkspaceBoxNet1.View.Workspace.Shapes.Item[3].Extension As IWxMetabaseObject).ShowDependencies(WorkspaceBoxNet1.View, CheckBox1.Checked);
End Sub;
End Class;
When the CheckBoxNet1 checkbox is selected, on pressing the Button1 button the WorkspaceBoxNet1 component area displays the whole tree of objects, on which the object with index 3 depends, if the CheckBoxNet1 checkbox is deselected, objects of the first level of hierarchy are displayed.
See also: