VB to C# ToolClick syntax
I am having trouble working out the correct syntax in C# when I have clicked a custom tool added to the ribbon.
In VB it would be
I am having trouble with the DirectCast line.
In VB it would be
- Code: Select all
AddHandler chequePaymentForm.UltraToolbarsManager1.ToolClick, AddressOf chequePaymentForm_Toolbar_ToolClick
End Sub
Public Sub chequePaymentForm_Toolbar_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
Dim chequePaymentForm As JiwaCreditorChqPayUI.CreditorChqPay = DirectCast(sender, Infragistics.Win.UltraWinToolbars.UltraToolbarsManager).DockWithinContainer
I am having trouble with the DirectCast line.
- Code: Select all
chequePaymentForm.UltraToolbarsManager1.ToolClick += chequePaymentForm_Toolbar_ToolClick;
}
public void chequePaymentForm_Toolbar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
JiwaCreditorChqPayUI.CreditorChqPay chequePaymentForm = ?? what do I put here ??;