示例#1
0
 public void Next()
 {
     time     = 0;
     timeWait = 0;
     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);
     }
 }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     QueryBD.window = this;
     gr.Children.Add(QueryBD.fr);
     QueryBD.Navigate(QueryBD.log);
 }
示例#3
0
 void GU_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.гручастник == null)
     {
         QueryBD.гручастник = new ГруппаУчастников();
     }
     QueryBD.Navigate(QueryBD.гручастник);
 }
示例#4
0
 void Uch_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.участник == null)
     {
         QueryBD.участник = new Участники();
     }
     QueryBD.Navigate(QueryBD.участник);
 }
示例#5
0
 void Reg_Click(object sender, RoutedEventArgs e)
 {
     if (QueryBD.reg == null)
     {
         QueryBD.reg = new Registration();
     }
     QueryBD.Navigate(QueryBD.reg);
 }
示例#6
0
 void Button_Click(object o, RoutedEventArgs e)
 {
     QueryBD.user       = null;
     QueryBD.tat        = null;
     QueryBD.гручастник = null;
     QueryBD.участник   = null;
     QueryBD.Navigate(QueryBD.log);
 }
示例#7
0
 void WindowCtrl_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.wCtrl == null)
     {
         QueryBD.wCtrl = new WIndowCtrl();
     }
     QueryBD.Navigate(QueryBD.wCtrl);
 }
示例#8
0
 void Reset_Click(object sender, RoutedEventArgs e)
 {
     if (QueryBD.res == null)
     {
         QueryBD.res = new Reset();
     }
     QueryBD.Navigate(QueryBD.res);
 }
示例#9
0
 void Tat_Click(object o, RoutedEventArgs e)
 {
     if (QueryBD.tat == null)
     {
         QueryBD.tat = new Татами();
     }
     QueryBD.Navigate(QueryBD.tat);
 }
示例#10
0
 public WIndowCtrl()
 {
     InitializeComponent();
     grFrame.Children.Add(QueryBD.fr2);
     if (QueryBD.selectRun == null)
     {
         QueryBD.selectRun = new SelectRunChampionat();
     }
     QueryBD.Navigate2(QueryBD.selectRun);
 }
示例#11
0
 void Edit_Click(object o, RoutedEventArgs e)
 {
     if (Uch.SelectedItem != null)
     {
         QueryBD.ModeУчастник(Uch.SelectedItem as participants);
     }
     else
     {
         MessageBox.Show("Выберите участника для модификации");
     }
 }
示例#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);
     }
 }
示例#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.User.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);
        }
示例#14
0
        void Login_Click(object o, RoutedEventArgs e)
        {
            if (login.Text == "" || Password.Password == "")
            {
                return;
            }
            var pass = QueryBD.GetMd5Hash(Password.Password);

            if (QueryBD.bd.User.Where(u => u.Login == login.Text && u.Password == pass).Count() != 0)
            {
                if (QueryBD.mainctrl == null)
                {
                    QueryBD.mainctrl = new MainCtrl();
                }
                QueryBD.Navigate(QueryBD.mainctrl);
            }
        }
示例#15
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.User.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.User.Add(QueryBD.user);
     QueryBD.bd.SaveChanges();
     QueryBD.Navigate(QueryBD.log);
 }
示例#16
0
 void Login_Click(object sender, RoutedEventArgs e) => QueryBD.Navigate(QueryBD.log);
示例#17
0
 void Add_Click(object sender, RoutedEventArgs e) => QueryBD.ModeУчастник(null);
示例#18
0
 void Back_Click(object o, RoutedEventArgs e) => QueryBD.Back();