menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AlertForm - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AlertForm

    Displays appointment reminder alerts.

    Inheritance
    System.Object
    AlertForm
    Namespace: Syncfusion.Windows.Forms.Schedule
    Assembly: Syncfusion.Schedule.Windows.dll
    Syntax
    public class AlertForm : Form

    Constructors

    AlertForm()

    Initializes a new instance of the AlertForm class.

    Declaration
    public AlertForm()

    Fields

    AlertSounding

    Occurs when an AlertWindow is made visible and SoundAlert is true.

    Declaration
    public CancelEventHandler AlertSounding
    Field Value
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    You can use this event to apply custom notification sounds if desired. Setting e.Cancel = true will prevent the default MessageBeep. The sender object will be the ALertForm, and you can index it to retrieve the current IScheduleAppointments waiting in the alert list. You can use Count to get the number of items in the current alert list.

    buttonDismiss

    Gets the Button that dismisses the selected item.

    Declaration
    public Button buttonDismiss
    Field Value
    Type
    System.Windows.Forms.Button

    buttonDismissAll

    Gets the Button that dismisses all the listed items.

    Declaration
    public Button buttonDismissAll
    Field Value
    Type
    System.Windows.Forms.Button

    buttonSnooze

    Gets the Button that removes the AlertWindow and redisplays it in a specified period, SnoozeTime.

    Declaration
    public Button buttonSnooze
    Field Value
    Type
    System.Windows.Forms.Button

    Grid

    Gets the GridControl that lists the alert items.

    Declaration
    public GridControl Grid
    Field Value
    Type
    GridControl
    Remarks

    You can directly access this GridControl to change its look. Here is some code that changes its look.

    Examples
        this.ScheduleControl1.AlertWindow.BackColor = Color.FromArgb(240, 240, 255);
        this.ScheduleControl1.AlertWindow.Grid.TableStyle.BackColor = Color.FromArgb(100, 240, 240, 255);
        this.ScheduleControl1.AlertWindow.Grid.Properties.BackgroundColor = Color.FromArgb(100, Color.Blue);
        Syncfusion.Windows.Forms.Grid.GridStyleInfo headerStyle = this.ScheduleControl1.AlertWindow.Grid.BaseStylesMap["Header"].StyleInfo;
        headerStyle.Interior = new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, Color.Blue, Color.White);
        this.ScheduleControl1.AlertWindow.Grid.Refresh();
        Me.ScheduleControl1.AlertWindow.BackColor = Color.FromArgb(240, 240, 255)
        Me.ScheduleControl1.AlertWindow.Grid.TableStyle.BackColor = Color.FromArgb(100, 240, 240, 255)
        Me.ScheduleControl1.AlertWindow.Grid.Properties.BackgroundColor = Color.FromArgb(100, Color.Blue)
        Dim headerStyle As Syncfusion.Windows.Forms.Grid.GridStyleInfo = Me.ScheduleControl1.AlertWindow.Grid.BaseStylesMap("Header").StyleInfo
        headerStyle.Interior = New Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.Vertical, Color.Blue, Color.White)
        Me.ScheduleControl1.AlertWindow.Grid.Refresh()

    labelSubject

    Gets the Label that displays the Subject of the item.

    Declaration
    public Label labelSubject
    Field Value
    Type
    System.Windows.Forms.Label

    labelTime

    Gets the Label that displays the StartTime of the item.

    Declaration
    public Label labelTime
    Field Value
    Type
    System.Windows.Forms.Label

    Properties

    AlertStrings

    Gets or sets the strings used as part of the alert window.

    Declaration
    public string[] AlertStrings { get; set; }
    Property Value
    Type
    System.String[]

    CheckTimerIntervalInMinutes

    Gets or sets the time interval (in minutes) between checks for any item needing an alert.

    Declaration
    public int CheckTimerIntervalInMinutes { get; set; }
    Property Value
    Type
    System.Int32

    Count

    Gets the number of items in the current alert list.

    Declaration
    public int Count { get; }
    Property Value
    Type
    System.Int32

    Item[Int32]

    Gets the i-th IScheduleAppointment in the alert list.

    Declaration
    public IScheduleAppointment this[int i] { get; }
    Parameters
    Type Name Description
    System.Int32 i

    An integer between 0 and Count.

    Property Value
    Type Description
    IScheduleAppointment

    An IScheduleAppointment.

    Remarks

    If the indexer is outside the valid number of items in the alert list, null is returned.

    SnoozeMinutes

    Gets or sets the number of minutes that pressing the Snooze Button will hide the Alert window.

    Declaration
    public int SnoozeMinutes { get; set; }
    Property Value
    Type
    System.Int32

    SoundAlert

    Gets or sets a value indicating whether a MeesageBeep should sound when the AlertWindow is shown.

    Declaration
    public bool SoundAlert { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    AdjustAlertList()

    Creates a list of items that require alerts at the time of the call.

    Declaration
    public void AdjustAlertList()
    Remarks

    This method is called when EnableAlerts is set true.

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    OnAlertSounding(CancelEventArgs)

    Raises the AlertSounding event.

    Declaration
    protected virtual void OnAlertSounding(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    The System.ComponentModel.CancelEventArgs that contains the event data.

    OnClosing(CancelEventArgs)

    Overrides the System.Windows.Forms.Form.Closing event to make sure timer is off and hide the form instead of closing it.

    Declaration
    protected override void OnClosing(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    The System.ComponentModel.CancelEventArgs that contains the event data.

    OnVisibleChanged(EventArgs)

    Overrides the System.Windows.Forms.Control.VisibleChanged event to sound a beep when an alert appears.

    Declaration
    protected override void OnVisibleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that contains the event data.

    ResetAlertWindow()

    Clears all events and data used by this AlertWindow and closes it.

    Declaration
    public void ResetAlertWindow()

    SetDataInfo(ScheduleControl)

    Informs the form of the active IScheduleAppointmentList and the IDataProvider.

    Declaration
    public void SetDataInfo(ScheduleControl schedule)
    Parameters
    Type Name Description
    ScheduleControl schedule

    The ScheduleControl.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved