C# Class Revit.SDK.Samples.ViewFilters.CS.ViewFiltersForm

UI form to display the view filters information Some controls provide interfaces to create or modify filters and rules.
Inheritance: System.Windows.Forms.Form
Mostrar archivo Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
MyMessageBox ( String strMsg ) : void

Custom MessageBox for this sample, with special caption/button/icon.

ViewFiltersForm ( Autodesk commandData ) : System

Overload the constructor

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AddAppliableCategories ( ) : void

This method will reset Category check list box with all applicable categories with document

CreateNewFilterRule ( BuiltInParameter curParam ) : FilterRuleBuilder

Create new FilterRuleBuilder for current parameter

GetCurrentRuleData ( ) : FilterRuleBuilder

Get FilterRuleBuilder for current filter

GetCurrentRuleDataIndex ( ) : int

Get index for selected filter rule

GetRuleValueDouble ( bool isEpsilon, double &ruleValue ) : bool

Get rule value of double type from control

GetRuleValueInt ( int &ruleValue ) : bool

Get rule value of integer type

HasFilterData ( ) : bool

Check if some filter exists

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InitializeFilterData ( ) : void

Initialize filter data with existing view filters

ParameterAlreadyExist ( BuiltInParameter param ) : bool

Check to see if rule for this parameter exists or not

ParameterInUse ( BuiltInParameter selParameter ) : bool

Check if selected parameter already in use(has criteria)

ResetCategoriesControl ( bool reAddAll ) : void

Reset categories CheckListBox control

ResetControlByParamType ( StorageType paramType ) : void

Update controls' status and visibility according to storage type of current parameter

ResetControls_HasFilter ( ) : void

Update controls when has filter

ResetControls_NoFilter ( ) : void

Reset controls when no any filter

ResetControls_NoFilterRule ( ) : void

Update control when no filter rule

ResetParameterCombox ( ICollection paramSet ) : void

Reset paramerComboBox with new parameters

ResetRule_CategoriesChanged ( ) : void

Reset rules because categories were changed

ViewFiltersForm_Load ( object sender, EventArgs e ) : void

When the form was loaded, display the information of existing filters

ViewFiltersForm_MouseMove ( object sender, MouseEventArgs e ) : void

Enable or disable some buttons according to current status/values of controls

categoryCheckedListBox_ItemCheck ( object sender, System.Windows.Forms.ItemCheckEventArgs e ) : void

Categories for filter were changed, clean all old filter rules.

checkAllButton_Click ( object sender, EventArgs e ) : void

Check all items of categories

checkNoneButton_Click ( object sender, EventArgs e ) : void

Cancel check for all items of categories

deleRuleButton_Click ( object sender, EventArgs e ) : void

Delete some filter rule

deleteButton_Click ( object sender, EventArgs e ) : void

Delete one filter

filtersListBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Select one filter, it will reset categories and accordingly rules.

hideUnCheckCheckBox_CheckedChanged ( object sender, EventArgs e ) : void

Hide or show un-checked categories

newButton_Click ( object sender, EventArgs e ) : void

Create new filter

newRuleButton_Click ( object sender, EventArgs e ) : void

Create one new rule

okButton_Click ( object sender, EventArgs e ) : void

Update ParameterFilterElement within document with

paramerComboBox_DropDown ( object sender, EventArgs e ) : void

Dynamically adjust the width of parameter so that all parameters can be visible

paramerComboBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Select parameter for current filter rule

rulesListBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Select one filter rule

updateButton_Click ( object sender, EventArgs e ) : void

Update change rule criteria and values for current filter rule Filter criteria and values won't be changed until you click this button.

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

MyMessageBox() public static method

Custom MessageBox for this sample, with special caption/button/icon.
public static MyMessageBox ( String strMsg ) : void
strMsg String Message to be displayed.
return void

ViewFiltersForm() public method

Overload the constructor
public ViewFiltersForm ( Autodesk commandData ) : System
commandData Autodesk an instance of Data class
return System