예제 #1
0
        /// <summary>
        /// Unregisters a desktop alert from the manager.
        /// </summary>
        /// <param name="alert">The alert to unregister.</param>
        public void RemoveAlert(RadDesktopAlert alert)
        {
            Debug.Assert(this.openedAlerts.Contains(alert), "Trying to remove non-existing alert.");
            this.openedAlerts.Remove(alert);
            this.UpdateAlertsOrder();

            if (this.AlertRemoved != null)
            {
                DesktopAlertManagerEventArgs args = new DesktopAlertManagerEventArgs(alert);
                this.AlertRemoved(this, args);
            }
        }
예제 #2
0
        /// <summary>
        /// Registers an instance of the <see cref="RadDesktopAlert"/>and
        /// displays it on the screen according to its
        /// </summary>
        /// <param name="alert"></param>
        public void AddAlert(RadDesktopAlert alert)
        {
            if (this.openedAlerts.Contains(alert))
            {
                return;
            }
            alert.OnLocationChangeRequested(this.GetAlertPopupLocation(alert));
            this.openedAlerts.Add(alert);

            if (this.AlertAdded != null)
            {
                DesktopAlertManagerEventArgs args = new DesktopAlertManagerEventArgs(alert);
                this.AlertAdded(this, args);
            }
        }