Table of Contents

Class Threads

Namespace
Alternet.Scripter.Debugger.UI.Wpf
Assembly
Alternet.Scripter.Debugger.UI.Wpf.v9.dll

Interaction logic for Threads.xaml

public class Threads : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, INotifyPropertyChanged
Inheritance
Threads
Implements
Extension Methods

Examples

Here is how to declare a Threads and handle its events from the C# code:

using System;
using System.Windows;

using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI.Wpf;

public partial class MainWindow : Window
{
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        var debugger = new ScriptDebugger();

        var threadsControl = new Threads();
        threadsControl.Debugger = debugger;
        threadsControl.ThreadClick += ThreadsControl_ThreadClick;
    }

    private void ThreadsControl_ThreadClick(object sender, ThreadClickEventArgs e)
    {
        if (e.Thread != null)
        {
            MessageBox.Show(e.Thread.Title);
        }
    }
}

Here is how to declare a Threads and handle its events from the Visual Basic code:

Imports System
Imports System.Windows

Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI.Wpf

Partial Public Class MainWindow
    Inherits Window
    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim debugger = New ScriptDebugger()

        Dim threadsControl = New Threads()
        threadsControl.Debugger = debugger
        AddHandler threadsControl.ThreadClick, AddressOf ThreadsControl_ThreadClick
    End Sub

    Private Sub ThreadsControl_ThreadClick(ByVal sender As Object, ByVal e As ThreadClickEventArgs)
        If e.Thread IsNot Nothing Then
            MessageBox.Show(e.Thread.Title)
        End If
    End Sub
End Class

Remarks

Threads is a visual control used to display active threads and switch script debugging between them.

The most important properties of the Threads are:

The Debugger property specifies a ScriptDebugger instance, which threads are displayed by this user under the Threads control.

The SelectedThread property represents the currently selected thread.

Constructors

Threads()

Initializes a new instance of the Threads class with default settings.

Properties

Debugger

Gets or sets IScriptDebugger which threads will be displayed by this user control.

SelectedThread

Gets a currently selected thread.

Methods

Localize()
RaisePropertyChanged(string)
SetThreads(ThreadInfo[])

Sets threads to be displayed.

Events

PropertyChanged

Occurs when a property value changes.

ThreadClick

Occurs when given process receives variables.