ActiveDatabaseSoftware.ActiveQueryBuilder Namespace > QueryBuilder Class : BeforePropertiesDialog Event |
'Declaration Public Event BeforePropertiesDialog As BeforePropertiesDialogEventHandler
'Usage Dim instance As QueryBuilder Dim handler As BeforePropertiesDialogEventHandler AddHandler instance.BeforePropertiesDialog, handler
public event BeforePropertiesDialogEventHandler BeforePropertiesDialog
public: __event BeforePropertiesDialogEventHandler* BeforePropertiesDialog
The controlOwner parameter can be one of the following:
- UnionSubQuery in case of showing the Query Properties dialog;
- Link in case of showing the Link Properties gialog;
- DataSourceObject in case of showing the DataSource Properties dialog.
Displaying of the dialog may be aborted by setting the the abort parameter to true.
private void queryBuilder1_BeforePropertiesDialog(QueryBuilder sender, ControlOwner controlOwner, ref bool abort) { String msg = ""; if (controlOwner is UnionSubQuery) // Query Properties dialog (invoked from the design pane context menu) { msg = "Do you want to show Query Properties dialog?"; } else if (controlOwner is Link) // Link Properties dialog (invoked from the link context menu) { msg = "Do you want to show Link Properties dialog?"; } else if (controlOwner is DataSourceObject) // Datasource Properties dialog (invoked from the datasource context menu) { msg = "Do you want to show Datasource Properties dialog?"; } if (!String.IsNullOrEmpty(msg)) { if (MessageBox.Show(msg, "BeforePropertiesDialog event handler", MessageBoxButtons.YesNo) == DialogResult.No) { abort = true; } } }