New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class WorkTimeExceptionRule : INotifyPropertyChanged, INotifyPropertyChangingEx

Inheritance: objectWorkTimeExceptionRule

Implements: INotifyPropertyChangedINotifyPropertyChangingEx

Constructors

C#
public WorkTimeExceptionRule()

Properties

The time of day until which the rule is applied.

C#
public TimeSpan EndTime { get; set; }

The date after which the rule does not apply. If left null, there is no end limit for the rule.

C#
public DateTime? ExceptionEndDate { get; set; }

The date after which the rule applies. If left null, there is no start limit for the rule.

C#
public DateTime? ExceptionStartDate { get; set; }

Indicates whether the time interval described by the rule is considered a working time or non-working time.

C#
public bool IsWorkTime { get; set; }

The id of the resource this rule stands for. If left null, the rull will stand for all resources.

C#
public EventId ResourceId { get; set; }

The time of day after which the rule starts applying.

C#
public TimeSpan StartTime { get; set; }

The weekdays for which the rule applies. The default value is WeekDays.All. Days can be combined by using the WeekDays enum as flags.

C#
public WeekDays WeekDays { get; set; }

Methods

C#
protected virtual void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

Tries to match a given date against the rule. If the date matches, the isWorkTime argument is assigned with the IsWorkTime property of the rule and the method returns true. If the date does not match the rule, the method returns false.

C#
public virtual bool TryMatchDate(DateTime date, EventId resourceId, out bool isWorkTime)
Parameters:dateDateTime

The date you try to match.

resourceIdEventId

The resource id of the view you are checking the date for.

isWorkTimebool

If matching succeds, the this will be assigned with the IsWorkTime property of the rule.

Returns:

bool

Events

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged