private void Label_MouseDown(object sender, MouseButtonEventArgs e) { auth auth = new auth(); auth.Show(); this.Close(); }
private void MenuItem_Click(object sender, RoutedEventArgs e) { App.CurrentUser = null; auth T = new auth(); T.Show(); this.Close(); }
private void ButReg_Click(object sender, RoutedEventArgs e) { using (USERContext Users = new USERContext()) { if (validate(this, null)) { USER check = Users.Users.Find(Log.Text); if (check == null) { USER T = new USER(Log.Text, (Pass.Password).GetHashCode().ToString(), (bool)IsAlter.IsChecked ? 1 : 0); Users.Users.Add(T); Users.SaveChanges(); auth auth = new auth(); auth.Show(); this.Close(); } else { LoginCheck.Opacity = 1; Log.BorderBrush = new SolidColorBrush(Colors.Red); } } } }