HandleSecondInstanceMessages() public static méthode

public static HandleSecondInstanceMessages ( DpiAwareWindow window, Action handler ) : void
window FirstFloor.ModernUI.Windows.Controls.DpiAwareWindow
handler Action
Résultat void
Exemple #1
0
        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;
            }
        }