Пример #1
0
 /// <summary>
 /// Force a redraw when the cursor leaves. Also clean up anythine we were doing with the tile
 /// </summary>
 private void PlugIn1_TileMouseLeave(object sender, TileEventArgs ea)
 {
     ea.Tile.Invalidate();
     _hoveredTest = null;
     if (CodeRush.SmartTags.IsSmartTagVisible)
     {
         CodeRush.SmartTags.HidePopupMenu();
     }
 }
Пример #2
0
 private void ShowTestPopupMenu(TextView textView, Tile tile)
 {
     if (TileIsOurs(tile) && _hoveredTest == null)
     {
         _hoveredTest = tile.Object as ITestDetail;
         Point tilePoint = new Point(tile.Bounds.Left, tile.Bounds.Bottom);
         Point menuPoint = textView.ToScreenPoint(tilePoint);
         CodeRush.SmartTags.ShowPopupMenu(menuPoint, _hoveredTest.SmartTagProvider);
     }
 }
Пример #3
0
        /// <summary>
        /// Draw the icon for the tile
        /// </summary>
        /// <param name="attributes"></param>
        private void DrawTestRunnerIcon(EditorPaintEventArgs paintArgs, ITestDetail attributes)
        {
            Rectangle indicator = CreateIndicator(paintArgs, attributes.IconCoordinates);

            paintArgs.TextView.AddTile(NewTile(indicator, attributes));
            try
            {
                paintArgs.TextView.Graphics.DrawIcon(new Icon(GetType(), "TestIndicator.ico"), indicator);
            }
            catch
            {// fail silently if icon is missing from the project.
            }
        }
Пример #4
0
 /// <summary>
 /// Draw the icon for the tile
 /// </summary>
 /// <param name="attributes"></param>
 private void DrawTestRunnerIcon(EditorPaintEventArgs paintArgs, ITestDetail attributes)
 {
     Rectangle indicator = CreateIndicator(paintArgs, attributes.IconCoordinates);
     paintArgs.TextView.AddTile(NewTile(indicator, attributes));
     try
     {
         paintArgs.TextView.Graphics.DrawIcon(new Icon(GetType(), "TestIndicator.ico"), indicator);
     }
     catch
     {// fail silently if icon is missing from the project.
     }
 }
Пример #5
0
 private void ShowTestPopupMenu(TextView textView, Tile tile)
 {
     if (TileIsOurs(tile) && _hoveredTest == null)
     {
         _hoveredTest = tile.Object as ITestDetail;
         Point tilePoint = new Point(tile.Bounds.Left, tile.Bounds.Bottom);
         Point menuPoint = textView.ToScreenPoint(tilePoint);
         CodeRush.SmartTags.ShowPopupMenu(menuPoint, _hoveredTest.SmartTagProvider);
     }
 }
Пример #6
0
 /// <summary>
 /// Force a redraw when the cursor leaves. Also clean up anythine we were doing with the tile
 /// </summary>
 private void PlugIn1_TileMouseLeave(object sender, TileEventArgs ea)
 {
     ea.Tile.Invalidate();
     _hoveredTest = null;
     if(CodeRush.SmartTags.IsSmartTagVisible)
     {
         CodeRush.SmartTags.HidePopupMenu();
     }
 }