Property CommandsListener
CommandsListener
Gets or sets a list of the Debugger commands for the Debugger UI.
[Browsable(false)]
public IDebuggerUICommands CommandsListener { get; set; }
Property Value
Examples
Here is how to use a CommandsListener in the C# code:
using System;
using System.Diagnostics;
using System.Windows;
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI.Wpf;
public partial class MainWindow : Window, IDebuggerUICommands
{
private DebugMenu debugMenu;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var debugger = new ScriptDebugger();
debugMenu = new DebugMenu();
debugMenu.Debugger = debugger;
debugMenu.CommandsListener = this;
}
}
Here is how to use a CommandsListener in the Visual Basic code:
Imports System
Imports System.Diagnostics
Imports System.Windows
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI.Wpf
Partial Public Class MainWindow
Inherits Window
Implements IDebuggerUICommands
Private debugMenu As DebugMenu
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim debugger = New ScriptDebugger()
debugMenu = New DebugMenu()
debugMenu.Debugger = debugger
debugMenu.CommandsListener = Me
End Sub
End Class
Remarks
CommandsListener contains a custom implementation of the IDebuggerUICommands list. It can be used in addition to DefaultCommands, its default analog.