Syspro gives you the ability to house a .Net User Control inside the Syspro application, in a custom pane. (A custom pane can be housed in nearly any Window in the Syspro application, or in the Syspro main menu.) The custom-written control can then interact with your Syspro user interface, the Syspro database, and the Syspro Business Objects - so it's a very nice way to write custom solutions.
However, there are a few traps for the uninitiated:
However, there are a few traps for the uninitiated:
- You need to start with a WinForm user control because Syspro can’t run WPF user controls directly; not hard to resolve; you just add a WPF user control inside your WinForm user control.
- You need to add Assembly Resolver code so that your DLL’s are loaded from ManagedAssemblies rather than BASE. See this post on the Syspro Forum for details.
- You need to override the loading of configuration files as the .Net default of BASE\IMPACT.exe.config is obviously inappropriate.
This code is good: http://stackoverflow.com/questions/6150644/change-default-app-config-at-runtime - There are some traps with calling Business Objects from .Net via Syspro's VBScript interface.
In short, you need to:
A. Avoid going over the 70-character limit, so passing XML files via temporary files is one solution.
B. Avoid using spaces, new lines, or other characters, that are of significance to VBScript, in the strings you pass from .Net to Syspro's VBScript. The way to solve this is to encode all those characters as control characters before passing them to VBScript, then decode them inside the VBScript.
C. You may need to pass more than two parameters to Syspro from .Net, but you only have two variables you can use. One way to solve this is to combine several parameters into one string, separating them with control characters.