Пример #1
0
        /// <summary>
        /// Invoked when the "Manage themes" <see cref="MenuItem"/> is clicked.
        /// </summary>
        /// <param name="sender">The <see cref="MenuItem"/> where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private void ManageThemesMenuItemClick(object sender, RoutedEventArgs e)
        {
            ThemeManagerWindow window = Application.Current.Windows.OfType <ThemeManagerWindow>().FirstOrDefault();

            if (window != null)
            {
                window.SetTimerWindow(this.timerWindow);
                window.BringToFrontAndActivate();
            }
            else
            {
                window = new ThemeManagerWindow(this.timerWindow);
                window.Show();
            }
        }
Пример #2
0
 /// <summary>
 /// Invoked when the "Manage themes" <see cref="MenuItem"/> is clicked.
 /// </summary>
 /// <param name="sender">The <see cref="MenuItem"/> where the event handler is attached.</param>
 /// <param name="e">The event data.</param>
 private void ManageThemesMenuItemClick(object sender, RoutedEventArgs e)
 {
     ThemeManagerWindow window = Application.Current.Windows.OfType<ThemeManagerWindow>().FirstOrDefault();
     if (window != null)
     {
         window.SetTimerWindow(this.timerWindow);
         window.BringToFrontAndActivate();
     }
     else
     {
         window = new ThemeManagerWindow(this.timerWindow);
         window.Show();
     }
 }