public static HumaneMessageWindow Show(String message) { var humaneWindow = new HumaneMessageWindow(message); humaneWindow.Show(); humaneWindow.Focus(); return(humaneWindow); }
public static HumaneMessageWindow Show(String message, TimeSpan maxDuration) { var humaneWindow = new HumaneMessageWindow(message, maxDuration); humaneWindow.Show(); humaneWindow.Focus(); return(humaneWindow); }
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) { try { InitializeWindow(); } catch (Exception ex) { HumaneMessageWindow.Show(string.Format("Initialization failed: {0}", ex.Message)); } }
private void SetDataContext() { try { DataContext = _dashboardResolver.GetProjectStatusList(); } catch (DashboardCommunicationException ex) { DataContext = null; TimeSpan timeToShowMessage = TimeSpan.FromSeconds(3); HumaneMessageWindow.Show("There was a problem connecting to " + ex.Uri + ".", timeToShowMessage); } }