fluentsharp / FluentSharp

Fluent API for the .NET Framework (used by the O2 Platform)
63 stars 18 forks source link

Fix bug add_MenuItem(this MenuStrip menuStrip... #4

Closed DinisCruz closed 10 years ago

DinisCruz commented 11 years ago

see https://github.com/o2platform/O2.FluentSharp/blob/master/O2.FluentSharp.BCL/O2_DotNetWrappers/ExtensionMethods/WinForms_ExtensionMethods_ToolStrip.cs#L561

At the moment the callback will call all registered onClick methods and not just the one from the newly added ToolStripMenuItem

Here is an example of how it should be done: https://github.com/o2platform/O2.FluentSharp/blob/master/O2.FluentSharp.BCL/O2_DotNetWrappers/ExtensionMethods/WinForms_ExtensionMethods_ToolStrip.cs#L151

todo: check if this method is still used, since there there are other alternatives

DinisCruz commented 10 years ago

Fixed on latest version of FluentSharp.WinForms

see add_MenuItem unit test in Test_WinForms_ExtensionMethods_MenuStrip