Class ScriptEditControl
Script Engine control. Support writing multi-language script.
Inheritance
System.Object
ScriptEditControl
Assembly: Syncfusion.Scripting.Windows.dll
Syntax
public class ScriptEditControl : UserControl
Constructors
ScriptEditControl()
Declaration
public ScriptEditControl()
Fields
assemblyDirectives
Declaration
protected string assemblyDirectives
Field Value
bExternalCompile
Declaration
protected bool bExternalCompile
Field Value
bExternalRun
Declaration
protected bool bExternalRun
Field Value
bPendingSave
Declaration
protected bool bPendingSave
Field Value
globalCode
Declaration
protected string globalCode
Field Value
nameSpaceDefine
Declaration
protected string nameSpaceDefine
Field Value
scriptManager
Declaration
protected ScriptingManager scriptManager
Field Value
strScriptStart
Declaration
protected string strScriptStart
Field Value
strScriptStop
Declaration
protected string strScriptStop
Field Value
Properties
AssemblyReferences
Declaration
public string[] AssemblyReferences { get; }
Property Value
BaseClass
Declaration
public Type BaseClass { get; }
Property Value
EnableExternalCompile
Indicates if the ScriptingManager is being used for external compilation of the script.
Declaration
public bool EnableExternalCompile { get; set; }
Property Value
EnableExternalRun
Declaration
public bool EnableExternalRun { get; set; }
Property Value
EntryPoint
Declaration
public string EntryPoint { get; set; }
Property Value
PendingSave
Declaration
public bool PendingSave { get; }
Property Value
RootMoniker
Declaration
public string RootMoniker { get; set; }
Property Value
RootNamespace
Declaration
public string RootNamespace { get; set; }
Property Value
Script
Declaration
public Script Script { get; set; }
Property Value
ScriptingManager
Declaration
public ScriptingManager ScriptingManager { get; set; }
Property Value
ScriptLanguage
Declaration
public ScriptLanguages ScriptLanguage { get; set; }
Property Value
ScriptName
Declaration
public string ScriptName { get; set; }
Property Value
ScriptText
Gets or sets script source code.
Declaration
public string ScriptText { get; set; }
Property Value
SelectedItem
Declaration
public ScriptObject SelectedItem { get; set; }
Property Value
Methods
AddAssemblyReference(String)
Adds the assembly to the list of referenced assemblies.
Declaration
public void AddAssemblyReference(string assembly)
Parameters
Type |
Name |
Description |
System.String |
assembly |
New assembly to reference.
|
Exceptions
Type |
Condition |
System.ArgumentException |
When assembly is null.
|
AddScriptableObject(ScriptObject)
Declaration
public void AddScriptableObject(ScriptObject scriptableitem)
Parameters
ClearAssemblyReferences()
Declaration
public void ClearAssemblyReferences()
CompileScript()
Declaration
public bool CompileScript()
Returns
Dispose(Boolean)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
GetFileDialogFilter(ScriptLanguages)
Declaration
protected virtual string GetFileDialogFilter(ScriptLanguages language)
Parameters
Returns
InitializeScriptEditor(Script)
Loads the data from the script into the editor.
Declaration
public virtual void InitializeScriptEditor(Script script)
Parameters
Type |
Name |
Description |
Script |
script |
Script to load into the editor
|
InitializeScriptEditor(ScriptingManager)
Declaration
public void InitializeScriptEditor(ScriptingManager scriptmanager)
Parameters
New()
Declaration
ObjectBrowser_NodeDoubleClick(Object, NodeDoubleClickEventArgs)
Declaration
public void ObjectBrowser_NodeDoubleClick(object sender, NodeDoubleClickEventArgs e)
Parameters
OnLanguageChange(ScriptLanguages)
Declaration
protected virtual void OnLanguageChange(ScriptLanguages language)
Parameters
OnScriptChange()
Declaration
protected virtual void OnScriptChange()
OpenFile()
Declaration
RemoveScriptableObject(ScriptObject)
Declaration
public void RemoveScriptableObject(ScriptObject scriptableitem)
Parameters
RunScript()
Declaration
SaveToFile()
Declaration
scriptingManager_CompileError(Object, VsaErrorEventArgs)
Declaration
protected void scriptingManager_CompileError(object sender, VsaErrorEventArgs eventargs)
Parameters
Declaration
protected void SetCompileButtonsState()
StopScript()
Declaration
UpdateScript(Script)
Updates the script object with the current values in the editor.
Declaration
public void UpdateScript(Script script)
Parameters
Type |
Name |
Description |
Script |
script |
Script to update
|
Events
ScriptChanged
Send when script is changed.
Declaration
public event EventHandler ScriptChanged
Event Type