// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
public void SetGcTimeSpanValidatorSettings()
{
// Creates an instance of a GcTimeSpan control.
GcTimeSpan gcTimeSpan1 = new GcTimeSpan();
// Creates an instance of a GcTimeSpanValidator component.
GcTimeSpanValidator gcTimeSpanValidator1 = new GcTimeSpanValidator();
// Creates a InvalidValue object.
GcTimeSpanValidator.InvalidValue invalidValue1 = new GcTimeSpanValidator.InvalidValue();
invalidValue1.NullIsValid = false;
// Creates a ValueProcess object.
ValueProcess valueProcess1 = new ValueProcess();
valueProcess1.ValueProcessOption = ValueProcessOption.Restore;
// Gets the ValidateActions defined for the gcTimeSpan, and adds the ThreeStateIconNotify object to the collection.
gcTimeSpanValidator1.GetValidateActions(gcTimeSpan1).AddRange(new ValidateAction[] {valueProcess1});
// Gets the ValidateItems defined for the gcTimeSpan, and adds the InvalidValue object to the collection.
gcTimeSpanValidator1.GetValidateItems(gcTimeSpan1).AddRange(new object[] { invalidValue1 });
}
' Please use the following namespace
' Imports System.Windows.Forms;
' Imports GrapeCity.Win.Editors;
Public Sub SetGcTimeSpanValidatorSettings()
' Creates an instance of a GcTimeSpan control.
Dim gcTimeSpan1 As New GcTimeSpan()
' Creates an instance of a GcTimeSpanValidator component.
Dim gcTimeSpanValidator1 As New GcTimeSpanValidator()
' Creates a InvalidValue object.
Dim invalidValue1 As New GcTimeSpanValidator.InvalidValue()
invalidValue1.NullIsValid = False
' Creates a ValueProcess object.
Dim valueProcess1 As New ValueProcess()
valueProcess1.ValueProcessOption = ValueProcessOption.Restore
' Gets the ValidateActions defined for the gcTimeSpan, and adds the ThreeStateIconNotify object to the collection.
gcTimeSpanValidator1.GetValidateActions(gcTimeSpan1).AddRange(New ValidateAction() {valueProcess1})
' Gets the ValidateItems defined for the gcTimeSpan, and adds the InvalidValue object to the collection.
gcTimeSpanValidator1.GetValidateItems(gcTimeSpan1).AddRange(New Object() {invalidValue1})
End Sub