Esempio n. 1
0
        private void tab1Init()
        {
            BotQQ = CQ.Api.GetLoginQQ();

            bindingSource_StudentDB.DataSource = EasOP.GetAll(Convert.ToString(BotQQ.Id));
            dataGridView_StuList.DataSource    = bindingSource_StudentDB;
            stuDataGridView.DataSource         = bindingSource_StudentDB;

            tb_QQ.Text    = ini.Read(AppDirectory + @"\配置.ini", "主人信息", "QQ", "");
            tb_StuID.Text = ini.Read(AppDirectory + @"\配置.ini", "主人信息", "学号", "");
            if (ini.Read(AppDirectory + @"\配置.ini", "主人信息", "教务系统密码", "") != "")
            {
                tb_jwPw.Text = DESTool.Decrypt(ini.Read(AppDirectory + @"\配置.ini", "主人信息", "教务系统密码", ""), "jw*1");
            }

            if (ini.Read(AppDirectory + @"\配置.ini", "成绩提醒", "启动", "") == "真")
            {
                label_sr1.Text = "本人新出成绩提醒:已开启";
            }
            else
            {
                label_sr1.Text = "本人新出成绩提醒:已关闭";
            }

            tb_ReminderTime.Text = ini.Read(AppDirectory + @"\配置.ini", "成绩提醒", "间隔", "");
        }
Esempio n. 2
0
        private void btn_jwlogin_Click(object sender, EventArgs e)
        {
            EasLogin jwxt = new EasLogin(Convert.ToString(BotQQ.Id), tb_QQ.Text, tb_StuID.Text, tb_jwPw.Text, 3);

            try
            {
                if (jwxt.TryLogin() == true)
                {
                    EasGetScore jwscore = new EasGetScore();
                    jwscore.GetScore(jwxt);
                    EasGetCourse jwcourse = new EasGetCourse();
                    jwcourse.GetCourse(jwxt);
                    MessageBox.Show(jwxt.StuName + " " + jwxt.College, "登录成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    bindingSource_StudentDB.DataSource = EasOP.GetAll(Convert.ToString(BotQQ.Id));
                    dataGridView_StuList.DataSource    = bindingSource_StudentDB;

                    //课程表 数据绑定
                    stuDataGridView.DataSource = bindingSource_StudentDB;

                    tab2Init();
                    tab3Init();
                }
            }
            catch (Exception ex)
            {
                if (ex.Message == "密码错误")
                {
                    MessageBox.Show("用户名或密码错误。", "登录失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else if (ex.Message == "验证码错误")
                {
                    MessageBox.Show("验证码错误次数达到上限,可稍后尝试重新登录再试。", "登录失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    throw ex;
                }
            }
        }
Esempio n. 3
0
 private void btn_refreshMainList_Click(object sender, EventArgs e)
 {
     bindingSource_StudentDB.DataSource = EasOP.GetAll(Convert.ToString(BotQQ.Id));
     dataGridView_StuList.DataSource    = bindingSource_StudentDB;
 }
Esempio n. 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     EasOP.DeleteStu(CurrentStuID_jw);
     bindingSource_StudentDB.DataSource = EasOP.GetAll(Convert.ToString(BotQQ.Id));
     dataGridView_StuList.DataSource    = bindingSource_StudentDB;
 }