Browse Source

Don't close the startup window on click outside

Equbuxu 3 years ago
parent
commit
0e779c444b

+ 1 - 0
PixiEditor/Views/Dialogs/HelloTherePopup.xaml.cs

@@ -28,6 +28,7 @@ namespace PixiEditor.Views.Dialogs
 
         public bool RecentlyOpenedEmpty { get => (bool)GetValue(RecentlyOpenedEmptyProperty); set => SetValue(RecentlyOpenedEmptyProperty, value); }
 
+
         public RelayCommand OpenFileCommand { get; set; }
 
         public RelayCommand OpenNewFileCommand { get; set; }

+ 0 - 13
PixiEditor/Views/MainWindow.xaml.cs

@@ -4,7 +4,6 @@ using PixiEditor.Models.Controllers;
 using PixiEditor.Models.DataHolders;
 using PixiEditor.Models.UserPreferences;
 using PixiEditor.ViewModels;
-using PixiEditor.Views.Dialogs;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -48,7 +47,6 @@ namespace PixiEditor
 
             UpdateWindowChromeBorderThickness();
             StateChanged += MainWindow_StateChanged;
-            Activated += MainWindow_Activated;
 
             DataContext.CloseAction = Close;
             Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
@@ -97,12 +95,6 @@ namespace PixiEditor
             ((HwndSource)PresentationSource.FromVisual(this)).AddHook(Helpers.WindowSizeHelper.SetMaxSizeHook);
         }
 
-        [Conditional("RELEASE")]
-        private static void CloseHelloThereIfRelease()
-        {
-            Application.Current.Windows.OfType<HelloTherePopup>().ToList().ForEach(x => { if (!x.IsClosing) x.Close(); });
-        }
-
         [Conditional("RELEASE")]
         private void OnReleaseBuild()
         {
@@ -158,11 +150,6 @@ namespace PixiEditor
             SystemCommands.CloseWindow(this);
         }
 
-        private void MainWindow_Activated(object sender, EventArgs e)
-        {
-            CloseHelloThereIfRelease();
-        }
-
         private void UpdateWindowChromeBorderThickness()
         {
             if (WindowState == WindowState.Maximized)