| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 | using PunkHPX8_MainPages.Unity;using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Reflection;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;namespace PunkHPX8_MainPages.Views{    /// <summary>    /// LogoutView.xaml 的交互逻辑    /// </summary>    public partial class LogoutView : Window    {        public LogoutView()        {            InitializeComponent();            userTextBlock.Text = GlobalUser.Instance.User.Name;            passwordTextBlock.Text = "******";            roleTextBlock.Text = GlobalUser.Instance.User.Role.ToString();        }        private void Close_Click(object sender, RoutedEventArgs e)        {            this.Close();        }        private void Login_Click(object sender, RoutedEventArgs e)        {            Logout();        }        private void PassWordTextBox_KeyDown(object sender, KeyEventArgs e)        {            if (e.Key == Key.Return)            {                Logout();            }        }        private void Logout()        {            GlobalLogin.Instance.ReLogin = true;        }        private void Window_Closed(object sender, EventArgs e)        {            this.Closed -= Window_Closed;            this.logButton.Click -= Login_Click;            this.closeButton.Click -= Close_Click;        }    }}
 |