本文整理汇总了C#中kOS.ExecutionContext类的典型用法代码示例。如果您正苦于以下问题:C# ExecutionContext类的具体用法?C# ExecutionContext怎么用?C# ExecutionContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExecutionContext类属于kOS命名空间,在下文中一共展示了ExecutionContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ImmediateMode
public ImmediateMode(ExecutionContext parent)
: base(parent)
{
StdOut("kOS Operating System");
StdOut("KerboScript v" + Core.VersionInfo.ToString());
StdOut("");
bool autoexecExists = false;
if (SelectedVolume.GetByName("autoexec") != null) {
autoexecExists = true;
} else {
Volume ArchiveVolume = GetVolume("Archive");
if (ArchiveVolume.GetByName("autoexec") != null) {
Add("copy autoexec from archive.");
autoexecExists = true;
}
}
if (autoexecExists) {
StdOut("Executing autoexec...");
Add("run autoexec.");
} else {
StdOut("Autoexec was not found.");
}
StdOut("Proceed.");
}
开发者ID:JackDTaylor,项目名称:KOS,代码行数:28,代码来源:InterpreterImmediate.cs
示例2: kOSException
public kOSException(String message, ExecutionContext context)
: this(message)
{
this.LineNumber = context.Line;
this.Context = context;
this.Program = context.FindClosestParentOfType<ContextRunProgram>();
}
开发者ID:Nivekk,项目名称:KOS,代码行数:7,代码来源:kOSException.cs
示例3: ImmediateMode
public ImmediateMode(ExecutionContext parent)
: base(parent)
{
StdOut("kOS Operating System");
StdOut("KerboScript v" + Core.VersionInfo.ToString());
StdOut("");
StdOut("Proceed.");
}
开发者ID:Jabe,项目名称:KOS,代码行数:8,代码来源:InterpreterImmediate.cs
示例4: ImmediateMode
public ImmediateMode(ExecutionContext parent)
: base(parent)
{
StdOut("kOS Operating System Build " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision);
StdOut("KerboScript v0.8");
StdOut("");
StdOut("Proceed.");
}
开发者ID:raad287,项目名称:KOS,代码行数:8,代码来源:InterpreterImmediate.cs
示例5: Atmosphere
public Atmosphere(CelestialBody body, ExecutionContext context)
{
BodyRef = body;
AddSuffix("HEIGHT", null, ()=>{ return BodyRef.atmosphereDepth; });
AddSuffix("OXYGEN", null, () => { return BodyRef.atmosphere && BodyRef.atmosphereContainsOxygen; });
AddSuffix("SEALEVELPRESSURE", null, () => { return BodyRef.atmospherePressureSeaLevel; });
}
开发者ID:Nivekk,项目名称:KOS,代码行数:8,代码来源:Atmosphere.cs
示例6: InterpreterBootup
public InterpreterBootup(ExecutionContext parent)
: base(parent)
{
//ShowAnimationFrame(0);
PrintAt("BOOTING UP...", 22, 20);
State = ExecutionState.WAIT;
}
开发者ID:Nivekk,项目名称:KOS,代码行数:8,代码来源:InterpreterBootup.cs
示例7: Expression
public Expression(String text, ExecutionContext context)
{
this.executionContext = context;
text = text.Trim();
Text = text;
UnwrapFullBrackets(ref text);
Process(text);
}
开发者ID:BGog,项目名称:KOS,代码行数:11,代码来源:Expression.cs
示例8: InterpreterEdit
public InterpreterEdit(String fileName, ExecutionContext parent)
: base(parent)
{
File = SelectedVolume.GetByName(fileName);
if (File == null)
{
File = new File(fileName);
File.Add("");
}
CursorX = 0;
CursorY = 2;
}
开发者ID:BGog,项目名称:KOS,代码行数:14,代码来源:InterpreterEdit.cs
示例9: Get
public static Command Get(String input, ExecutionContext context, int line)
{
try
{
Command retCommand = Get(input, context);
retCommand.Line = line;
return retCommand;
}
catch (kOSException e)
{
e.LineNumber = line;
throw e;
}
}
开发者ID:Nivekk,项目名称:KOS,代码行数:15,代码来源:Command.cs
示例10: Expression
public Expression(String text, ExecutionContext context)
{
this.executionContext = context;
text = text.Trim();
Text = text;
if (!CheckForBrackets(text))
{
throw new kOSException("Bracket matching error.");
}
UnwrapFullBrackets(ref text);
Process(text);
}
开发者ID:kerbalspaceprogram-fr,项目名称:KOS,代码行数:16,代码来源:Expression.cs
示例11: Expression
public Expression(String text, ExecutionContext context)
{
this.executionContext = context;
text = text.Trim();
Text = text;
if (!Utils.DelimterMatch (text))
{
throw new kOSException ("Error: mismatching delimiter.");
}
UnwrapFullBrackets(ref text);
Process(text);
}
开发者ID:raad287,项目名称:KOS,代码行数:16,代码来源:Expression.cs
示例12: Body
public Body(CelestialBody target, ExecutionContext context)
{
this.Context = context;
this.BodyRef = target;
AddSuffix("NAME", null, () => { return BodyRef.name; });
AddSuffix("DESCRIPTION", null, () => { return BodyRef.bodyDescription; });
AddSuffix("MASS", null, () => { return BodyRef.Mass; });
AddSuffix("POSITION", null, () => { return new Vector(BodyRef.position); });
AddSuffix("ALTITUDE", null, () => { return BodyRef.orbit.altitude; });
AddSuffix("APOAPSIS", null, () => { return BodyRef.orbit.ApA; });
AddSuffix("PERIAPSIS", null, () => { return BodyRef.orbit.PeA; });
AddSuffix("VELOCITY", null, () => { return new Vector(BodyRef.orbit.GetVel()); });
AddSuffix("DISTANCE", null, () => { return (float)GetDistance(); });
AddSuffix("BODY", null, () => { return new Body(BodyRef.orbit.referenceBody, Context); });
AddSuffix("MU", null, () => { return BodyRef.gravParameter; });
AddSuffix("ROTATIONPERIOD", null, () => { return BodyRef.rotationPeriod; });
AddSuffix("RADIUS", null, () => { return BodyRef.Radius; });
AddSuffix("GRAVITY", null, () => { return BodyRef.gravParameter; });
AddSuffix("OCEANIC", null, () => { return BodyRef.ocean; });
AddSuffix("ATMOSPHERE", null, () => { return new Atmosphere(BodyRef, Context); });
AddSuffix("ATM", null, () => { return new Atmosphere(BodyRef, Context); });
}
开发者ID:Nivekk,项目名称:KOS,代码行数:23,代码来源:BodyTarget.cs
示例13: ImmediateMode
public ImmediateMode(ExecutionContext parent)
: base(parent)
{
//StdOut("kOS Operating System");
//StdOut("KerboScript v" + Core.VersionInfo.ToString());
for (var y = 13; y < 16; y++)
{
string output = "";
for (var x = 11; x < 16; x++)
{
output += ((char)((y*16) + x)).ToString();
}
if (y == 15) output += " v" + Core.VersionInfo.ToString();
StdOut(output);
}
StdOut("");
StdOut("");
StdOut("Proceed.");
}
开发者ID:Nivekk,项目名称:KOS,代码行数:23,代码来源:InterpreterImmediate.cs
示例14: BodyTarget
public BodyTarget(CelestialBody target, ExecutionContext context)
{
this.context = context;
Target = target;
}
开发者ID:niomaster,项目名称:KOS,代码行数:5,代码来源:BodyTarget.cs
示例15: CommandDelete
public CommandDelete(Match regexMatch, ExecutionContext context)
: base(regexMatch, context)
{
}
开发者ID:BGog,项目名称:KOS,代码行数:4,代码来源:CommandFileIO.cs
示例16: ExecutionContext
public ExecutionContext(ExecutionContext parent)
{
this.ParentContext = parent;
}
开发者ID:phcorcoran,项目名称:KOS,代码行数:4,代码来源:ExecutionContext.cs
示例17: VesselTarget
public VesselTarget(Vessel target, ExecutionContext context)
{
this.context = context;
this.target = target;
}
开发者ID:palaslet,项目名称:KOS,代码行数:5,代码来源:VesselTarget.cs
示例18: Push
public virtual void Push(ExecutionContext newChild)
{
ChildContext = newChild;
}
开发者ID:phcorcoran,项目名称:KOS,代码行数:4,代码来源:ExecutionContext.cs
示例19: Command
public Command(Match regexMatch, ExecutionContext context)
: base(context)
{
Input = regexMatch.ToString();
this.RegexMatch = regexMatch;
}
开发者ID:Nivekk,项目名称:KOS,代码行数:6,代码来源:Command.cs
示例20: Evaluate
public static String Evaluate(String text, ExecutionContext context)
{
Expression e = new Expression(text, context);
return e.GetValue().ToString();
}
开发者ID:kerbalspaceprogram-fr,项目名称:KOS,代码行数:5,代码来源:Expression.cs
注:本文中的kOS.ExecutionContext类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论