public void SetEndPage() { mPage.clearAll(); LayoutInstruction instruction = new LayoutInstruction(ref mPage.amCanvas); instruction.addTitle(190, 0, "测试结束,请稍作休息进行下一项测试", "KaiTi", 44, System.Windows.Media.Color.FromRgb(255, 255, 255), false); }
public PagePortrailtMemory(MainWindow _mainWindow) { InitializeComponent(); mMainWindow = _mainWindow; this.Focus(); mLayoutInstruction = new LayoutInstruction(ref PortCanvas); mCountDown = new CompCountDown(); mCountDown.FunctionElapsed = autopage_processing; }
/*************************************提示各种限制控制**********************************************/ // public bool _Control_hide = false; public PagePaper(MainWindow _mainWindow) { InitializeComponent(); mMainWindow = _mainWindow; this.Focus(); mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas); mCountDown = new CompCountDown(); mCountDown.FunctionElapsed = auto_processing; tipDisplay(); }
public DigiPointPageTwoControl() { InitializeComponent(); Digitpointtwo.Width = (int)System.Windows.SystemParameters.PrimaryScreenWidth; Digitpointtwo.Height = (int)System.Windows.SystemParameters.PrimaryScreenHeight; _LayoutInstruction = new LayoutInstruction(ref Digitpointtwo); layoutPointOut(); }
public PointPageControl() { InitializeComponent(); Digitpointone.Width = (int)System.Windows.SystemParameters.PrimaryScreenWidth; Digitpointone.Height = (int)System.Windows.SystemParameters.PrimaryScreenHeight; _LayoutInstruction = new LayoutInstruction(ref Digitpointone); }
public PageSymmSpan(MainWindow _mainWindow) { InitializeComponent(); mMainWindow = _mainWindow; mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas); mTestGroupScheme = new int[] { 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8 }; mPracGroupScheme = new int[] { 2, 2 }; interFilename = "inter_" + mMainWindow.mDemography.GenBriefString() + ".txt"; posFilename = "pos_" + mMainWindow.mDemography.GenBriefString() + ".txt"; pracPosFilename = "prac_pos_" + mMainWindow.mDemography.GenBriefString() + ".txt"; pracSymmFilename = "prac_symm_" + mMainWindow.mDemography.GenBriefString() + ".txt"; LoaderSymmSpan loader = new LoaderSymmSpan("SYMM\\sourceIndex.txt", "SYMM\\fixedItems.txt", "SYMM\\locationExe.txt", "SYMM\\fixedSymmExeBaseline.txt"); List <TrailSS_ST> rList = loader.GetResourceList(); if (!mbFixedItems) { RandomSelector testRanSel = new RandomSelector(rList, mTestGroupScheme); mTest = testRanSel.Get(); RandomSelector pracRanSel = new RandomSelector(rList, mPracGroupScheme); mPrac = pracRanSel.Get(); } else { mTest = loader.GetFixedItemGroups(mTestGroupScheme); mPrac = loader.GetFixedComprehExe(mPracGroupScheme); mPracLocation = loader.GetFixedLocationExe(); mPractiseSymm = loader.GetFixedSymmExe(); } mGroupsAnswer = new List <AnswerSSST>(); mStatus = StatusSS.main_title;//test could be from here mTimer = new FEITTimer(); mTimer.Start(); mRecorder = new RecorderSymSpan(this); /*if (!mMainWindow.mDB.TableExists(Names.SYMSPAN_POS_TABLENAME)) * { * mMainWindow.mDB.CreateSymSpanPosTable(mTestGroup.Length); * } * * if (!mMainWindow.mDB.TableExists(Names.SYMSPAN_SYMM_TABLENAME)) * { * mMainWindow.mDB.CreateSymSpanSymmTable(trails.Count); * }*/ }
public void LayStartPage() { mPage.clearAll(); LayoutInstruction li = new LayoutInstruction(ref mPage.amCanvas); li.addTitle(40, 0, "图形联想记忆", "KaiTi", 50, System.Windows.Media.Color.FromRgb(255, 255, 255)); li.addInstruction(200, 0, 800, 300, " 待会儿你会看见一些图形对,左边图形是一个小动物 (十二生肖),右边是一个无意义图形。你需要把两个图形联系起来进行记忆," + "在学习完这些图形对后我们将进行记忆测验。准备好了吗?点击鼠标继续。", "KaiTi", 40, System.Windows.Media.Color.FromRgb(255, 255, 255)); FEITClickableScreen fcs = new FEITClickableScreen(ref mPage.amCanvas, LayStartPage2); }
private void showInstruction() { mPage.ClearAll(); LayoutInstruction li = new LayoutInstruction(ref mPage.mBaseCanvas); //li.addTitle(200, 0, "", "KaiTi", 50, Color.FromRgb(255, 255, 255)); li.addInstruction(240, 0, 570, 200, " 下面先来练习一下记忆属相", "KaiTi", 40, Color.FromRgb(255, 255, 255)); mfNext = showAnimal; CompBtnNextPage btn = new CompBtnNextPage("开始练习"); btn.Add2Page(mPage.mBaseCanvas, FEITStandard.PAGE_BEG_Y + 470); btn.mfOnAction = oneSecBlackScreen; }
public PageOpSpan(MainWindow mainWindow) { InitializeComponent(); mMainWindow = mainWindow; mGroupArrangement = new int[] { 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8 }; mGroupArrangementPrac = new int[] { 2, 2 }; mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas); mRecorder = new RecorderOpSpan(this); mTimer = new FEITTimer(); interFilename = "inter_" + mMainWindow.mDemography.GenBriefString() + ".txt"; orderFilename = "order_" + mMainWindow.mDemography.GenBriefString() + ".txt"; pracMathFilename = "pracMath_" + mMainWindow.mDemography.GenBriefString() + ".txt"; pracOrderFilename = "pracOrder_" + mMainWindow.mDemography.GenBriefString() + ".txt"; }
public void SetReport(long RT, float CorrectRate) { mPage.clearAll(); LayoutInstruction instruction = new LayoutInstruction(ref mPage.amCanvas); if (RT != -1) { instruction.addInstruction(250, 0, 800, 300, " 你的平均反应时是:" + RT.ToString() + "毫秒;你的正确率是:" + (CorrectRate * 100).ToString("0.0") + "%,按空格键继续。", "KaiTi", 38, System.Windows.Media.Color.FromRgb(255, 255, 255)); } else { instruction.addTitle(175, 0, "你没有输入,按空格键继续下一组", "KaiTi", 38, System.Windows.Media.Color.FromRgb(255, 255, 255), false); } }
public PageCube(MainWindow _mainWindow) { InitializeComponent(); mMainWindow = _mainWindow; this.Focus(); mLayoutInstruction = new LayoutInstruction(ref mBaseCanvas); mLines = new List <List <string> >();//存放一套测试结果 // mLines.Capacity = line_num; resline = new List <string>(); mTimer = new FEITTimer(); rtime = new Stopwatch(); tf.Open(); //set record location and file name file_Loca = "Report\\CubeTest_result_file\\" + mMainWindow.mDemography.GenBriefString() + ".txt"; mTabCharter = new TabCharter(file_Loca);//写入硬盘 mCountDownUI = new CompCountDown(); mCountDownUI.FunctionElapsed = goNextQuestion; }
private void showInstruction() { mPage.ClearAll(); LayoutInstruction li = new LayoutInstruction(ref mPage.mBaseCanvas); //li.addTitle(200, 0, "算式练习", "KaiTi", 50, Color.FromRgb(255, 255, 255)); li.addInstruction(200, 0, 638, 400, "下面再来练习一下心算\r\n在完成每一心算题后请尽快单击 \r\n然后判断给出的心算答案是否正确", "KaiTi", 40, Color.FromRgb(255, 255, 255)); CompBtnNextPage btn = new CompBtnNextPage("算好了"); btn.Add2Page(mPage.mBaseCanvas, FEITStandard.PAGE_BEG_Y + 290, 330); btn.mfOnAction = doNothing; mfNext = showEquation; CompBtnNextPage btnGO = new CompBtnNextPage("开始练习"); btnGO.Add2Page(mPage.mBaseCanvas, FEITStandard.PAGE_BEG_Y + 490); btnGO.mfOnAction = oneSecBlackScreen; }
public ExamplePage() { InitializeComponent(); BaseCanvas.Width = (int)System.Windows.SystemParameters.PrimaryScreenWidth; BaseCanvas.Height = (int)System.Windows.SystemParameters.PrimaryScreenHeight; mbordercontrol = new PaperBorderControl(); mBorders = new List <Border>(); mImagecontrol = new PaperImageControl(); mImages = new List <Image>(); mLayoutInstruction = new LayoutInstruction(ref BaseCanvas); mLayoutInstruction.addInstruction(-FEITStandard.PAGE_BEG_Y, -FEITStandard.PAGE_BEG_X, FEITStandard.PAGE_WIDTH / 100 * 81, 140, " 横线上方呈现了折纸和扎孔(扎透了所有的层)的过程,横线下方给出了5种纸被展开后的情况,其中只有一个是正确的答案。" , "Kaiti_GB2312", 30, Color.FromRgb(255, 255, 255)); //窗口布局 Canvas.SetLeft(border1, actual_x + 55); Canvas.SetTop(border1, actual_y + 320); Canvas.SetLeft(label1, actual_x + 609);//正确答案 Canvas.SetTop(label1, actual_y + 595); Canvas.SetLeft(label2, actual_x + 214);//请选择正确答案 Canvas.SetTop(label2, actual_y + 500); Canvas.SetLeft(label3, actual_x + 294);//正确答案 Canvas.SetTop(label3, actual_y + 270); Canvas.SetLeft(label4, actual_x + 433);//正确答案 Canvas.SetTop(label4, actual_y + 270); additem();//练习题目 // for (int i = 0; i < 5; i++) { //border b = mbordercontrol.GenBorder(102, 94); mBorders.Add(b); this.BaseCanvas.Children.Add(b); Canvas.SetTop(b, actual_y + bordertop); Canvas.SetLeft(b, actual_x + borderleft); borderleft = borderleft + borderadd; //image string temp = (i + 1).ToString(); im = new Image(); im.Stretch = Stretch.Fill; System.Drawing.Image pie = System.Drawing.Image.FromFile("Paper\\PaperRes\\Example\\O" + temp + ".bmp"); System.Drawing.Bitmap bmpe = new System.Drawing.Bitmap(pie); IntPtr hBitmape = bmpe.GetHbitmap(); System.Windows.Media.ImageSource WpfBitmape = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBitmape, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight(82, 74));//FromEmptyOptions() 源图像大小 im.Source = WpfBitmape; //im = mImagecontrol.GetImage(82,74); //BitmapImage bitim = new BitmapImage(); //bitim.BeginInit(); //bitim.UriSource = new Uri("/PCAT;component/Images/O" + temp + ".bmp", UriKind.Relative); //bitim.EndInit(); //im.Stretch = Stretch.Fill; //im.Source = bitim; mImages.Add(im); this.BaseCanvas.Children.Add(im); Canvas.SetTop(im, actual_y + imagetop); Canvas.SetLeft(im, actual_x + imageleft); imageleft = imageleft + imageadd; //Event im.MouseDown += new MouseButtonEventHandler(im_MouseDown); im.MouseEnter += new MouseEventHandler(im_MouseEnter); im.MouseLeave += new MouseEventHandler(im_MouseLeave); } }