Class PeakMeterCtrl
Peakmeter control.
Inherited Members
Namespace: VisioForge.Core.UI.WinForms
Assembly: VisioForge.Core.dll
Syntax
[ToolboxBitmap(typeof(MyResourceNamespace), "PeakMeterCtrl.pmicon.bmp")]
public class PeakMeterCtrl : Control, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable
Constructors
PeakMeterCtrl()
Initializes a new instance of the PeakMeterCtrl class.
Declaration
public PeakMeterCtrl()
Properties
BandsCount
Gets or sets bands count.
Declaration
public int BandsCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ColorHigh
Gets or sets high color.
Declaration
public Color ColorHigh { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColorHighBack
Gets or sets high back color.
Declaration
public Color ColorHighBack { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColorMedium
Gets or sets medium color.
Declaration
public Color ColorMedium { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColorMediumBack
Gets or sets medium back color.
Declaration
public Color ColorMediumBack { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColorNormal
Gets or sets normal color.
Declaration
public Color ColorNormal { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColorNormalBack
Gets or sets normal back color.
Declaration
public Color ColorNormalBack { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
ColoredGrid
Gets or sets a value indicating whether grid is colored.
Declaration
public bool ColoredGrid { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FalloffColor
Gets or sets falloff color.
Declaration
public Color FalloffColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
FalloffEffect
Gets or sets a value indicating whether falloff effect is enabled.
Declaration
public bool FalloffEffect { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FalloffSpeed
Gets or sets falloff speed.
Declaration
public int FalloffSpeed { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
GridColor
Gets or sets grid color.
Declaration
public Color GridColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
IsActive
Gets a value indicating whether peakmeter is active.
Declaration
[Browsable(false)]
public bool IsActive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
LEDCount
Gets or sets LED count.
Declaration
public int LEDCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MeterStyle
Gets or sets meter style.
Declaration
public PeakMeterStyle MeterStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| PeakMeterStyle |
ShowGrid
Gets or sets a value indicating whether grid is enabled.
Declaration
public bool ShowGrid { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Clear()
Clears values.
Declaration
public void Clear()
DarkenColor(Color, byte)
Make a color darker.
Declaration
protected virtual Color DarkenColor(Color color, byte darkenBy)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color to darken. |
| byte | darkenBy | Value to decrease by. |
Returns
| Type | Description |
|---|---|
| Color | Returns Color. |
Dispose(bool)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true if managed resources should be disposed; otherwise, false. |
Overrides
DrawHorzBand(Graphics, Rectangle)
Draws horizon bands.
Declaration
protected void DrawHorzBand(Graphics g, Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Graphics | g | Graphics. |
| Rectangle | rect | Rectangle. |
DrawVertBand(Graphics, Rectangle)
Draws vertical band.
Declaration
protected void DrawVertBand(Graphics g, Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Graphics | g | Graphics. |
| Rectangle | rect | Rectangle. |
InRange(int, int, int)
Checks is in range.
Declaration
protected static bool InRange(int value, int rangeMin, int rangeMax)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | Value. |
| int | rangeMin | Min range. |
| int | rangeMax | Max range. |
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
LightenColor(Color, byte)
Make a color lighter.
Declaration
protected virtual Color LightenColor(Color color, byte lightenBy)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Color. |
| byte | lightenBy | Lighten by. |
Returns
| Type | Description |
|---|---|
| Color | Returns Color. |
OnBackColorChanged(EventArgs)
On backcolor changed event.
Declaration
protected override void OnBackColorChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| EventArgs | e | Event args. |
Overrides
OnHandleDestroyed(EventArgs)
On handle destroyed event.
Declaration
protected override void OnHandleDestroyed(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| EventArgs | e | Event args. |
Overrides
OnPaint(PaintEventArgs)
On paint event.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| PaintEventArgs | e | Event args. |
Overrides
ResetControl()
Resets control.
Declaration
protected void ResetControl()
SetData(int[], int, int)
Set meter band value.
Declaration
public bool SetData(int[] arrayValue, int offset, int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | arrayValue | Array value for the bands. |
| int | offset | Starting offset position. |
| int | size | Number of values to set. |
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
SetMeterBands(int, int)
Set number of LED bands.
Declaration
public void SetMeterBands(int bandsCount, int ledCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | bandsCount | Number of bands. |
| int | ledCount | Number of LED per bands. |
SetRange(int, int, int)
Set range info.
Declaration
public void SetRange(int minRangeVal, int medRangeVal, int maxRangeVal)
Parameters
| Type | Name | Description |
|---|---|---|
| int | minRangeVal | Min Range. |
| int | medRangeVal | Medium Range. |
| int | maxRangeVal | High Range. |
Start(int)
Start animation.
Declaration
public bool Start(int delay)
Parameters
| Type | Name | Description |
|---|---|---|
| int | delay | Delay. |
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
StartAnimation(int)
Starts animation.
Declaration
protected bool StartAnimation(int period)
Parameters
| Type | Name | Description |
|---|---|---|
| int | period | Period. |
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
Stop()
Stop animation.
Declaration
public bool Stop()
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
StopAnimation()
Stops animation.
Declaration
protected bool StopAnimation()
Returns
| Type | Description |
|---|---|
| bool | Returns bool. |
TimerCallback(object)
Timer callback.
Declaration
protected void TimerCallback(object thisObject)
Parameters
| Type | Name | Description |
|---|---|---|
| object | thisObject | Self. |