Class ControlStorageService
Storage service for form's controls.
Inherited Members
Namespace: FastReport.Utils
Assembly: FastReport.dll
Syntax
public class ControlStorageService : StorageService
Constructors
ControlStorageService(Control, String)
Initializes a new instance of storage class.
Declaration
public ControlStorageService(Control control, string path)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The control which dpi setting is used to save/restore dips. |
System.String | path | The root path. |
Properties
UseDips
Use device independent pixels (measured in 96dpi mode).
Declaration
public bool UseDips { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetDip(String, Int32, Int32, Int32)
Gets value in device-independent pixels (dips) and converts it to pixels. Takes UseDips property into account.
Declaration
public int GetDip(string key, int defaultValue = 0, int minValue = -2147483648, int maxValue = 2147483647)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Int32 | defaultValue | Default value. |
System.Int32 | minValue | Minimum value. |
System.Int32 | maxValue | Maximum value. |
Returns
Type | Description |
---|---|
System.Int32 | Value in dips. |
GetFont(String, Font)
Gets font from font storage.
Declaration
public Font GetFont(string path, Font defaultFont)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to font storage. |
System.Drawing.Font | defaultFont | Default value. |
Returns
Type | Description |
---|---|
System.Drawing.Font | The font object. |
SetDip(String, Int32)
Stores value in device-independent pixels (dips). Takes UseDips property into account.
Declaration
public void SetDip(string key, int value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Int32 | value | Value. |