Selaa lähdekoodia

Сделал не красивый выход их акка

Danila Alekseev 1 vuosi sitten
vanhempi
commit
f7bc20070d
2 muutettua tiedostoa jossa 13 lisäystä ja 1 poistoa
  1. 1 1
      ROGOZ/MainWindow.xaml
  2. 12 0
      ROGOZ/MainWindow.xaml.cs

+ 1 - 1
ROGOZ/MainWindow.xaml

@@ -92,7 +92,7 @@
 
             </StackPanel>
             <StackPanel VerticalAlignment="Bottom" Height="3" Width="250" Margin="0,0,0,100" Background="#2e5d85"/>
-            <Button Name="AccExit" Style="{DynamicResource NaviButtons}" VerticalAlignment="Bottom" Margin="0,0,0,15">
+            <Button Name="AccExit" Style="{DynamicResource NaviButtons}" VerticalAlignment="Bottom" Margin="0,0,0,15" Click="AccExit_Click">
                 <Grid Width="280">
                     <TextBlock Text="Выход" Style="{StaticResource Text_Style}"/>
                     <Image Source="/Resources/AccExit.png" Style="{StaticResource ImageStyle}"/>

+ 12 - 0
ROGOZ/MainWindow.xaml.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Net;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
@@ -40,5 +41,16 @@ namespace ROGOZ
         {
             Application.Current.MainWindow.WindowState = WindowState.Minimized;
         }
+
+        private void AccExit_Click(object sender, RoutedEventArgs e)
+        {
+            if (MessageBox.Show("Вы уверены, что хотите выйти из аккаунта ESOFT?", "Выйти", MessageBoxButton.YesNo, MessageBoxImage.Question)==MessageBoxResult.Yes)
+            {
+                Pages.Authorization authorization = new Pages.Authorization();
+                authorization.Show();
+                this.Close();
+            }
+            
+        }
     }
 }