Table of Contents

Property SelectedThread

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

SelectedThread

Gets a currently selected thread.

public ThreadInfo SelectedThread { get; }

Property Value

ThreadInfo

Examples

Here is how to use a SelectedThread in the C# code:

using System;
using System.Windows;

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

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

        threadsControl = new Threads();
        threadsControl.Debugger = debugger;
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        var thread = threadsControl.SelectedThread;
        MessageBox.Show(string.Format("file: {0} id: {1}", thread.File, thread.ThreadId));
    }
}

Here is how to use a SelectedThread in the Visual Basic code:


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

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

        threadsControl = New Threads()
        threadsControl.Debugger = debugger
    End Sub

    Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim thread = threadsControl.SelectedThread
        MessageBox.Show(String.Format("file: {0} id: {1}", thread.File, thread.ThreadId))
    End Sub
End Class

Remarks

The SelectedThread property can be changed by clicking on the appropriate thread in the ThreadInfo list displayed by this control.