public void AddNotification(NotificationType type, string content, string title = null) { if (!string.IsNullOrWhiteSpace(content)) { var notification = new PageNotification { Type = type, Title = title, Content = content }; this.notifications.Add(notification); this.AddAutoCloseNotificationTimer(notification); this.StateHasChanged(); } }
internal void AddNotification( NotificationType type, string content, string title = null, int autoCloseTimeoutSeconds = DefaultAutoCloseTimeoutSeconds) { if (!string.IsNullOrWhiteSpace(content)) { var notification = new PageNotification { Type = type, Title = title, Content = content }; this.notifications.Add(notification); this.AddAutoCloseNotificationTimer(notification, autoCloseTimeoutSeconds); this.StateHasChanged(); } }
private void Flip_SelectionChanged1(object sender, SelectionChangedEventArgs e) { PageNotification.Show(Globalization.GetString("Pdf_Page_Tip").Replace("[CurrentPageIndex]", (Flip.SelectedIndex + 1).ToString()).Replace("[TotalPageCount]", Pdf.PageCount.ToString()), 1200); }
//此事件主要负责显示当前页数 private void Flip_SelectionChanged1(object sender, SelectionChangedEventArgs e) { int CurrentPage = Flip.SelectedIndex + 1; PageNotification.Show(CurrentPage + " / (共 " + Pdf.PageCount + " 页)", 1200); }