Class TimeField
Time editing View
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class TimeField : TextField, IDisposable, ISupportInitializeNotification, ISupportInitialize
Remarks
Constructors
TimeField()
Declaration
public TimeField()
TimeField(Int32, Int32, TimeSpan, Boolean)
Declaration
public TimeField(int x, int y, TimeSpan time, bool isShort = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The x coordinate. |
System.Int32 | y | The y coordinate. |
System.TimeSpan | time | Initial time. |
System.Boolean | isShort | If true, the seconds are hidden. Sets the IsShortFormat property. |
TimeField(TimeSpan)
Declaration
public TimeField(TimeSpan time)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | time | Initial time |
Properties
IsShortFormat
Get or sets whether TimeField uses the short or long time format.
Declaration
public bool IsShortFormat { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Time
Gets or sets the time of the TimeField.
Declaration
public TimeSpan Time { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Remarks
Methods
MouseEvent(MouseEvent)
Declaration
public override bool MouseEvent(MouseEvent ev)
Parameters
Type | Name | Description |
---|---|---|
MouseEvent | ev |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
OnTimeChanged(DateTimeEventArgs<TimeSpan>)
Event firing method that invokes the TimeChanged event.
Declaration
public virtual void OnTimeChanged(DateTimeEventArgs<TimeSpan> args)
Parameters
Type | Name | Description |
---|---|---|
DateTimeEventArgs<System.TimeSpan> | args | The event arguments |
ProcessKey(KeyEvent)
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Events
TimeChanged
TimeChanged event, raised when the Date has changed.
Declaration
public event Action<DateTimeEventArgs<TimeSpan>> TimeChanged
Event Type
Type | Description |
---|---|
System.Action<DateTimeEventArgs<System.TimeSpan>> |
Remarks
This event is raised when the Time changes.
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize