private void ShowBalloonPopup(Func <BalloonPopupBase> popupFactory) { Invoke.OnSTA( () => NotifyIcon.ShowCustomBalloon( popupFactory(), PopupAnimation.Slide, null)); }
private static string AskForExportLocation() { var saveFileDialog = new SaveFileDialog { Filter = Properties.SessionManager.SaveFileDialogFilter, AddExtension = true }; var result = Invoke.OnSTA(() => saveFileDialog.ShowDialog()); return(result == DialogResult.Cancel ? null : saveFileDialog.FileName); }
private static void TestDisplayXaml(string xaml, Action <Paragraph> assertion) { Invoke.OnSTA( () => { var uut = new XamlBindableRichTextBox { Xaml = xaml }; // wait for asynchronous task on dispatcher to finish uut.Dispatcher.Invoke(new Action(() => { }), DispatcherPriority.Input); var paragraph = uut.Document.Blocks.FirstBlock as Paragraph; Assert.NotNull(paragraph); assertion(paragraph); }); }
private void ShowAbsenceNotification() { Invoke.OnSTA( () => _notifyIcon.ShowCustomBalloon(new AbsenceNotification(CalculateMinutesSinceLastAction(), _viewModel.ActiveTask.Title, OnNotificationClosed), PopupAnimation.Slide, null)); }
public NotifyTrayIcon(ILogManager logManager) { _logManager = logManager; Invoke.OnSTA(InitTaskbarIcon); }
public static bool IsPressed(this Key key) { return(Invoke.OnSTA(() => Keyboard.IsKeyDown(key))); }