예제 #1
0
 public bool InsertAction(EditViewControl textArea, char ch)
 {
     if (dotnetName != null)
     {
         CodeCompletionDataUsageCache.IncrementUsage(dotnetName);
     }
     if (c != null && text.Length > c.Name.Length)
     {
         textArea.InsertText(text.Substring(0, c.Name.Length + 1));
         TextPoint start = textArea.Caret.Position;
         TextPoint end;
         int       pos = text.IndexOf(',');
         if (pos < 0)
         {
             textArea.InsertText(text.Substring(c.Name.Length + 1));
             end    = textArea.Caret.Position;
             end.X -= 1;
         }
         else
         {
             textArea.InsertText(text.Substring(c.Name.Length + 1, pos - c.Name.Length - 1));
             end = textArea.Caret.Position;
             textArea.InsertText(text.Substring(pos));
         }
         textArea.Caret.Position     = start;
         textArea.Selection.SelStart = start.X;
         textArea.Selection.SelEnd   = end.X;
         //textArea.Selection.se.SelectionManager.SetSelection(start, end);
         if (!char.IsLetterOrDigit(ch))
         {
             return(true);
         }
     }
     else
     {
         textArea.InsertText(text);
     }
     return(false);
 }
예제 #2
0
 void GetPriority(string dotnetName)
 {
     this.dotnetName = dotnetName;
     priority        = CodeCompletionDataUsageCache.GetPriority(dotnetName, true);
 }
예제 #3
0
 private void GetPriority(string dotnetName)
 {
     _dotnetName = dotnetName;
     _priority   = CodeCompletionDataUsageCache.GetPriority(dotnetName, true);
 }