コード例 #1
0
ファイル: fMain.cs プロジェクト: atomus-edu/chemtest
        public fMain()
        {
            InitializeComponent();
            ChemTest.ReadSettings();
            if (!ChemTest.rememberPassword)
            {
                fLogin fl = new fLogin();
                if (fl.ShowDialog() == DialogResult.Cancel)
                {
                    Close();
                    Application.Exit();
                }
            }

            fe = new fExam(false);
            ft = new fTraining();
            fs = new fSettings();

            pbLogo.Image       = Image.FromFile(@"sys\img\chemtest logo light blue.png");
            pbBackground.Image = Image.FromFile(@"sys\img\background.jpg");

            bExam.Image           = Image.FromFile(@"sys\img\btn\exam.png");
            bTraining.Image       = Image.FromFile(@"sys\img\btn\training.png");
            btnAddQuestions.Image = Image.FromFile(@"sys\img\btn\add-test.png");
            bSettings.Image       = Image.FromFile(@"sys\img\btn\settings.png");
            bHowToUse.Image       = Image.FromFile(@"sys\img\btn\question.png");
            bAboutUs.Image        = Image.FromFile(@"sys\img\btn\info.png");
            bExit.Image           = Image.FromFile(@"sys\img\btn\exit.png");

            btnBackToMenu.Image = Image.FromFile(@"sys\img\btn\back-small.png");
            btnNewTest.Image    = Image.FromFile(@"sys\img\btn\add-test.png");
            btnEditTest.Image   = Image.FromFile(@"sys\img\btn\edit-test.png");
        }
コード例 #2
0
ファイル: fMain.cs プロジェクト: atomus-edu/chemtest
        private void bTraining_Click(object sender, EventArgs e)
        {
            fSelectTest  st   = new fSelectTest(false);
            DialogResult stdr = st.ShowDialog();

            if (stdr == DialogResult.OK)
            {
                ft.q = st.selectedQuestions;
                ft.ShowDialog();
            }
            else if (stdr == DialogResult.Abort)
            {
                fe   = new fExam(true);
                fe.q = st.selectedQuestions;
                fe.ShowDialog();
            }
            Show();
            ChemTest.ReadSettings();
            fe = new fExam(false);
            ft = new fTraining();
        }