毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

C#高职计算机导论考试系统设计与实现(19)

时间:2016-11-22 23:24来源:毕业论文
} catch (Exception ex) { message = 操作数据库出错!; Console.WriteLine(ex.Message); return false; } finally { // 关闭数据库连接 DBHelper.connection.Close(); } } message = 请选择教师或


                }
                catch (Exception ex)
                {
                    message = "操作数据库出错!";
                    Console.WriteLine(ex.Message);
                    return false;
                }
                finally
                {
                    // 关闭数据库连接
                    DBHelper.connection.Close();
                }
            }
            message = "请选择教师或学生类型登陆";
            return false;
        }
2) 倒计时模块实现源代码
public static int totalSeconds = 2700;
…………………………
private void AnswerQuestionForm_Load(object sender, EventArgs e)
        {
            // 打开计时器
            tmrCostTime.Start();
……………………….
private void tmrCostTime_Tick(object sender, EventArgs e)
        {
            int minute;                        // 当前的分钟
            int second;                        // 秒
            if (QuizHelper.remainSeconds > 0)  // 如果还剩时间
            {
                QuizHelper.remainSeconds--;
                minute = QuizHelper.remainSeconds / 60;
                second = QuizHelper.remainSeconds % 60;
                txtTimer.Text = string.Format("{0:00}:{1:00}",
                                      minute, second); // 控制显示格式
            } C#高职计算机导论考试系统设计与实现(19):http://www.youerw.com/jisuanji/lunwen_182.html
------分隔线----------------------------
推荐内容