Ejemplo n.º 1
0
 /// <summary>
 /// DoubleClick handler
 /// </summary>
 public void SciControl_DoubleClick(ScintillaNet.ScintillaControl sender)
 {
     string color = getColorByString(sender.SelText.Trim());
     if (color != "")
     {
         startPosition = sender.SelectionEnd;
         cb.Visible = true;
         cb.ShowColor(color);
         isActive = true;
         Point coord = new Point(sender.PointXFromPosition(startPosition), sender.PointYFromPosition(startPosition));
         coord = sender.PointToScreen(coord);
         coord = ((Form)PluginBase.MainForm).PointToClient(coord);
         cb.Left = coord.X - 20 + sender.Left;
         cb.Top = coord.Y + cb.Height;
         cb.BringToFront();
     }
     else
     {
         cb.Visible = false;
         isActive = false;
     }
 }