Last change
on this file since 11733 was
11721,
checked in by jkarder, 10 years ago
|
#2262:
- fixed SetEnabledStateOfControls in VariableStoreView
- the code template for a CSharpScript is now read from an embedded resource
|
File size:
812 bytes
|
Rev | Line | |
---|
[11721] | 1 | // use 'vars' to access variables in the script's variable store (e.g. vars.x = 5)
|
---|
| 2 | // use 'vars[string]' to access variables via runtime strings (e.g. vars[""x""] = 5)
|
---|
| 3 | // use 'vars.Contains(string)' to check if a variable exists
|
---|
| 4 | // use 'vars.Clear()' to remove all variables
|
---|
| 5 | // use 'foreach (KeyValuePair<string, object> v in vars) { ... }' to iterate over all variables
|
---|
| 6 | // use 'variables' to work with IEnumerable<T> extension methods on the script's variable store
|
---|
| 7 |
|
---|
| 8 | using System;
|
---|
| 9 | using System.Linq;
|
---|
| 10 | using System.Collections.Generic;
|
---|
| 11 | using HeuristicLab.Common;
|
---|
| 12 | using HeuristicLab.Core;
|
---|
| 13 | using HeuristicLab.Data;
|
---|
| 14 |
|
---|
| 15 | public class MyScript : HeuristicLab.Scripting.CSharpScriptBase {
|
---|
| 16 | public override void Main() {
|
---|
| 17 | // type your code here
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | // implement further classes and methods
|
---|
| 21 |
|
---|
| 22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.