Property DefaultCommands
DefaultCommands
Gets IDebuggerUICommands
processed by this toolbar.
[Browsable(false)]
public IDebuggerUICommands DefaultCommands { get; }
Property Value
Examples
Here is how to use a DefaultCommands 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
{
private DebuggerControlToolbar debuggerControlToolbar;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var debugger = new ScriptDebugger();
debuggerControlToolbar = new DebuggerControlToolbar();
debuggerControlToolbar.Debugger = debugger;
}
private void StartButton_Click(object sender, RoutedEventArgs e)
{
debuggerControlToolbar.DefaultCommands.Start();
}
}
Here is how to use a DefaultCommands 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
Private debuggerControlToolbar As DebuggerControlToolbar
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim debugger = New ScriptDebugger()
debuggerControlToolbar = New DebuggerControlToolbar()
debuggerControlToolbar.Debugger = debugger
End Sub
Private Sub StartButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
debuggerControlToolbar.DefaultCommands.Start()
End Sub
End Class
Remarks
Usually any of the debugger commands, like StartDebugging, can be called by clicking on the appropriate button from the DebuggerControlToolbar control. You can also directly call them from the DefaultCommands list.