>Hi All,
>
>I am reviewing the idea of moving a VFP app to c#. Although I am happy to re-write the business and data access layers I was hoping I could automate the winform creation. I wrote a small c# program to open up the scx file and pull out all of the controls and position correctly on th new c# form. This all worked well, but the problem is that this is all done at run time so I dont have the actual source code for the form.cs and form.designer.cs.
>
I have something similar - an Ironpython/vfp bridge analysing the form and from there dynamically creating Winform (great) or WPF(most of the times as of now) screens including some niceties as identical object structure (.parent, not .parentclass!), Fonts and Fontattributes, Colours and other "visible" characteristics. Works with databinding to datasources moved across from the vfp program running as activeX in another process, writing out the form structure as source or XAML alone should be possible through adding just another kind of "renderer".
This works currently only from the last level - any well thought-out GUI-inheritance will be lost, but that could be changed.
If you need translated method code as well, that will be oodles harder to implement even half automatically. Somewhere half between pseudocode and 10% incorrect C# should be possible, but only if the vfp code is not too convoluted/tricky and vfp-specific. To be honest, a lot my apps would not jump such a hurdle ;-)
regards
thomas
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement