Page 1 of 1
Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Mon May 06, 2024 9:38 am
by mk_schmid
Hello everyone,
in order to be able to work with the XSharp VO Forms Editoir after the complete conversion from VO to X#, I have a few questions about the integration of our own user controls and window classes into our VOWindow'/FormsEditor environment, whether the intended path is the right one.
- Enter all derived window classes in a separate cavowed.ivo to have them in the selection when opened by the FormsEditor.
- To get the USINGS we need for our own window classes directly when creating the VOWindow.vstemplate or to create our own templates?
- Since the selection of "Inherits from Class" in the control properties is only "Auto", my idea was to extend cavowed.inf with all our control classes so that you can get them directly via the toolbox.
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Mon May 06, 2024 11:34 am
by Chris
Hi Christian,
mk_schmid wrote: ↑Mon May 06, 2024 9:38 am
in order to be able to work with the XSharp VO Forms Editoir after the complete conversion from VO to X#, I have a few questions about the integration of our own user controls and window classes into our VOWindow'/FormsEditor environment, whether the intended path is the right one.
- Enter all derived window classes in a separate cavowed.ivo to have them in the selection when opened by the FormsEditor.
That's completely up to you, what you prefer to do. To me it sounds simpler to have your controls in the single cavowed.inf, but if it's easier for you to have them in a separate file, that's fine, too.
- To get the USINGS we need for our own window classes directly when creating the VOWindow.vstemplate or to create our own templates?
Only problem I can think of with that, is that installing new X# versions will overwrite the file. But, then again, it won't take a lot of time to replace them again, once every few months.
- Since the selection of "Inherits from Class" in the control properties is only "Auto", my idea was to extend cavowed.inf with all our control classes so that you can get them directly via the toolbox.
It's in the todo list to fill the Inherits from property with all available classes. But also now, you can still enter the required class in the edit box that opens for the property and it will be accepted.
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Mon May 06, 2024 3:52 pm
by FFF
FTR,
Cavowed.inf holds a section
Code: Select all
[SupplementalFiles]
File00=MyVoWed1.ini
...
so, put your code in the referenced file to prevent any update nuisances.
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Mon May 27, 2024 2:14 pm
by mk_schmid
Hello,
I have tried to integrate our "MyVoWed1.ini" in all projects from a central location. I have tried it with absolute path as well as relative path, unfortunately the file was not integrated only if it is directly next to the file cavowed.inf it works. Is there a specific notation for this or is this generally not possible? Another thing I noticed is that if you change the file "MyVoWed1.ini", for example, you have to restart Visual Studio for the change to take effect as soon as you have a Forms Editor open.
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Mon May 27, 2024 6:43 pm
by Chris
Hi Christian,
I just checked the code, and indeed it's removing the path you provide and loads supplemental files only from the same folder with the cavowed.inf file. I wrote this code (it's the same also in XIDE), but to be honest I do not understand why I did it this way... I will change it so that it does use the absolute path you provide.
But I'm afraid it will be very complicated to support reloading supplemental files, especially if there are windows already open. Is this something you need often, or it is only now that you are trying to make it load the file from a central location?
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Tue May 28, 2024 2:32 am
by mk_schmid
Hi Chris,
if the reload of the changed file cannot be changed this is not a problem, it is probably only noticeable when you develop and test them, later these configuration files should rarely change.
Re: Include user controls and window classes in XSharp VO Forms Editoir XSharp VO Forms Editor
Posted: Tue May 28, 2024 7:30 am
by Chris
Hi Christian,
Understood, and the problem with absolute/relative paths is now fixed for the next build!