Beispiel #1
0
        private void Main_Start(object sender, EventArgs e)
        {
            Main.word.Content = "Please Wait";

            Method = new MethodsForModel();
            int pf = Method.ProverkaCounWordsForFilyter();

            if (pf == 0)
            {
                System.Windows.MessageBox.Show("По вашему фильтру выбрано 0 слов");
                Main.word.Content = "Выберете другой фильтр ! ";
            }
            else
            {
                System.Windows.MessageBox.Show("По вашему фильтру выбрано " + pf + " слов");

                Main.Next.IsEnabled = true;
                Main.Stop.IsEnabled = true;

                Main_NextMain(sender, e);
                Main.Start.IsEnabled = false;
                Main.m.Opacity       = 0.5;
                //   Main.m.IsEnabled = false;
                foreach (var R in RadioButList())
                {
                    R.IsEnabled = true;
                }
            }
        }
Beispiel #2
0
        private void Main_StopMain(object sender, EventArgs e)
        {
            Main.LvL.Content     = null;
            Main.Next.IsEnabled  = false;
            Main.Stop.IsEnabled  = false;
            Main.Start.IsEnabled = true;
            Main.m.Opacity       = 1;
            Method = null;
            foreach (var r in RadioButList())
            {
                r.IsChecked = false;
                r.IsEnabled = false;
                r.Content   = null;
            }
            foreach (var l in LabelList())
            {
                l.Content = null;
            }
            foreach (var s in Stars())
            {
                s.Opacity = 0;
                s.Content = null;
            }
            var builder = new StringBuilder();

            builder.Append("из " + threount[2] + " слов \n").Append("правильно = " + threount[0] + "\n").Append(" неправильно  = " + threount[1] + "\n ").Append(" оставлиные без ответа - " + (threount[2] - threount[0] - threount[1]));
            System.Windows.MessageBox.Show(builder.ToString());
            for (int i = 0; i < 3; i++)
            {
                threount[i] = 0;
            }
            Main.word.Content = "Продолжим?";
        }