Threading and UI
The core works on IO threads and the thread pool. It does not assume WinForms, WPF, or any specific UI framework.
DataReceivedandStateChangedmay fire on non-UI threads.- Switch to the UI thread before updating controls.
- Prefer Zeus presentation adapters instead of writing
InvokeorDispatcher.Invokein every window. - Avoid long blocking work inside event callbacks.
| Assembly | Thread handoff | Common APIs |
|---|---|---|
Zeus.Presentation.WinForms | Control.BeginInvoke | AttachZeus, BindText, BindEnabled |
Zeus.Presentation.Wpf | Dispatcher.BeginInvoke | AttachZeus, WpfUiDispatcher, MVVM binding sources |
Zeus.Presentation.Abstractions | IUiDispatcher | ImmediateUiDispatcher for tests |
The core packages and Zeus.Presentation.Abstractions do not reference desktop frameworks.
The point-table core only exposes Changed and BatchChanged. It does not reference any UI framework. A few points subscribe to Changed; a whole table, overview, or trend store subscribes to BatchChanged. AsTableBindingSource lives in Zeus.Presentation.Abstractions and only turns BatchChanged into a bindable list for WinForms / WPF. Console and service apps subscribe to the events directly. How to choose: Point Tables and Acquisition.
If you must subscribe manually, use BeginInvoke in WinForms. In WPF, update ViewModel state through WpfUiDispatcher.Current() or your own IUiDispatcher. Do not update controls after their window has closed.