Closed dmitry-medvedev closed 6 months ago
Reported by @neoxeo : Here are 4 files to compare "Properties" and "Methods" between Winforms and Drawing with Alternet.
Files
Files
- propUI.csv (https://github.com/alternetsoft/AlternetUI/files/11946111/propUI.csv)
- methUI.csv (https://github.com/alternetsoft/AlternetUI/files/11946113/methUI.csv) should be present into Implement missing properties and methods for the drawing context #6 not here.
I beleive you mean methDW and popDW should be in #6 I will add a comment to #6 about this. Anyway absent properties and methods will be added on the same stage of development.
Yes, methDW and popDW should be in #6, thanks to understand me :-)
We started a process of making UI more compatible with WinForms. New classes, enums, methods which are present in WinForms are being added to the UI. Also some enums will be renamed to be more compatible with WinForms. I will post an updates here.
@generalloki
Update files to compare same/different methods/properties between AlternetUI version 0.9.410.0 and .Net8.0 Forms : Properties_ANUI_Net8.0_2023.12.02_070609.xlsx Methods_ANUI_Net8.0_2023.12.02_070609.xlsx
@neoxeo , Thanks!
Finally, I started to use your tables and find them very convenient to use. Our current goal is to port fully functional Alternet.Editor to Alternet.UI, so all changes will be in this area. I will post here an updates of our progress.
@generalloki
I want to add "Events" in my extract. I test to find Events for Button with this code :
private void getEvts()
{
// load ANUI dll
var assembly = Assembly.LoadFrom(@"C:\Users\Testeur1\source\repos\AlternetUI\Source\Alternet.UI\bin\Debug\net8.0\Alternet.UI.dll");
// get types
foreach (var type in assembly.GetTypes())
{
if (type.FullName == "Alternet.UI.Button")
{
Debug.WriteLine(type.FullName);
//EventInfo[] events = type.GetEvents(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public);
EventInfo[] events = type.GetEvents();
foreach (var item in events)
{
Debug.WriteLine(item);
}
}
}
}
Result :
System.EventHandler TextChanged
System.EventHandler GotFocus
System.EventHandler LostFocus
System.EventHandler CurrentStateChanged
System.EventHandler ToolTipChanged
System.EventHandler IsMouseOverChanged
System.EventHandler Click
System.EventHandler ParentChanged
System.EventHandler1[Alternet.UI.PaintEventArgs] Paint System.EventHandler MarginChanged System.EventHandler PaddingChanged System.EventHandler VisibleChanged System.EventHandler AfterShow System.EventHandler AfterHide System.EventHandler MouseCaptureLost System.EventHandler MouseEnter System.EventHandler MouseLeave System.EventHandler EnabledChanged System.EventHandler BackgroundChanged System.EventHandler ForegroundChanged System.EventHandler FontChanged System.EventHandler VerticalAlignmentChanged System.EventHandler HorizontalAlignmentChanged System.EventHandler SizeChanged System.EventHandler LocationChanged System.EventHandler
1[Alternet.UI.DragStartEventArgs] DragStart
System.EventHandler1[Alternet.UI.DragEventArgs] DragDrop System.EventHandler
1[Alternet.UI.DragEventArgs] DragOver
System.EventHandler`1[Alternet.UI.DragEventArgs] DragEnter
System.EventHandler DragLeave
System.EventHandler Idle
Alternet.UI.DependencyPropertyChangedEventHandler DataContextChanged
Alternet.UI.KeyEventHandler PreviewKeyDown
Alternet.UI.MouseEventHandler MouseMove
Alternet.UI.MouseButtonEventHandler PreviewMouseDown
Alternet.UI.MouseButtonEventHandler MouseDown
System.EventHandler LayoutUpdated
Alternet.UI.MouseButtonEventHandler MouseLeftButtonDown
Alternet.UI.MouseButtonEventHandler PreviewMouseLeftButtonUp
Alternet.UI.MouseButtonEventHandler MouseRightButtonDown
Alternet.UI.MouseButtonEventHandler PreviewMouseRightButtonUp
Alternet.UI.MouseEventHandler PreviewMouseMove
Alternet.UI.MouseButtonEventHandler MouseUp
Alternet.UI.MouseButtonEventHandler MouseRightButtonUp
Alternet.UI.MouseButtonEventHandler PreviewMouseLeftButtonDown
Alternet.UI.KeyEventHandler KeyDown
Alternet.UI.MouseButtonEventHandler PreviewMouseDoubleClick
Alternet.UI.MouseButtonEventHandler MouseDoubleClick
Alternet.UI.MouseButtonEventHandler PreviewMouseUp
Alternet.UI.TextInputEventHandler PreviewTextInput
Alternet.UI.TextInputEventHandler TextInput
Alternet.UI.KeyEventHandler PreviewKeyUp
Alternet.UI.MouseButtonEventHandler PreviewMouseRightButtonDown
Alternet.UI.MouseWheelEventHandler PreviewMouseWheel
Alternet.UI.MouseWheelEventHandler MouseWheel
Alternet.UI.MouseButtonEventHandler MouseLeftButtonUp
Alternet.UI.KeyEventHandler KeyUp
System.EventHandler Disposed
But there are some events that are present in this list but not present when I want to use button like this :
I have tried to play with Bindings Flags like "BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public" ... but without success.
Any idea ? Thanks
https://github.com/alternetsoft/AlternetUI/tree/MasterWithWebBrowser/Source/Tests/GetButtonEvents
Basically to get list of events I use the following code:
var events = AssemblyUtils.EnumEvents(typeof(Button), true);
foreach (var item in events)
Application.Log(item.Name);
What exactly event handler you want to assing?
Thanks. I will test this tomorrow.
I don't want to assign event, just get all of events for each component to identify which event present into Winforms and not présent into AlternetUI, like properties and methods.
Thank a lot for your help.
With your code I have find that I don't analyze the last AlternetUI DLL. So result I waited for wasn(t the good.
My code works fine, so now I can get Properties, Methods and Events like that :
I will post tomorrow, new Excel file to compare Events between Window.Forms and AlternetUI
@generalloki
Here is an update with Properties, Methods and Events for commit version 144b44c1d94a985e93a5b3510fdb322202648f3c :
Properties_ANUI_Net8.0_2023.12.10_130058.xlsx Methods_ANUI_Net8.0_2023.12.10_130058.xlsx Events_ANUI_Net8.0_2023.12.10_130058.xlsx
Many thanks! Our current goal is to add enough props and methods so Alternet.Editor worked fine in Alterent.UI. After that we will move forward to other props and methods.
Perfect ! Alternet.Editor will be a fantastic bonus to help user to create/migrate applications. And with all methods, properties and event you add and you will add, migration will be easier. I'm so happy 😊
Thanks a lot
methUI.csv propUI.csv