Ejemplo n.º 1
0
        /// <summary>
        /// 退出登录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ExitLogin(object sender, RoutedEventArgs e)
        {
            var loginWindow = new LoginWindow(null);

            Application.Current.MainWindow = loginWindow;
            NotifyHelper.UpdateNotifierWindow();
            // 删除用户记录
            SqliteHelper.Exec(db => {
                //db.Execute($"delete from {nameof(User)} where Name='{App.User.Name}'");
                db.Delete(App.User);
            });
            exit();
            loginWindow.Show();
        }