/// <summary> /// Starts the Repl: creates HTML elements, input/output buffer, make /// sure the prompt is cleared and focused, show the prompt, and attach /// the keypress event. /// </summary> public void Start() { _silverlightDlrReplCode = HtmlPage.Document.GetElementById(GetId(_sdlrCode)); _silverlightDlrReplResult = HtmlPage.Document.GetElementById(GetId(_sdlrResult)); _silverlightDlrReplPrompt = HtmlPage.Document.GetElementById(GetId(_sdlrPrompt)); _inputBuffer = new ReplInputBuffer(this); _outputBuffer = new ReplOutputBuffer(_silverlightDlrReplResult, _sdlrOutput); ShowDefaults(); ShowPrompt(); _silverlightDlrReplCode.AttachEvent("onkeydown", new EventHandler <HtmlEventArgs>(OnKeyDown)); }
public void Start() { _silverlightDlrReplCode = HtmlPage.Document.GetElementById(_sdlrCode); _silverlightDlrReplResult = HtmlPage.Document.GetElementById(_sdlrResult); _silverlightDlrReplPrompt = HtmlPage.Document.GetElementById(_sdlrPrompt); _inputBuffer = new ReplInputBuffer(_current); _outputBuffer = new ReplOutputBuffer(_silverlightDlrReplResult, _sdlrOutput); ShowDefaults(); ShowPrompt(); _silverlightDlrReplCode.AttachEvent("onkeypress", new EventHandler<HtmlEventArgs>(OnKeyPress)); }
/// <summary> /// Starts the Repl: creates HTML elements, input/output buffer, make /// sure the prompt is cleared and focused, show the prompt, and attach /// the keypress event. /// </summary> public void Start() { _silverlightDlrReplCode = HtmlPage.Document.GetElementById(GetId(_sdlrCode)); _silverlightDlrReplResult = HtmlPage.Document.GetElementById(GetId(_sdlrResult)); _silverlightDlrReplPrompt = HtmlPage.Document.GetElementById(GetId(_sdlrPrompt)); ProcessPromptElement(_silverlightDlrReplPrompt); _inputBuffer = new ReplInputBuffer(this); _outputBuffer = new ReplOutputBuffer(_silverlightDlrReplResult, _sdlrOutput); ShowDefaults(); ShowPrompt(); _silverlightDlrReplCode.AttachEvent("onkeydown", new EventHandler<HtmlEventArgs>(OnKeyDown)); }