コード例 #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();
     }
 }