Example #1
0
        private void Label_MouseDown(object sender, MouseButtonEventArgs e)
        {
            auth auth = new auth();

            auth.Show();
            this.Close();
        }
Example #2
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            App.CurrentUser = null;
            auth T = new auth();

            T.Show();
            this.Close();
        }
Example #3
0
 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);
             }
         }
     }
 }