本文整理汇总了C#中Genetibase.Shared.Controls.NuGenPaintParams类的典型用法代码示例。如果您正苦于以下问题:C# NuGenPaintParams类的具体用法?C# NuGenPaintParams怎么用?C# NuGenPaintParams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NuGenPaintParams类属于Genetibase.Shared.Controls命名空间,在下文中一共展示了NuGenPaintParams类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnPaint
/// <summary>
/// Add custom logic before the <see cref="E:Genetibase.Shared.Windows.NuGenWndLessControl.Paint"/> event will be raised.
/// </summary>
/// <param name="e"></param>
protected override void OnPaint(PaintEventArgs e)
{
NuGenPaintParams paintParams = new NuGenPaintParams(e.Graphics);
paintParams.Bounds = this.Bounds;
paintParams.State = this.ButtonStateTracker.GetControlState();
this.Renderer.DrawDropDownButton(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:11,代码来源:NuGenDirectorySelector.DropDownButton.cs
示例2: DrawCCWRotateButton
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawCCWRotateButton(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
NuGenImagePaintParams imagePaintParams = new NuGenImagePaintParams(paintParams);
switch (imagePaintParams.State)
{
case NuGenControlState.Hot:
case NuGenControlState.Pressed:
{
imagePaintParams.Image = res.RotateCCW_Hot;
break;
}
default:
{
imagePaintParams.Image = res.RotateCCW_Normal;
break;
}
}
this.DrawImage(imagePaintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:32,代码来源:NuGenSmoothThumbnailRenderer.cs
示例3: DrawDropDownArrow
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawDropDownArrow(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
NuGenControlState state = paintParams.State;
int x = bounds.Left + bounds.Width / 2;
int y = bounds.Top + bounds.Height / 2 - 3;
Point[] arrowPoints = new Point[] {
new Point(x - 3, y),
new Point(x + 2, y),
new Point(x, y + 3)
};
using (SolidBrush sb = new SolidBrush(this.ColorManager.GetBorderColor(state)))
{
PixelOffsetMode oldPixelOffsetMode = g.PixelOffsetMode;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.FillPolygon(sb, arrowPoints);
g.PixelOffsetMode = oldPixelOffsetMode;
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:34,代码来源:NuGenSmoothNavigationBarRenderer.cs
示例4: DrawDoubleScrollButton
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawDoubleScrollButton(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawBackground(paintParams);
this.DrawBorder(paintParams);
Rectangle bounds = paintParams.Bounds;
paintParams.Bounds = new Rectangle(
bounds.Left
, bounds.Top - 3
, bounds.Width
, bounds.Height
);
this.DrawScrollButtonBody(paintParams);
paintParams.Bounds = new Rectangle(
bounds.Left
, bounds.Top + 3
, bounds.Width
, bounds.Height
);
this.DrawScrollButtonBody(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:34,代码来源:NuGenSmoothScrollBarRenderer.cs
示例5: OnPaint
protected override void OnPaint(PaintEventArgs e)
{
NuGenPaintParams paintParams = new NuGenPaintParams(e.Graphics);
paintParams.Bounds = this.ClientRectangle;
paintParams.State = this.StateTracker.GetControlState();
this.Renderer.DrawToolBarSeparator(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:NuGenThumbnailContainer.ToolBarSeparatorButton.cs
示例6: DrawExtendedBackground
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawExtendedBackground(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawBackground(paintParams);
Color borderColor = this.ColorManager.GetBorderColor(paintParams.State);
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
int ellipseWidth = 2 * bounds.Width;
int ellipseHeight = 2 * bounds.Height;
int ellipseStart = 0;
int ellipseStep = 50;
using (SolidBrush sb = new SolidBrush(Color.FromArgb(20, borderColor)))
{
g.FillEllipse(sb, ellipseStart, ellipseStart, ellipseWidth, ellipseHeight);
g.FillEllipse(sb, ellipseStart + ellipseStep, ellipseStart + ellipseStep, ellipseWidth, ellipseHeight);
g.FillEllipse(sb, ellipseStart + ellipseStep * 2, ellipseStart + ellipseStep * 2, ellipseWidth, ellipseHeight);
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:31,代码来源:NuGenSmoothPanelRenderer.cs
示例7: ArgumentNullException
void INuGenRoundedPanelRenderer.DrawBackground(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
base.DrawRoundBackground(paintParams);
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
NuGenControlState state = paintParams.State;
RectangleF ellipseBounds = new RectangleF(
bounds.Left - bounds.Width * 0.2f
, bounds.Top + bounds.Height * 0.6f
, bounds.Width * 2
, bounds.Height
);
if (ellipseBounds.Width > 0 && ellipseBounds.Height > 0)
{
Color beginColor = Color.FromArgb(60, this.ColorManager.GetBorderColor(state));
Color endColor = Color.FromArgb(10, this.ColorManager.GetBackgroundGradientEnd(state));
using (Brush brush = new LinearGradientBrush(ellipseBounds, beginColor, endColor, 0.0f))
{
g.SetClip(bounds, CombineMode.Replace);
g.FillEllipse(brush, ellipseBounds);
}
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:32,代码来源:NuGenSmoothRoundedPanelRenderer.cs
示例8: DrawShadow
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
public void DrawShadow(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
int alpha = 0;
Color baseColor = Color.Black;
int alphaStep = 5;
Padding deflatePadding = new Padding(1);
using (NuGenGrfxMode mode = new NuGenGrfxMode(g))
{
NuGenControlPaint.SetGraphicsVeryHighQuality(g);
using (Pen pen = new Pen(Color.FromArgb(alpha, baseColor)))
{
for (int i = 0; i <= _shadowStepCount; i++)
{
g.DrawRectangle(pen, bounds);
pen.Color = Color.FromArgb(alpha += alphaStep, baseColor);
bounds = NuGenControlPaint.DeflateRectangle(bounds, deflatePadding);
if (i == 1)
{
alphaStep = 10;
}
}
}
}
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:38,代码来源:NuGenSmoothPanelExRenderer.cs
示例9: DrawBorder
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
public void DrawBorder(NuGenPaintParams paintParams)
{
base.DrawBorder(
paintParams.Graphics
, NuGenControlPaint.BorderRectangle(paintParams.Bounds)
, paintParams.State
);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:11,代码来源:NuGenSmoothScrollBarRenderer.cs
示例10: DrawBorder
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException"><paramref name="paintParams"/> is <see langword="null"/>.</exception>
public void DrawBorder(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
base.DrawBorder(paintParams.Graphics, paintParams.Bounds, paintParams.State);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:13,代码来源:NuGenSmoothCalendarRenderer.cs
示例11: DrawShadow
/*
* DrawShadow
*/
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
public void DrawShadow(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawShadow(paintParams.Graphics, NuGenSmoothButtonRenderer.GetBorderRectangle(paintParams.Bounds), paintParams.State);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:16,代码来源:NuGenSmoothButtonRenderer.cs
示例12: DrawBorder
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para>
/// <paramref name="paintParams"/> is <see langword="null"/>.
/// </para>
/// </exception>
public void DrawBorder(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawBorder(paintParams.Graphics, NuGenControlPaint.BorderRectangle(paintParams.Bounds), paintParams.State);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:17,代码来源:NuGenSmoothDropDownRenderer.cs
示例13: DrawComboBoxButton
/*
* DrawComboBoxButton
*/
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
/// <exception cref="InvalidOperationException">
/// <para>
/// Border should return an array containing at least 1 element.
/// </para>
/// </exception>
public void DrawComboBoxButton(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawScrollButton(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:24,代码来源:NuGenSmoothComboBoxRenderer.cs
示例14: DrawDropDownButton
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException"><para><paramref name="paintParams"/> is <see langword="null"/>.</para></exception>
public void DrawDropDownButton(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawScrollButtonBody(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:13,代码来源:NuGenSmoothDirectorySelectorRenderer.cs
示例15: DrawBackground
/*
* DrawBackground
*/
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException"><paramref name="paintParams"/> is <see langword="null"/>.</exception>
public new void DrawBackground(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
base.DrawRoundBackground(paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:17,代码来源:NuGenSmoothProgressBarRenderer.cs
示例16: ArgumentNullException
void INuGenPanelExRenderer.DrawBackground(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
base.DrawBackground(paintParams);
RendererUtils.DrawBackground(this.ServiceProvider, paintParams);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:NuGenSmoothPanelExRenderer.cs
示例17: DrawButtonBorder
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawButtonBorder(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
Rectangle borderRectangle = paintParams.Bounds;
borderRectangle.Width--;
this.DrawBorder(paintParams.Graphics, borderRectangle, paintParams.State);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:17,代码来源:NuGenSmoothNavigationBarRenderer.cs
示例18: DrawScrollTrack
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="paintParams"/> is <see langword="null"/>.</para>
/// </exception>
public void DrawScrollTrack(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
NuGenControlState state = paintParams.State;
Color borderColor = this.ColorManager.GetBorderColor(NuGenControlState.Normal);
Color bkgndColor;
switch (state)
{
case NuGenControlState.Pressed:
{
bkgndColor = Color.FromArgb(130, borderColor);
break;
}
case NuGenControlState.Hot:
{
bkgndColor = Color.FromArgb(90, borderColor);
break;
}
default:
{
bkgndColor = Color.FromArgb(50, borderColor);
break;
}
}
using (SolidBrush sb = new SolidBrush(bkgndColor))
{
g.FillRectangle(sb, bounds);
}
Rectangle borderRectangle = NuGenControlPaint.BorderRectangle(bounds);
this.DrawLine(
g,
NuGenControlPaint.RectTLCorner(borderRectangle),
NuGenControlPaint.RectTRCorner(borderRectangle),
NuGenControlState.Normal
);
this.DrawLine(
g,
NuGenControlPaint.RectBLCorner(borderRectangle),
NuGenControlPaint.RectBRCorner(borderRectangle),
NuGenControlState.Normal
);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:59,代码来源:NuGenSmoothScrollBarRenderer.cs
示例19: ArgumentNullException
void INuGenButtonRenderer.DrawBackground(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
this.DrawBackground(
paintParams.Graphics,
Rectangle.Inflate(paintParams.Bounds, -2, -2),
paintParams.State
);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:13,代码来源:NuGenSmoothButtonRenderer.cs
示例20: DrawDocComment
/// <summary>
/// </summary>
/// <param name="paintParams"></param>
/// <exception cref="ArgumentNullException">
/// <para>
/// <paramref name="paintParams"/> is <see langword="null"/>.
/// </para>
/// </exception>
public void DrawDocComment(NuGenPaintParams paintParams)
{
if (paintParams == null)
{
throw new ArgumentNullException("paintParams");
}
Graphics g = paintParams.Graphics;
Rectangle bounds = paintParams.Bounds;
NuGenControlState state = paintParams.State;
this.DrawBackground(paintParams);
this.DrawBorder(g, NuGenControlPaint.BorderRectangle(bounds), state);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:22,代码来源:NuGenSmoothPropertyGridRenderer.cs
注:本文中的Genetibase.Shared.Controls.NuGenPaintParams类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论