protected void OnCompletionRequested(ILCompletionRequestEventArgs args) { if (CompletionRequested != null) { CompletionRequested(this, args); } }
protected void OnCompletionRequested(string expression, Point location) { if (CompletionRequested != null && !String.IsNullOrEmpty(expression)) { var args = new ILCompletionRequestEventArgs(expression, location); CompletionRequested(this, args); if (args.CompletionResult != null && args.CompletionResult.Count() > 0) { ShowCompletions(args); } else { HideCompletions(); } } }
private void Completion(ILCompletionRequestEventArgs arg) { string prefix; var completions = Evaluator.GetCompletions(arg.Expression, out prefix); arg.Success = completions != null && completions.Length > 0; if (arg.Success) { arg.Prefix = prefix; var result = new List <ILCompletionTextEntry>(); arg.CompletionResult = completions.Select(item => new ILCompletionTextEntry() { Text = item }); } }
public void ShowCompletions(ILCompletionRequestEventArgs args) { var box = CompletionBox; if (box != null) { IEnumerable <IILCompletionEntry> items = args.CompletionResult; Point location = args.Location; box.Items.Clear(); foreach (var item in items) { box.Items.Add(args.Prefix + item.ToString()); } box.Location = sizeAndPositionCompletionWindow(box, location); box.SelectedIndex = 0; box.MouseClick -= box_MouseClick; box.MouseClick += box_MouseClick; box.Show(); Focus(); } }
public void ShowCompletions(ILCompletionRequestEventArgs args) { var box = CompletionBox; if (box != null) { IEnumerable<IILCompletionEntry> items = args.CompletionResult; Point location = args.Location; box.Items.Clear(); foreach (var item in items) { box.Items.Add(args.Prefix + item.ToString()); } box.Location = sizeAndPositionCompletionWindow(box, location); box.SelectedIndex = 0; box.MouseClick -= box_MouseClick; box.MouseClick += box_MouseClick; box.Show(); Focus(); } }
private void Completion(ILCompletionRequestEventArgs arg) { string prefix; var completions = Evaluator.GetCompletions(arg.Expression, out prefix); arg.Success = completions != null && completions.Length > 0; if (arg.Success) { arg.Prefix = prefix; var result = new List<ILCompletionTextEntry>(); arg.CompletionResult = completions.Select(item => new ILCompletionTextEntry() { Text = item }); } }