Skip to main content

Threading and UI

The core works on IO threads and the thread pool. It does not assume WinForms, WPF, or any specific UI framework.

  • DataReceived and StateChanged may fire on non-UI threads.
  • Switch to the UI thread before updating controls.
  • Prefer Zeus presentation adapters instead of writing Invoke or Dispatcher.Invoke in every window.
  • Avoid long blocking work inside event callbacks.
AssemblyThread handoffCommon APIs
Zeus.Presentation.WinFormsControl.BeginInvokeAttachZeus, BindText, BindEnabled
Zeus.Presentation.WpfDispatcher.BeginInvokeAttachZeus, WpfUiDispatcher, MVVM binding sources
Zeus.Presentation.AbstractionsIUiDispatcherImmediateUiDispatcher 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.