Browse Source

Не красиво зато работает

Danila Alekseev 1 year ago
parent
commit
f72e26b9e7
3 changed files with 21 additions and 11 deletions
  1. 15 4
      ROGOZ/MainWindow.xaml.cs
  2. 2 1
      ROGOZ/Windows/AccExitWin.xaml
  3. 4 6
      ROGOZ/Windows/AccExitWin.xaml.cs

+ 15 - 4
ROGOZ/MainWindow.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using ROGOZ.Pages;
+using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 using System.Net;
 using System.Net;
@@ -51,9 +52,19 @@ namespace ROGOZ
             //    this.Close();
             //    this.Close();
             //}
             //}
 
 
-            Windows.AccExitWin window = new Windows.AccExitWin();
-            window.ShowDialog();
-            
+            //Windows.AccExitWin window = new Windows.AccExitWin();
+            //window.ShowDialog();
+            if (MessageBox.Show("Вы уверены, что хотите выйти из аккаунта ESOFT?", "Выйти", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+                            {
+
+                Pages.Authorization authorization = new Pages.Authorization();
+
+                authorization.Show();
+
+                this.Close();
+
+                            }
+
         }
         }
 
 
         private void General_Click(object sender, RoutedEventArgs e)
         private void General_Click(object sender, RoutedEventArgs e)

+ 2 - 1
ROGOZ/Windows/AccExitWin.xaml

@@ -10,7 +10,8 @@
         WindowStartupLocation="CenterScreen"
         WindowStartupLocation="CenterScreen"
         ResizeMode="NoResize"
         ResizeMode="NoResize"
         MouseDown="Window_MouseDown"
         MouseDown="Window_MouseDown"
-        Background="Transparent">
+        Background="Transparent"
+        AllowsTransparency="True">
 
 
     <Border CornerRadius="15" Background="#e6f4ff">
     <Border CornerRadius="15" Background="#e6f4ff">
         <Grid>
         <Grid>

+ 4 - 6
ROGOZ/Windows/AccExitWin.xaml.cs

@@ -41,14 +41,12 @@ namespace ROGOZ.Windows
 
 
         private void Button_Click_1(object sender, RoutedEventArgs e)
         private void Button_Click_1(object sender, RoutedEventArgs e)
         {
         {
-            //Pages.Authorization authorization = new Pages.Authorization();
-            //authorization.Show();
-            //this.Close();
-            //Application.Current.Shutdown();
+           
             Pages.Authorization authorization = new Pages.Authorization();
             Pages.Authorization authorization = new Pages.Authorization();
             authorization.Show();
             authorization.Show();
-            Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
-
+            MainWindow mainWindow = new MainWindow();
+            mainWindow.Close();
+            this.Close();
         }
         }
     }
     }
 }
 }