CesNotification - CesSolutions/Ces.WinForm.UI GitHub Wiki
Show notification as strip or box model to desired position on screen.
این کنترل جهت نمایش اعلان به کاربر در حالت ها و موقعیت های مختلف می تواند استفاده شود.
NotificationBox

NotificationStrip

- Id : User can assign unique Id for each notification and this value must be GUID type.
- IssueDateTime : Set date and time of notification.
- Duration : Set duration of notification in seconds. After this time notification will close automatically.
- Title : Text of title.
- Message : Text of notification.
- Icon : Value must be selected from "CesNotificationIconEnum".
- Position : Value must be selected from "CesNotificationPositionEnum".
- BackColor : Set notification background color.
- ShowTitleBar : Enable/Disable title bar at the top of notification.
- ShowExitButton : Enable/Disable exit button to give access to user to close notification.
- ShowStatusBar : Enable/Disable status bar at the bottom of notification.
- ShowIssueDateTime : Enable/Disable issue date and time of notification.
- ShowRemained : Enable/Disable remained time for auto close feature.
- ShowIcon : Enable/Disable icon on the notification area.
- Size : User can define new size to show notification (Will be obsolete in next update.)
- Type : Value must be selected from "CesNotificationTypeEnum".
- ShowStripBottom : If set property value to true, notification strip show at the bottom of screen otherwise, at top of screen.
- Opacity : Set notification opacity.
- Id : می توان برای هر اعلام یک کد منحصر بفرد از نوع GUID تخصیص داد.
- IssueDateTime : دریج نمایش زمان صدور اعلان.
- Duration : تعیین مدتی زمان نمایش اعلان برحسب ثانیه که پس از آن اعلان بصورت خودکار بسته خواهد شد.
- Title : تعیین متن عنوان برای اعلان نوع CesNotificationBox. در نوع CesNotificationStrip عنوان نمایش داده نخواهد شد.
- Message : متن اعلان.
- Icon : تعیین آیکن برای اعلان. آیکن باید یکی از اعضای لیست شمارشی CesNotificationIconEnum باشد.
- Position : تعیین موقعیت جهت نمایش اعلان در مانیتور که باید یکی از اعضای لیست شمارشی CesNotificationPositionEnum باشد.
- BackColor : تعیین رنگ پس زمینه.
- ShowTitleBar : نمایش / عدم نمایش عنوان در CesNotificationBox.
- ShowExitButton : نمایش / عدم نمایش دکمه خروج در کادر اعلان.
- ShowStatusBar : نمایش / عدم نمایش نوار وضعیت در اعلان نوع CesNotificationBox.
- ShowIssueDateTime : نمایش / عدم نمایش زمان صدور اعلان.
- ShowRemained : نمایش / عدم نمایش زمان باقیمانده جهت بستن خودکار کادر اعلان.
- ShowIcon : نمایش / عدم نمایش آیکن در کادر اعلان.
- Size : تعیین سایز کادر اعلان.
- Type : تعیین نوع کادر اعلان که باید یکی از اعضای لیست شمارشی CesNotificationTypeEnum باشد.
- ShowStripBottom : اگر نوع اعلان CesNotificationzStrip باشد می توان تعیین کرد که نوار اعلان در پایین مانیتور و یا در بالا نمایش داده شود. اگر مقدار این ویژگی برابر true باشد نوار اعلان در پایین مانیتتور نمایش داده خواهد شد.
- Opacity : مقدار این پارامتر باید یبن 0 تا 1 باشد و میزان شفافیت کادر اعلان را مشخص می کند.
public class CesNotificationOptions
{
public CesNotificationOptions(CesNotificationOptions? options = null)
{
Id = Guid.NewGuid();
if (options is null)
{
IssueDateTime = DateTime.Now;
Duration = 5;
Icon = CesNotificationIconEnum.None;
Position = CesNotificationPositionEnum.BottomRight;
BackColor = Color.BlueViolet;
ShowTitleBar = true;
ShowExitButton = true;
ShowStatusBar = false;
ShowIssueDateTime = true;
ShowRemained = true;
ShowIcon = true;
Type = CesNotificationTypeEnum.NotificationBox;
ShowStripBottom = true;
Opacity = 1;
}
}
public System.Guid Id { get; set; }
public DateTime IssueDateTime { get; set; }
public int Duration { get; set; } // in second
public string? Title { get; set; }
public string? Message { get; set; }
public CesNotificationIconEnum Icon { get; set; }
public CesNotificationPositionEnum Position { get; set; }
public Color BackColor { get; set; }
public bool ShowTitleBar { get; set; }
public bool ShowExitButton { get; set; }
public bool ShowStatusBar { get; set; }
public bool ShowIssueDateTime { get; set; }
public bool ShowRemained { get; set; }
public bool ShowIcon { get; set; }
public Size? Size { get; set; }
public CesNotificationTypeEnum Type { get; set; }
public bool ShowStripBottom { get; set; }
public double Opacity { get; set; }
internal Point? BlankLocation { get; set; }
internal int Order { get; set; }
public delegate void CesNotificationOnExitEventHandler();
public CesNotificationOnExitDelegate CesNotificationOnExit;
}
public enum CesNotificationPositionEnum
{
TopLeft,
TopCenter,
TopRight,
BottomLeft,
BottomCenter,
BottomRight,
ScreenCenter,
}
public enum CesNotificationIconEnum
{
None,
NotificationCheck,
NotificationEmail,
NotificationInformation,
NotificationQuestion,
NotificationSecurity,
NotificationSettings,
NotificationUser,
NotificationWarning,
NotificationWeb,
}
public enum CesNotificationTypeEnum
{
NotificationBox,
NotificationStrip,
NotificationPanel,
}