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