private void includeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node.Text == "Add to code (double click)") { lexer.functionData foundFunction = includeFunctionList.Find(item => e.Node.Parent.Text == item.fullIdentiferDataTypes); if (foundFunction != null) { codeEditor.InsertText(foundFunction.identifer + "("); statusLabel.Text = foundFunction.fullIdentiferDataTypes; } } }
private void codeEditor_AutoCompleteAccepted(object sender, ScintillaNET.AutoCompleteAcceptedEventArgs e) { //Find and display the parameters in the status bar: //If the word is not part of the native function list, search the user function list:+ if (includeFunctionList.Exists(item => item.identifer.Equals(e.Text))) { lexer.functionData foundFunction = includeFunctionList.Find(item => item.identifer.Equals(e.Text)); statusLabel.Text = foundFunction.fullIdentifer; } else if (userFunctionList.Exists(item => item.Equals(e.Text))) { lexer.functionData foundFunction = userFunctionList.Find(item => item.identifer.Equals(e.Text)); statusLabel.Text = foundFunction.fullIdentifer; } }
private void stockView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Left) { //Update the status label: statusLabel.Text = e.Node.Text; } else { //On right click, select the appropriate line in the script: if (userFunctionList.Exists(item => item.fullIdentifer.Equals(e.Node.Text))) { lexer.functionData foundFunction = userFunctionList.Find(item => item.fullIdentifer.Equals(e.Node.Text)); codeEditor.Lines[foundFunction.implementation].Select(); stockView.SelectedNode = e.Node; } } }
private void stockView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Left) { int lineNumber = 0; if (int.TryParse(e.Node.Text, out lineNumber)) { codeEditor.Lines[lineNumber - 1].Select(); } else if (e.Node.Text == "Add to code (double click)") { lexer.functionData foundFunction = userFunctionList.Find(item => e.Node.Parent.Text == item.fullIdentiferDataTypes); if (foundFunction != null) { codeEditor.InsertText(userFunctionList.Find(item => e.Node.Parent.Text == item.fullIdentiferDataTypes).identifer + "("); statusLabel.Text = foundFunction.fullIdentiferDataTypes; } } } }