Class LogDialog
- Namespace
- VisioForge.Core.UI.WPF
- Assembly
- VisioForge.Core.dll
A WPF dialog window that displays log messages and error information. This dialog provides a simple text-based view for capturing and displaying runtime errors, debug messages, and other logging information from the VisioForge media processing components.
public class LogDialog : Window, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, IComponentConnectorInheritance
Implements
Inherited Members
Remarks
The LogDialog is thread-safe and uses Dispatcher.Invoke to ensure UI updates are performed on the UI thread. This is essential when log messages are generated from background threads during media processing operations.
Constructors
LogDialog()
Initializes a new instance of the VisioForge.Core.UI.WPF.LogDialog class.
public LogDialog()Methods
AddToLog(ErrorsEventArgs)
Adds an error event message to the log display.
public void AddToLog(ErrorsEventArgs args)Parameters
argsErrorsEventArgs-
The VisioForge.Core.Types.Events.ErrorsEventArgs instance containing the error details, including the error message, severity, and any additional context information.
Remarks
This method is thread-safe and uses Dispatcher.Invoke to marshal the UI update to the UI thread. Each message is appended to the existing log text with a newline separator.
AddToLog(string)
Adds a custom text message to the log display.
public void AddToLog(string message)Parameters
messagestring-
The text message to add to the log. Can be any string value including debug information, status updates, or custom error messages.
Remarks
This method is thread-safe and uses Dispatcher.Invoke to marshal the UI update to the UI thread. Each message is appended to the existing log text with a newline separator. This overload is useful for adding custom messages that don't originate from error events.
ClearLog()
Clears all text from the log display, resetting it to an empty state.
public void ClearLog()Remarks
This method is thread-safe and uses Dispatcher.Invoke to marshal the UI update to the UI thread. After calling this method, the log text box will be empty and ready to receive new log entries.
InitializeComponent()
InitializeComponent
public void InitializeComponent()