CesGauge - CesSolutions/Ces.WinForm.UI GitHub Wiki
This control shows value in percentage or a number in range. It is possible to keep record of changes and define different color for various range of number.
گیج جهت نمایش یک مقدار برحسب درصد و یا مقداری از یک بازه عددی. امکان ثبت تغییرات مقدار و همچنین تعیین رنگ برای دامنه مختلف اعداد.
Gauge With Icon

Indicator Types

- CesGaugeRecord : If set value to true, when gauge value changes, control keep record of changes.
- CesGaugeSegments : This property get list of "CesGaugeOption" to configure segments.
- CesBackgroundColor : Set background color.
- CesIndicatorType : Value must be selected from "CesGaugeIndicatorTypeEnum".
- CesIndicatorColor : Set indicator color.
- CesIndicatorOffset : Set indicator offset. This offset is distance between indicator tip and gauge.
- CesArcThickness : Set thickness of gauge.
- CesGaugeArcColor : Set gauge initial color.
- CesShowSegmentSeparator : Show/Hide small lines to separate segments.
- CesSegmentSeparatorColor : Set separation line of segments.
- CesBigDiameter : Set diameter of rotating point of indicator.
- CesSmallDiameter : Set diameter of tip of indicator.
- CesValue : Value of control. According to "CesRangeMode" the value can be a range number of percent.
- CesRangeMode : If value set to true, indicator shows actual number in range otherwise indicator show percentage.
- CesMinValue : Set minimum value of control.
- CesMaxValue : Set maximum value of control.
- CesShowIndicatorLine : Show/Hide separation line of numbers.
- CesIndicatorMajorNumber : Show/Hide major separation line.
- CesIndicatorMinorNumber : Show/Hide minor separation line.
- CesIndicatorLineOffset : Set offset for separation line.
- CesIndicatorLineColor : Set color for separation line.
- CesShowIndicatorLineValue : Show/Hide value on each separation line.
- CesIndicatorLineValueColor : Set color for value on separation line.
- CesIndicatorLineValueFont : Set font for value of separation line.
- CesValueFont : Set font for control value.
- CesValueColor : Set color for control value.
- CesShowValue : Show/Hide control value.
- CesValuePrefix : Define string value to show before control value.
- CesValueSuffix : Define string value to show after control value.
- CesTitle : Define string value as title to show in control.
- CesShowTitle : Show/Hide title
- CesTitleFont : Set title font.
- CesTitleColor : Set title color.
- CesImage : Select an image to shoe inside the control.
- CesShowImage : Show/Hide image inside control.
- CesImageLocation : Set image location.
- CesGaugeRecord: اگر مقدار این متغیر برابر true باشد، هر زمان که مقدار گیج تغییر کند، کنترل یک لیست از تغییرات را نگهداری خواهد کرد.
- CesGaugeSegments: این متغیر یک لیست از کلاس نوع CesGaugeOption دریافت می کند که به کاربر امکان میدهد تا بتواند دامنه اعداد را رنگ بندی کند.
- CesBackgroundColor: رنگ پس زمینه.
- CesIndicatorType: تعیین نوع عقربه که باید یکی از انواع لیست شمارشی CesGaugeIndicatorTypeEnum باشد.
- CesIndicatorColor: رنگ عقربه.
- CesIndicatorOffset: تعیین میزان فاصله نوک عقربه با خطوط درجه بندی گیج.
- CesArcThickness: ضخامت دایره پگیج.
- CesGaugeArcColor: تعیین رنگ اولیه برای دامنه عددی گیچ. اگر کاربر CesgaugeSegment را مقدار دهی نکرده باشد، بصورت پیش فرض با یک رنگ نمایش داده خواهد شد.
- CesShowSegmentSeparator: نمایش خط جدا کننده بین عناصر رنگ بندی شده گیج.
- CesSegmentSeparatorColor: تعیین رنگ جدا کننده عناصر گیج.
- CesBigDiameter: قطر بخش انتهایی عقربه.
- CesSmallDiameter: قطر دایره نوک عقربه.
- CesValue: مقدای که باید گیج نمایش بدهد. این مقدار با توجه به مقدار CesRangeMode می تواند برحسب درصد و یا دامنه ای از اعداد باشد.
- CesRangeMode: اگر مقدار این ویژگی برابر true باشد، کاربر باید دامنه حداقل و حداکثر برای گیج تعریف کند و دیگر مبنای نمایش درصد نخواهد بود.
- CesMinValue: حداقل مقدار در نمایش دامنه اعداد.
- CesMaxValue: حداکثر مقدار در نمایش دامنه اعداد.
- CesShowIndicatorLine: امکان نمایش خطوط درجه بندی.
- CesIndicatorMajorNumber: تعداد تقسیم بندی صفحه گیج با خطوط بزرگ.
- CesIndicatorMinorNumber: تعداد تقسیم بندی بین هر تقسیم بندی بزرگ.
- CesIndicatorLineOffset: تعیین میزان فاصله خطوط درجه بندی از دایره بیرونی گیج.
- CesIndicatorLineColor: رنگ برای خطوط درجه بندی.
- CesShowIndicatorLineValue: نمایش مقدار در کنار خطوط درجه بندی بزرگ.
- CesIndicatorLineValueColor: رنگ خطوط درجه بندی گیج.
- CesIndicatorLineValueFont: فونت جهت نمایش مقدار درجه بندی.
- CesValueFont: فونت جهت نمایش مقدار.
- CesValueColor: رنگ جهت نمایش مقدار زیر عقربه.
- CesShowValue: نمایش مقدار جاری در زیر عقربه.
- CesValuePrefix: تعیین پیشوند جهت نمایش به هماره مقدار جاری.
- CesValueSuffix: تعیین پسوند جهت نمایش به هماره مقدار جاری.
- CesTitle: متن عنوان.
- CesShowTitle: نمایش عنوان.
- CesTitleFont: فونت عنوان.
- CesTitleColor: رنگ عنوان.
- CesImage: انتخاب تصویر جهت نمایش در صفحه گیج.
- CesShowImage: نمایش تصویر در گیج.
- CesImageLocation: موقعیت تصویر در گیج که می تاند یکی از مقادیر CesGaugeImageLocationEnum باشد.
public enum CesGaugeIndicatorTypeEnum
{
Type1,
Type2,
Type3,
}
public enum CesGaugeImageLocationEnum
{
Top,
Bottom,
Left,
Right,
}
For separating gauge and define colored segments, a list of CesGaugeOptions must be assign to CesGaugeSegments property.
جهت تقسیم بندی گیج و تعیین قسمت های رنگی، باید یک لیست از CesGaugeOptions به ویژگی CesGaugeSegments تخصیص دهیم.
public class CesGaugeOptions
{
public Color SegmentColor { get; set; } = Color.Gray;
public float Percent { get; set; } = 100;
public string? Title { get; set; }
}
This class is a structure for recording gauge changes and result will be recorded in pricate variable and user can get history by calling "CesGetRecordList" method.
این کلاس جهت ذخیره تغییرات گیج استفاده خواهد شد و نتیجه در یک لیست private نگهداری خواهد شد و کاربر از طریق متد "CesGetRecordList" می تواند آن را دریافت کند.
public class CesGaugeRecord
{
public DateTime RecordDateTime { get; set; }
public float RecordValue { get; set; }
}
- CesGetRecordList : Return list of "CesGaugeRecord".
- CesClearRecordList : Clear recorded history of control.
- CesGetRecordList: این متد یک لیست از تغییرات گیج را بر می گرداند.
- CesClearRecordList: این متد لیست داده های ذخیره شده در کنترل را پاک خواهد کرد.
Folowing example shows how you can set different color for gauge segments:
در نمونه زیر چگونگی تقسیم بندی اعداد و تعیین رنگ برای هر بخش نشان داده شده است:
cesGauge1.CesGaugeSegments = new List<Ces.WinForm.UI.CesGauge.CesGaugeOptions>()
{
new Ces.WinForm.UI.CesGauge.CesGaugeOptions{Percent = 15, SegmentColor = Color.PaleGreen},
new Ces.WinForm.UI.CesGauge.CesGaugeOptions{Percent = 35, SegmentColor = Color.Khaki},
new Ces.WinForm.UI.CesGauge.CesGaugeOptions{Percent = 50, SegmentColor = Color.LightBlue},
};