Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
swdev:dotnet:develop_a_noah_fitting_module_using_.net [2011/07/06 12:34] smayr [GUI] |
swdev:dotnet:develop_a_noah_fitting_module_using_.net [2017/01/20 11:56] (current) smayr [Noah Fitting Module Logo (assembly Noah3.FitMod.Logo.dll)] |
||
---|---|---|---|
Line 218: | Line 218: | ||
* Create C++ MFC (Microsoft Foundation Class) application project. | * Create C++ MFC (Microsoft Foundation Class) application project. | ||
* Build application. | * Build application. | ||
- | * Register COM server | + | * Register COM server |
+ | * By selecting checkbox " | ||
+ | * By executing the generated executable file. It generates an error "This server can only be run from a container application.", | ||
REGEDIT | REGEDIT | ||
; This .REG file may be used by your SETUP program. | ; This .REG file may be used by your SETUP program. | ||
Line 246: | Line 248: | ||
HKEY_CLASSES_ROOT\CLSID\{241255F6-0B94-4EBE-993A-030A8A4968FE}\InprocHandler32 = ole32.dll | HKEY_CLASSES_ROOT\CLSID\{241255F6-0B94-4EBE-993A-030A8A4968FE}\InprocHandler32 = ole32.dll | ||
</ | </ | ||
+ | |||
+ | |||
=== GUI Wrapper (assembly Noah3.FitMod.GUI.dll) === | === GUI Wrapper (assembly Noah3.FitMod.GUI.dll) === | ||
* Create a C# WinForms project. | * Create a C# WinForms project. | ||
Line 298: | Line 302: | ||
</ | </ | ||
* Structure code to deal with resources correctly when WPF is hosted in WinForms control (see [[http:// | * Structure code to deal with resources correctly when WPF is hosted in WinForms control (see [[http:// | ||
+ | |||
+ | |||
=== GUI === | === GUI === | ||
* Create a C# WPF project. | * Create a C# WPF project. | ||
Line 306: | Line 312: | ||
* If using custom styles, load them from '' | * If using custom styles, load them from '' | ||
* Register control or application with Noah Module Server. Typically the GUI control would call the AppViewModel to do so. Eg: The GUI code: <code csharp> | * Register control or application with Noah Module Server. Typically the GUI control would call the AppViewModel to do so. Eg: The GUI code: <code csharp> | ||
+ | // Connect | ||
TAppViewModel AppVM = new TAppViewModel(); | TAppViewModel AppVM = new TAppViewModel(); | ||
AppVM.ApplicationExecMode = TAppExecMode.Noah; | AppVM.ApplicationExecMode = TAppExecMode.Noah; | ||
- | AppVM.cmdConnectToNoah(); | + | AppVM.cmdOpenNoahConnection(); |
+ | |||
+ | // Do work... | ||
+ | . . . | ||
+ | // Disconnect | ||
+ | AppVM.cmdCloseNoahConnection(); | ||
</ | </ | ||
/// | /// | ||
Line 376: | Line 388: | ||
* '' | * '' | ||
+ | === Noah Fitting Module Logo (assembly Noah3.FitMod.Logo.dll) === | ||
+ | * Create Class (assembly) project. | ||
+ | * Create '' | ||
+ | LOGO001 | ||
+ | LOGO002 | ||
+ | STRINGTABLE | ||
+ | { | ||
+ | 1001, " | ||
+ | } | ||
+ | </ | ||
+ | * Compile resource file '' | ||
+ | * Alternatively, | ||
+ | * Add res file to assembly. | ||
+ | * Build assembly. |