Example #1
0
 protected void OnCompletionRequested(ILCompletionRequestEventArgs args)
 {
     if (CompletionRequested != null)
     {
         CompletionRequested(this, args);
     }
 }
Example #2
0
        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();
                }

            }
        }
Example #3
0
        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
                });
            }
        }
Example #4
0
 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();
         }
     }
 }
Example #5
0
        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();
            }
        }
Example #6
0
 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();
     }
 }
Example #7
0
 protected void OnCompletionRequested(ILCompletionRequestEventArgs args) {
     if (CompletionRequested != null) {
         CompletionRequested(this, args);
     }
 }
Example #8
0
 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 });
     }
 }