⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interpreterwrapper.boo

📁 SharpDevelop2.0.0 c#开发免费工具
💻 BOO
字号:
// <file>
//     <copyright see="prj:///doc/copyright.txt">2005 AlphaSierraPapa</copyright>
//     <license see="prj:///doc/license.txt">GNU General Public License</license>
//     <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
//     <version>$Revision$</version>
// </file>

namespace Boo.InterpreterAddIn

import System
import System.Windows.Forms

class InterpreterWrapper:
	_interpreter as Boo.Lang.Interpreter.InteractiveInterpreter
	
	def constructor():
		_interpreter = Boo.Lang.Interpreter.InteractiveInterpreter(
								RememberLastValue: true,
								Print: self.OnPrintLine)
		_interpreter.SetValue("cls", RaiseClear)
	
	event LinePrinted as callable(string)
	event Cleared as MethodInvoker
	
	private def RaiseClear():
		Cleared()
	
	private def OnPrintLine(text as string):
		LinePrinted(text)
	
	def RunCommand(code as string):
		_interpreter.LoopEval(code)
	
	def SuggestCodeCompletion(code as string):
		// David: the code completion items have to be passed as strings;
		// but it's not important, you can return null if you want.
		return _interpreter.SuggestCodeCompletion(code)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -