public static HandleSecondInstanceMessages ( |
||
window | ||
handler | Action |
|
return | void |
private void SetCurrentWindow(Window window) { void OnUnloaded(object o, RoutedEventArgs routedEventArgs) { SetCurrentWindow(_application.Windows.OfType <Window>().ApartFrom(_currentWindow).FirstOrDefault()); } if (_currentWindow != null) { _currentWindow.Unloaded -= OnUnloaded; } _currentWindow = window; if (_currentWindow != null) { EntryPoint.HandleSecondInstanceMessages(_currentWindow, HandleMessages); _currentWindow.Unloaded += OnUnloaded; } }