예제 #1
0
        // not in use
        private void ResetApplication()
        {
            try
            {
                oResultsLogger = new ResultsLogger();
                iScreenIndex = 0;
                iCurrentMathTestNum = 1;
                iCurrentHatrama = 1;

                // reset all screens
                ((Screen1Opening)Screens[0]).ResetScreen();
                ((Screen2KtivaAlArachim)Screens[1]).ResetScreen();
                ((Screen3HatramaIntro)Screens[2]).ResetScreen();
                ((Screen4Hatrama)Screens[3]).ResetScreen();
                ((Screen5MathIntro)Screens[4]).ResetScreen();
                ((Screen6Math)Screens[5]).ResetScreen();
                ((Screen7Arachim2)Screens[6]).ResetScreen();
                ((Screen8SheelonZminut)Screens[7]).ResetScreen();
                ((Screen9LexicalDecision)Screens[8]).ResetScreen();
                ((Screen11Thunot)Screens[10]).ResetScreen();

                // show first screen
                LoadScreen(1);
            }
            catch { }
        }
예제 #2
0
        private void LoadData()
        {
            try
            {
                TextsGlobal.PathToXml = "xml/TextsGlobal.xml"; //"C:\\Users\\Lior\\documents\\visual studio 2010\\Projects\\Experiment\\Experiment\\xml\\TextsGlobal.xml";
                Testers.PathToXml = "xml/testers.xml"; //"C:\\Users\\Lior\\documents\\visual studio 2010\\Projects\\Experiment\\Experiment\\xml\\testers.xml";
                Preferences.PathToXml = "xml/Preferences.xml";

                mathTestMinutes[0] = int.Parse(Preferences.GetPreference("math1TimeMinuts"));
                mathTestMinutes[1] = int.Parse(Preferences.GetPreference("math2TimeMinuts"));

                oResultsLogger = new ResultsLogger();
                iScreenIndex = 0;
                iCurrentMathTestNum = 1;
                iCurrentHatrama = 1;

                // initialize screens
                Screen1Opening Screen1 = new Screen1Opening();
                Screen2KtivaAlArachim Screen2 = new Screen2KtivaAlArachim();
                Screen3HatramaIntro Screen3 = new Screen3HatramaIntro();
                Screen4Hatrama Screen4 = new Screen4Hatrama();
                Screen5MathIntro Screen5 = new Screen5MathIntro();
                Screen6Math Screen6 = new Screen6Math();
                Screen7Arachim2 Screen7 = new Screen7Arachim2();
                Screen8SheelonZminut Screen8 = new Screen8SheelonZminut();
                Screen9LexicalDecision Screen9 = new Screen9LexicalDecision();
                ScreenLastQuestion ScreenLastQuestion = new Experiment.Screens.ScreenLastQuestion();
                Screen10End Screen10 = new Screen10End();
                Screen11Thunot Screen11 = new Screen11Thunot();
                ScreenHatramaEnd Screen12 = new ScreenHatramaEnd();

                Screen1.Dock = DockStyle.Fill;
                Screen2.Dock = DockStyle.Fill;
                Screen3.Dock = DockStyle.Fill;
                Screen4.Dock = DockStyle.Fill;
                Screen5.Dock = DockStyle.Fill;
                Screen6.Dock = DockStyle.Fill;
                Screen7.Dock = DockStyle.Fill;
                Screen8.Dock = DockStyle.Fill;
                Screen9.Dock = DockStyle.Fill;
                ScreenLastQuestion.Dock = DockStyle.Fill;
                Screen10.Dock = DockStyle.Fill;
                Screen11.Dock = DockStyle.Fill;
                Screen12.Dock = DockStyle.Fill;

                Screen1.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen2.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen3.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen4.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen5.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen6.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen7.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen8.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen9.NextScreen += new NextScreenDelegate(GotoNextScreen);
                ScreenLastQuestion.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen10.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen11.NextScreen += new NextScreenDelegate(GotoNextScreen);
                Screen12.NextScreen += new NextScreenDelegate(GotoNextScreen);

                Screens = new UserControl[] { Screen1, Screen2, Screen3, Screen4, Screen5, Screen6, Screen7, Screen8, Screen9, ScreenLastQuestion, Screen10, Screen12, Screen11 };

                // insert all to main form
                foreach (UserControl uc in Screens)
                {
                    this.Controls.Add(uc);
                }

                // show first screen
                LoadScreen(1);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Problem loading form:" + Environment.NewLine + ex.Message);
            }
        }