Esempio n. 1
0
 public btCHSTRAS_091_Teach(btSHFUserLogin shfUserLogin, btSHFUnitPractice shfUnitPratice)
 {
     this.shfUserLogin = shfUserLogin;
     file = new btCHSTRAS_091_File();
     database = new btCHSTRAS_091_Database();
     btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base();
     String[] columns = new String[] { "ProgramID", "PageID" };
     String where = "ProgramID=" + bt.getPagesID(shfUnitPratice);
     readerPages = database.query("E_SHFPages", columns, where, null);
     total = database.getSize();
     itemLearned = -1;
     itemCurrent = -1;
     arrayList = new ArrayList();
     startTime = DateTime.Now;
 }
Esempio n. 2
0
 public btCHSTRAS_091_Link(btSHFUserLogin shfUserLogin, btSHFUnitPractice shfUnitPratice)
 {
     this.shfUserLogin = shfUserLogin;
     this.shfUnitPratice = shfUnitPratice;
     btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base();
     int programID = bt.getPagesID(shfUnitPratice);
     btCHSTRAS_091_Database database = new btCHSTRAS_091_Database();
     String where = "ProgramID=" + programID;
     String[] selection = new String[] { "TextInfo", "ImageInfo" };
     reader = database.query("E_SHFPages", selection, where, null);
     unit = new btCHSTRAS_091_Unit(DateTime.Now, database.getSize(), shfUserLogin, shfUnitPratice);
     item = new btCHSTRAS_091_Item(shfUserLogin, shfUnitPratice);
     texts = new String[4];
     images = new String[4];
 }
 public btCHSTRAS_091_Question(btSHFUnitPractice unitPractice,
     int courseType)
 {
     btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base();
     file = new btCHSTRAS_091_File();
     int pageID = bt.getPagesID(unitPractice);
     database = new btCHSTRAS_091_Database();
     String where = "QuestionType=" + pageID + " AND " +
         "QuestionTag=\'" + courseType + "\'";
     String[] columns = new String[] {"QuestionID", "QuestionDiff",
         "QuestionScore", "AverageTime", "QuestionSubject",
         "Question","QuestionSolution", "QuestionAnswer"};
     reader = database.query("E_SHFQuestions", columns, where, null);
     angry = file.getImage("angry.gif");
     happy = file.getImage("happy.gif");
 }
Esempio n. 4
0
 public uiCHSTRAS_091_Base(Form callForm, btSHFUserLogin callLog, btSHFUnitPractice callUnit)
     : base(callForm, callLog, callUnit)
 {
     InitializeComponent();
     times = new btCHSTRAS_091_Time();
     btCHSTRAS_091_Base bt = new btCHSTRAS_091_Base();
     String title = callUnit.UnitPracticeName;
     this.Text = title;
     this.labelPageTitle.Text = title;
     this.label课程信息.Text = bt.getClassInfo(callUnit);
     this.label程序信息.Text = bt.getProgramInfo(callUnit);
     startTime = DateTime.Now;
     this.labelBegin.Text += times.getTime(startTime);
     answeredNum = 1;
     this.labelAnswered.Text += answeredNum;
     this.timer1.Enabled = true;
 }