DateTimePicker
Summary
Represents the date time picker control.
Signature
| public class DateTimePicker : ControlBase
|
Namespace
cAlgo.API
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 | using cAlgo.API;
namespace cAlgo.Robots;
[Robot(AccessRights = AccessRights.None)]
public class TestExample : Robot
{
protected override void OnStart()
{
var dateTimePicker = new DateTimePicker
{
Value = Server.Time,
MaxValue = Server.Time.AddMonths(1),
MinValue = Server.Time.AddMonths(-1)
};
dateTimePicker.ValueChanged += args => Print($"Date Time Picker value change to: {args.NewValue}");
var changeValueButton = new Button {Text = "Change Value"};
changeValueButton.Click += args => dateTimePicker.Value = Server.Time.AddDays(1);
var panel = new StackPanel
{
Orientation = Orientation.Vertical,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center
};
panel.AddChild(dateTimePicker);
panel.AddChild(changeValueButton);
Chart.AddControl(panel);
}
}
|
Methods
RaiseValueChanged
Signature
| internal void RaiseValueChanged(DateTime newValue)
|
Parameters
| Name | Type | Description |
| newValue | DateTime | |
Return Value
void
ChangeValue
Signature
| private void ChangeValue(DateTime newValue)
|
Parameters
| Name | Type | Description |
| newValue | DateTime | |
Return Value
void
Accept
Signature
| internal void Accept(IChartControlVisitor visitor)
|
Parameters
| Name | Type | Description |
| visitor | IChartControlVisitor | |
Return Value
void
Properties
Value
Summary
Gets or sets value.
Signature
| public DateTime Value {get; set;}
|
Return Value
DateTime
MaxValue
Summary
Gets or sets maximum value.
Signature
| public DateTime MaxValue {get; set;}
|
Return Value
DateTime
MinValue
Summary
Gets or sets minimum value.
Signature
| public DateTime MinValue {get; set;}
|
Return Value
DateTime
Summary
Gets or sets whether show time picker input or not.
Signature
| public bool ShowTimeInput {get; set;}
|
Return Value
bool
Events
ValueChanged
Summary
Occurs when value is changed.
Signature
| public event Action<DateTimePickerValueChangedEventArgs> ValueChanged;
|