Table of Contents

Property Executed

Namespace
Alternet.Scripter.IronPython
Assembly
Alternet.Scripter.IronPython.v9.dll

Executed

Gets boolean value indicating that script has been compiled and ready to be executed.

[Browsable(false)]
public virtual bool Executed { get; }

Property Value

bool

Examples

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

using System.Linq;
using System.Windows.Forms;

using Alternet.Scripter.IronPython;

public partial class Form1 : Form
{
    private ScriptRun scriptRun;
    private void Form1_Load(object sender, EventArgs e)
    {
        scriptRun = new ScriptRun();
    }

    private void Button_Click(object sender, EventArgs e)
    {
        if (scriptRun.Executed)
        {
            MessageBox.Show("Script executed");
        }
    }
}

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

Imports System.Linq
Imports System.Windows.Forms
Imports Alternet.Scripter.IronPython

Partial Public Class Form1
    Inherits Form

    Private scriptRun As ScriptRun

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        scriptRun = New ScriptRun()
    End Sub

    Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
        If scriptRun.Executed Then
            MessageBox.Show("Script executed")
        End If
    End Sub
End Class

Remarks

You can check whether ScriptRun has been already executed after the last script compilation.