private void OnUserAvatarTapped(object sender, TappedRoutedEventArgs e) { MainNav.SelectedItem = MainNav.MenuItems[1]; ProfileImage.UriSource = new Uri("ms-appx:///Assets/Avatars/11.jpg"); NotificationIndicator.Visibility = Visibility.Visible; NotificationDialog.GoToEmptyState(); NotificationDialog.Visibility = Visibility.Collapsed; ContentFrame.Navigate(typeof(CasesPage)); }
private async void ExecNotificationDialog(object o) { var view = new NotificationDialog { DataContext = o }; await DialogHost.Show(view, "RootDialog", ClosingEventHandler); }
private void ShowNotification(string title, string msg) { NotifyData data = new NotifyData(); data.Title = title; data.Content = msg; NotificationDialog dialog = new NotificationDialog();//new 一个通知 dialog.Closed += Dialog_Closed; dialog.TopFrom = GetTopFrom(); _notificationDialogs.Add(dialog); dialog.DataContext = data;//设置通知里要显示的数据 dialog.ShowActivated = false; dialog.Show(); }
public static async Task Show(string message, string buttonCaption) { try { var winningDialogViewModel = new NotificationDialogViewModel(message, buttonCaption); var view = new NotificationDialog { DataContext = winningDialogViewModel }; await DialogHost.Show(view, "RootDialog"); winningDialogViewModel.Dispose(); } catch { MessageBox.Show(message); } }
public void TestDialog() { //Test Default Button foreach (MessageBoxButtons buttons in Enum.GetValues(typeof(MessageBoxButtons))) { foreach (MessageBoxIcon icon in Enum.GetValues(typeof(MessageBoxIcon))) //foreach (MessageBoxDefaultButton defaultButton in Enum.GetValues(typeof(MessageBoxDefaultButton))) { NotificationDialogResult result = NotificationDialog.Show( sampleText, sampleCaption, buttons, "Don't Show This Again", icon); //MessageBox.Show(result.ToString()); MessageBox.Show(sampleText, sampleCaption, buttons, icon); Debug.Print(result.ToString()); } } }
public NotificationController( IServiceProvider serviceProvider, // IStringLocalizer<NotificationController> localizer, // ScheduleNotificationStore scheduleNotificationStore, // BotConfiguration botConfig, IConfiguration configuration, ConcurrentDictionary <string, ConversationReference> conversationReferences, NotificationDialog dialog, ConversationState conversationState, UserState userState ) { this.serviceProvider = serviceProvider; // this.localizer = localizer; // this.scheduleNotificationStore = scheduleNotificationStore; // this.botConfig = botConfig; this.adapter = (BotFrameworkAdapter)serviceProvider.GetService(typeof(IAdapterIntegration)); this._conversationReferences = conversationReferences; this.dialog = dialog; this.conversationState = conversationState; this.userState = userState; _appId = configuration["MicrosoftAppId"]; // If the channel is the Emulator, and authentication is not in use, // the AppId will be null. We generate a random AppId for this case only. // This is not required for production, since the AppId will have a value. if (string.IsNullOrEmpty(_appId)) { _appId = Guid.NewGuid().ToString(); //if no AppId, use a random Guid } var dialogState = conversationState.CreateProperty <DialogState>("DialogState"); dialogs = new DialogSet(dialogState); dialogs.Add(new NotificationDialog()); }
public static ISlidePanel Notification(ISlidePanel panel, string title, string message, string icon = null, Action action = null) { panel.Position = Position.BOTTOM; panel.TitleVisibility = Visibility.Collapsed; panel.CloseButtonVisibility = Visibility.Collapsed; panel.IsPinned = true; panel.Height = 50; panel.SetZIndex(500); panel.UseAltTheme = true; var content = new NotificationDialog(title, message); content.SetUtilityButton(action, icon ?? IcoMoon.Notification); content.SetCloseButton(() => panel.Close(), IcoMoon.CancelCircle); panel.Content = content; panel.Attach(); _panels.Add(panel); Common.Log.Debug($"SlidePanelManager: Created Notificaton ({title}, {message})"); return(panel); }
public void OnTestPopupClicked() { NotificationDialog notifDiaglog = (NotificationDialog)DialogBuilder.Create(DialogBuilder.DialogType.NOTIFICATION); notifDiaglog.SetMessage("Test popup"); }