Class PmpEventHandler
- Namespace
- Hymma.Solidworks.Addins
- Assembly
- Hymma.Solidworks.Addins.dll
handles property manager page events
[ComVisible(true)]
public class PmpEventHandler : PropertyManagerPage2Handler9, IPropertyManagerPage2Handler9
- Inheritance
-
PmpEventHandler
- Implements
-
PropertyManagerPage2Handler9IPropertyManagerPage2Handler9
- Inherited Members
Constructors
PmpEventHandler(PmpUiModel)
default constructor
public PmpEventHandler(PmpUiModel uiModel)
Parameters
uiModelPmpUiModel
Properties
UiModel
wrapper for controls in this property manager page
public PmpUiModel UiModel { get; }
Property Value
Methods
AfterActivation()
fires after user opens a pmp
public void AfterActivation()
AfterClose()
fires after users closes the pmp
public void AfterClose()
OnActiveXControlCreated(int, bool)
public int OnActiveXControlCreated(int Id, bool Status)
Parameters
Returns
Exceptions
OnButtonPress(int)
fires when button is pressed
public void OnButtonPress(int Id)
Parameters
Idintid of the button in pmp
OnCheckboxCheck(int, bool)
fires when check box status is changed
public void OnCheckboxCheck(int Id, bool Checked)
Parameters
OnClose(int)
fired when user closes the pmp
public void OnClose(int Reason)
Parameters
Reasonint
OnComboboxEditChanged(int, string)
solidworks calls this every time combo box text is edited
public void OnComboboxEditChanged(int Id, string Text)
Parameters
OnComboboxSelectionChanged(int, int)
solidworks calls this every time combo box selection is changed
public void OnComboboxSelectionChanged(int Id, int Item)
Parameters
OnGainedFocus(int)
fired when user start interacting with a control
public void OnGainedFocus(int Id)
Parameters
Idint
OnGroupCheck(int, bool)
on checkable groups, this method responds to check event
public void OnGroupCheck(int Id, bool Checked)
Parameters
OnGroupExpand(int, bool)
fires when users expands a group
public void OnGroupExpand(int Id, bool Expanded)
Parameters
OnHelp()
fires once user clicks on help button
public bool OnHelp()
Returns
OnKeystroke(int, int, int, int)
Processes a keystroke that occurred on this PropertyManager page.
public bool OnKeystroke(int Wparam, int Message, int Lparam, int Id)
Parameters
Wparamintwparam argument from Windows processing; indicates the keystroke that occurred
MessageintMessage being processed by Windows; one of these values:
Lparamintlparam argument from Windows processing; bit-mask containing various pieces of information; dependent on specific message
IdintID of the control that has focus when the keystroke was made; this is the ID specified when the control was created in IPropertyManagerPage2::AddControl or IPropertyManagerPage2::IAddControl or IPropertyManagerPage2::AddGroupBox or IPropertyManagerPage2::IAddGroupBox.
Returns
- bool
True indicates that the keystroke has been handled by the add-in and SOLIDWORKS should not continue to try to process it, false indicates that the keystroke has not been handled by the add-in and SOLIDWORKS will continue to try to process it
OnListboxRMBUp(int, int, int)
fired when user right clicks on one of list box items
public void OnListboxRMBUp(int Id, int PosX, int PosY)
Parameters
OnListboxSelectionChanged(int, int)
Called when a user changes the selected item in a list box or selection list box on this PropertyManager page.
public void OnListboxSelectionChanged(int Id, int Item)
Parameters
OnLostFocus(int)
fired when user browses away from a control
public void OnLostFocus(int Id)
Parameters
Idint
OnNextPage()
fires when users selects on next page button in pmp
public bool OnNextPage()
Returns
OnNumberBoxTrackingCompleted(int, double)
Called when a user finishes changing the value in the number box on a PropertyManager page.
public void OnNumberBoxTrackingCompleted(int Id, double Value)
Parameters
OnNumberboxChanged(int, double)
when value of a number box is changed by user
public void OnNumberboxChanged(int Id, double Value)
Parameters
OnOptionCheck(int)
fires when radio button is checked
public void OnOptionCheck(int Id)
Parameters
Idintid of the clicked on radio button in the property manager page
OnPopupMenuItem(int)
Determines which item was selected when the user selects a pop-up menu item.
public void OnPopupMenuItem(int Id)
Parameters
Idint
OnPopupMenuItemUpdate(int, ref int)
When Windows attempts to select or deselected and enable or disable the pop-up menu item, SOLIDWORKS calls this method to get the state of the menu item from the add-in.
public void OnPopupMenuItemUpdate(int Id, ref int retval)
Parameters
IdintUnique user-defined ID for a pop-up menu item
retvalintState of the specified unique user-defined pop-up menu item: 0 - Not selected(i.e., not checked) and disabled(i.e., grayed out) 1 - Not selected and enabled 2 - Selected(i.e., checked) and disabled 3 - Selected and enabled
OnPreview()
fires when users previews results
public bool OnPreview()
Returns
OnPreviousPage()
fires when users selects on previous page button in pmp
public bool OnPreviousPage()
Returns
OnRedo()
fires when user re does something
public void OnRedo()
OnSelectionboxCalloutCreated(int)
when selection box call out is created this method is called
public void OnSelectionboxCalloutCreated(int Id)
Parameters
Idintid of the selectionbox
OnSelectionboxCalloutDestroyed(int)
when selection box callout is destroyed this method will get called
public void OnSelectionboxCalloutDestroyed(int Id)
Parameters
Idint
OnSelectionboxFocusChanged(int)
when focus of a selection box is changed this method will fire
public void OnSelectionboxFocusChanged(int Id)
Parameters
Idint
OnSelectionboxListChanged(int, int)
when selection box list is changed this method will fire
public void OnSelectionboxListChanged(int Id, int Count)
Parameters
OnSliderPositionChanged(int, double)
fires when the position of a slider is changing
public void OnSliderPositionChanged(int Id, double Value)
Parameters
OnSliderTrackingCompleted(int, double)
fires when the user finishes changes on a slider
public void OnSliderTrackingCompleted(int Id, double Value)
Parameters
OnSubmitSelection(int, object, int, ref string)
Called when a selection is made, which allows the add-in to accept or reject the selection.
public bool OnSubmitSelection(int Id, object Selection, int SelType, ref string ItemText)
Parameters
IdintID of the active selection box, where this selection is being made
SelectionobjectObject being selected
SelTypeintEntity type of the selection as defined inSolidWorks.Interop.swconst.swSelectType_e
ItemTextstringItemText is returned to SOLIDWORKS and stored on the selected object and can be used by your PropertyManager page selection list boxes for the life of that selection.
Returns
Remarks
This method is called by SOLIDWORKS when an add-in has a PropertyManager page displayed and a selection is made that passes the selection filter criteria set up for a selection list box. The add-in can then:
Take the Dispatch pointer and the selection type.
QueryInterface the Dispatch pointer to get the specific interface.
Use methods or properties of that interface to determine if the selection should be allowed or not.If the selection is:
accepted, return true, and processing continues normally.
- or -
rejected, return false, and SOLIDWORKS does not accept the selection, just as if the selection did not pass the selection filter criteria of the selection list box.
The add-in should not release the Dispatch pointer. SOLIDWORKS will release the Dispatch pointer upon return from this method.
The method is called during the process of SOLIDWORKS selection.It is neither a pre-notification nor post-notification.The add-in should not be taking any action that might affect the model or the selection list.The add-in should only be querying information and then returning true/VARIANT_TRUE or false/VARIANT_FALSE.
OnTabClicked(int)
fires when uses clicks on a tab in pmp
public bool OnTabClicked(int Id)
Parameters
Idint
Returns
OnTextboxChanged(int, string)
fires when user changes the text in a text box or a numberbox
public void OnTextboxChanged(int Id, string Text)
Parameters
OnUndo()
fires when user presses undo in a pmp
public void OnUndo()
OnWhatsNew()
fires when users press on whats new button in pmp
public void OnWhatsNew()
OnWindowFromHandleControlCreated(int, bool)
fired after a window winForm handler control is displayed in the property manager page
public int OnWindowFromHandleControlCreated(int Id, bool Status)