首 页       用户登录  |  用户注册
设为首页
加入收藏
联系我们
按字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
按声母检索 A B C D E F G H J K L M N O P Q R S T W X Y Z 数字 符号
您的位置: 5VAR论文频道论文中心计算机论文计算机应用
   CAI教学软件中数据的分割      ★★★ 【字体: 】  
CAI教学软件中数据的分割
收集整理:佚名    来源:本站整理  时间:2009-01-10 11:55:35   点击数:[]    

[本篇论文由上帝论文网为您收集整理,上帝论文网http://paper.5var.com将为您整理更多优秀的免费论文,谢谢您的支持]

摘要:        本文使用面向对象的高级语言Visual Basic6.0设计了一套既能编辑,又能应用于教学演示的高级CAI软件。使用本软件,用指定的格式输入CAI数据,并在其中设置断点;同时,用本软件进行播放,可实现模拟教学目的。本文着重论述了如何输入数据、分割数据和显示数据的算法。

Abstract:Using the advanced language Object Oriented -Visual Basic 6.0, the author developed a set of advanced CAI software, which can be used in data editing and teaching. This software can be used to input CAI data in assigned format and set breakpoints. At the mean time, it can be used to display data in order to realize the objective of simulated teaching. This article emphasizes on the algorithm of data input, data split and data display.

随着计算机的普及和网络技术的发展,计算机辅助教学(CAI)越来越受到人们的重视。但纵观目前流行的CAI软件,大多只能进行简单的放映,而不具备编辑能力,为数很少的几个能够编辑的软件,操作又很复杂,不能针对教学特点。基于此,作者设计了一个既能编辑,又能放映的CAI软件,该软件高度集成,易学易用。                                                        
1  数据的输入
      数据的输入采用了类似超文本语言的方法,规定了若干关键字。如:“/”表示一个特定的指令的开始;又如:“/titl^2、光的性质^”,titl:表示后边的内容是一条标题,位于“^……^”之间的数据为标题的内容,“^”为范围限定符。
所有的符号都可以在编辑状态下的屏幕上找到。如图一是编辑状态的一角,左边          图 1  编辑状态
为文字区,右边为指令区。                       Fig.1  edit status                                        2  数据的分割                          
数据的分割分为两个步骤进行:                   
第一步:把文章以字形为根据分解成段落。字形的标识与命令标识相关。
程序如下:                       
'把整个一页分成若个段落
Public Sub FunDivide(ByRef SourceStr As String, ByRef Destination As String, ByRef Position As Integer, ByRef propName As String)
Dim ControllCode As String
Dim codCommand As String
                                                                         1
    Dim ss As String
    Dim SourceLen As Long
   
SourceLen = Len(SourceStr)
    Destination = ""
   
    ControllCode = Mid(SourceStr, Position, 1)
    If (ControllCode = "/") Then
        Position = Position + 1
        codCommand = Mid(SourceStr, Position, 4)
        propName = codCommand
        Position = Position + 4
        codCommand = Mid(SourceStr, Position, 1)
       If codCommand = "^" Then
            Position = Position + 1
            ss = Mid(SourceStr, Position, 1)
            Do While ss <> "^"
                ss = Mid(SourceStr, Position, 1
                If ss <> "^" Then
                    Destination = Destination + ss
                   
                End If
                Position = Position + 1
               
            Loop
        End If
    End If
End Sub
第二步:把段落分别地分成一行一行,为向标签框内填充作准备。分行的依据是除去控件和图形的区域。图形位于右上角,用一条水平线和竖直线来分界。
'分段为块
Public Sub LineDivide(ByRef afterDivide As String, ByVal Source As String, ByVal ScaleLO As Integer)
    Dim LL As Integer
    Dim Ls As String
    Dim start As Integer
    start = 1
    LL = Len(Source)
    Do
        Ls = Mid(Source, start, ScaleLO)
        start = start + ScaleLO
        If afterDivide = "" Then
afterDivide = Ls
                                                                2
        Else
            afterDivide = afterDivide + Chr(13) + Chr(10) + Ls
        End If
    Loop While (start <= LL)
End Sub

这两个全局函数位于标准模块basCommFun.bas中,同时,在该模块中定义了许多全局变量和常量,用来监控程序的运行状态。如:
Option Explicit

Public jobStatus As Integer     'jobStatus=0 第一界面状态
                                'jobStatus=1 编辑界面模式
                                'jobStatus=2 教学界面模式
Public Const Margin = 50
                               
Public Const ZLF = 180      '小五号字的大小Twip
Public Const ZF = 210       '五号字的大小Twip。正常显示内容。
Public Const ZLFo = 240     '小四号字的大小Twip
Public Const ZFo = 285      '四号字的大小Twip
Public Const ZLT = 300      '小三号字的大小Twip。标题。
Public Const ZT = 315       '三号字的大小Twip
3 数据的演示
在数据显示时,首先在窗体上放置若干个标签框和四个图片框,并使他们处于不可见状态。在运行编辑时,显示用的控件都不可见;在运行演示时,编辑用的控件都不可见。通过控制变量jobStatus来实现这种功能。
显示程序如下:
Private Sub cmdPreview_Click()
    Dim dspContent(2, 10) As String
    Dim Counter As Integer
    Dim JJ As Integer
    Dim picLeftside As Integer
    Dim picBottom As Integer
    Dim chrNum As Integer
   
    picLeftside = 0
    picBottom = 0
    Dim LsStr As String
    picLeftside =                          
frmMainForm.Width                                图 2    运行状态
picBottom = frmMainForm.Top                    Fig 2    run status
Counter = 0                               
For JJ = 0 To 3                               
   If picFigure(JJ).Picture Then                 
                                                                         3
            With frmMainForm
                .picFigure(JJ).Left = .Width - Margin – 100 - picFigure(JJ).Width
                .picFigure(JJ).Visible = True
                If JJ = 0 Then
                    picFigure(JJ).Top =

[1] [2]  下一页


Tags:


文章转载请注明来源于:5VAR论文频道 http://paper.5var.com。本站内容整理自互联网,如有问题或合作请Email至:support@5var.com
或联系QQ37750965
提供人:佚名
  • 上一篇文章:使用OLE DB和ADO调用返回记录集的Oracle存储过程

  • 下一篇文章:基于VFP自动组卷的设计与实现
  • 返回上一页】【打 印】【关闭窗口
    中查找“CAI教学软件中数据的分割”更多相关内容 5VAR论文频道
    中查找“CAI教学软件中数据的分割”更多相关内容 5VAR论文频道
    最新热点 最新推荐 相关新闻
  • ››Delphi 5 数据库应用中ODBC数据源的...
  • ››用Visual Basic 6.0实现自动化测试...
  • ››用JAVA制作ICQ
  • ››在IIS 4.0上配置虚拟主机实现虚拟I...
  • ››利用VB开发CAI课件
  • ››基于GP算法的知识发现系统
  • ››基于Client/Server 的课件系统的设...
  • ››WWW对大量数据查询的一种实现
  • ››基于PHP的Web数据库访问
  • ››Developer/2000中的Forms参数及应用...
  • ››CAI教学软件中数据的分割
  •   文章-网友评论:(评论内容只代表网友观点,与本站立场无关!)
    关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图
    Copyright © 2006-2033 5Var.Com. All Rights Reserved .