예제 #1
0
 void Notify(HaXeCompletionResultHandler callback)
 {
     if (Sci.InvokeRequired)
     {
         Sci.BeginInvoke((MethodInvoker) delegate {
             Notify(callback);
         });
         return;
     }
     callback(this, Status);
 }
예제 #2
0
 void Notify <T>(HaxeCompleteResultHandler <T> callback, T result)
 {
     if (Sci.InvokeRequired)
     {
         Sci.BeginInvoke((MethodInvoker) delegate {
             Notify(callback, result);
         });
         return;
     }
     callback(this, result, Status);
 }
예제 #3
0
 private void notify(HaXeCompletionResultHandler callback, ArrayList lines)
 {
     if (sci.InvokeRequired)
     {
         sci.BeginInvoke((MethodInvoker) delegate {
             notify(callback, lines);
         });
         return;
     }
     callback(this, lines);
 }
예제 #4
0
        private void UpdateTheme(bool applyingTheme)
        {
            if (applyingTheme)
            {
                sci.BeginInvoke((MethodInvoker) delegate { UpdateTheme(false); });
                return;
            }
            var random = new Random();
            int fore   = sci.StyleGetFore(0);
            int back   = sci.StyleGetBack(0);
            int r      = back >> 16 & 0xFF;
            int g      = back >> 8 & 0xFF;
            int b      = back & 0xFF;

            foreach (var annotation in commits.Values)
            {
                int newR = r + random.Next(0xFF) >> 1;
                int newG = g + random.Next(0xFF) >> 1;
                int newB = b + random.Next(0xFF) >> 1;
                sci.StyleSetFore(annotation.MarginStyle, fore);
                sci.StyleSetBack(annotation.MarginStyle, newR << 16 | newG << 8 | newB);
            }
        }