Beispiel #1
0
 public MainWindow()
 {
     InitializeComponent();
     QueryBD.window = this;
     gr.Children.Add(QueryBD.fr);
     QueryBD.Navigate(QueryBD.log);
 }
 public void Next()
 {
     time     = 0;
     timeWait = 0;
     run      = false;
     if (++current < sors.Count)
     {
         QueryBD.champ.Update(sors[current], current + 1 < sors.Count ? sors[current + 1] : null);
         EndFight.Content = sors[current].Start;
         if (current + 1 < sors.Count)
         {
             BeginNextFight.Content = sors[current + 1].Start;
         }
         UpdateRules();
     }
     else if (current == 0)
     {
         MessageBox.Show("Соревнований нет", "Внимание");
         QueryBD.Navigate2(QueryBD.selectRun);
     }
     else
     {
         MessageBox.Show("Конец", "Внимание");
         QueryBD.Navigate2(QueryBD.selectRun);
     }
 }
Beispiel #3
0
 void Reg_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.reg == null)
     {
         QueryBD.reg = new Registration();
     }
     QueryBD.Navigate(QueryBD.reg);
 }
Beispiel #4
0
 void Uch_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.участник == null)
     {
         QueryBD.участник = new Участники();
     }
     QueryBD.Navigate(QueryBD.участник);
 }
Beispiel #5
0
 void Tat_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.tat == null)
     {
         QueryBD.tat = new Татами();
     }
     QueryBD.Navigate(QueryBD.tat);
 }
Beispiel #6
0
 void WindowCtrl_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.wCtrl == null)
     {
         QueryBD.wCtrl = new WIndowCtrl();
     }
     QueryBD.Navigate(QueryBD.wCtrl);
 }
Beispiel #7
0
 void Button_Click(object o, RoutedEventArgs e)
 {
     QueryBD.user       = null;
     QueryBD.tat        = null;
     QueryBD.гручастник = null;
     QueryBD.участник   = null;
     QueryBD.Navigate(QueryBD.log);
 }
Beispiel #8
0
 void GU_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.гручастник == null)
     {
         QueryBD.гручастник = new ГруппаУчастников();
     }
     QueryBD.Navigate(QueryBD.гручастник);
 }
Beispiel #9
0
 void Reset_Click(object sender, RoutedEventArgs e)
 {
     if (QueryBD.res == null)
     {
         QueryBD.res = new Reset();
     }
     QueryBD.Navigate(QueryBD.res);
 }
Beispiel #10
0
 public WIndowCtrl()
 {
     InitializeComponent();
     grFrame.Children.Add(QueryBD.fr2);
     if (QueryBD.selectRun == null)
     {
         QueryBD.selectRun = new SelectRunChampionat();
     }
     QueryBD.Navigate2(QueryBD.selectRun);
 }
 void Edit_Click(object o, RoutedEventArgs e)
 {
     if (Uch.SelectedItem != null)
     {
         QueryBD.ModeУчастник(Uch.SelectedItem as Uchastnick);
     }
     else
     {
         MessageBox.Show("Выберите участника для модификации");
     }
 }
Beispiel #12
0
 void Button_Click(object o, RoutedEventArgs e)
 {
     if (Tat.SelectedItem != null)
     {
         if (QueryBD.sorev == null)
         {
             QueryBD.sorev = new SorevnovanieShow();
         }
         QueryBD.Navigate2(QueryBD.sorev);
         QueryBD.sorev.Update(Tat.SelectedItem as ChampionatConfig);
     }
 }
Beispiel #13
0
        void Reset_Click(object sender, RoutedEventArgs e)
        {
            if (Login.Text == "" || Password.Password == "" || TryPassword.Password == "" || Password.Password != TryPassword.Password)
            {
                Error.Content = "Error: Entry login, password, email, trypassword, password != trypassword"; return;
            }
            var users = QueryBD.bd.Users.Where(u => u.Login == Login.Text && u.Email == Email.Text);

            if (users.Count() == 0)
            {
                Error.Content = "Error: неверные данные."; return;
            }
            QueryBD.user          = users.First();
            QueryBD.user.Password = QueryBD.GetMd5Hash(Password.Password);
            QueryBD.bd.SaveChanges();
            QueryBD.Navigate(QueryBD.log);
        }
Beispiel #14
0
 void Reg_Click(object sender, RoutedEventArgs e)
 {
     if (Login.Text == "" || Email.Text == "" || Password.Password == "" || TryPassword.Password == "" || Password.Password != TryPassword.Password)
     {
         Error.Content = "Error: Entry login, email, password, trypassword, password != trypassword"; return;
     }
     if (QueryBD.bd.Users.Where(u => u.Login == Login.Text).Count() != 0)
     {
         Error.Content = "Error: такой логин существует."; return;
     }
     QueryBD.user = new User()
     {
         Login = Login.Text, Email = Email.Text, Password = QueryBD.GetMd5Hash(Password.Password)
     };
     QueryBD.bd.Users.Add(QueryBD.user);
     QueryBD.bd.SaveChanges();
     QueryBD.Navigate(QueryBD.log);
 }
Beispiel #15
0
        void Login_Click(object o, RoutedEventArgs e)
        {
            if (login.Text == "" || Password.Password == "")
            {
                return;
            }
            var pass = QueryBD.GetMd5Hash(Password.Password);
            var uses = QueryBD.bd.Users.Where(u => u.Login == login.Text && u.Password == pass);

            if (uses.Count() != 0)
            {
                QueryBD.user = uses.First();
                if (QueryBD.mainctrl == null)
                {
                    QueryBD.mainctrl = new MainCtrl();
                }
                QueryBD.Navigate(QueryBD.mainctrl);
            }
        }
 void Add_Click(object sender, RoutedEventArgs e) => QueryBD.ModeУчастник(null);
Beispiel #17
0
 void Back_Click(object o, RoutedEventArgs e) => QueryBD.Back();
Beispiel #18
0
 void Login_Click(object sender, RoutedEventArgs e) => QueryBD.Navigate(QueryBD.log);