VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00000000&
   Caption         =   "Операционная система"
   ClientHeight    =   9075
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11745
   BeginProperty Font 
      Name            =   "Courier New"
      Size            =   11.25
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H00FFFF80&
   Icon            =   "Операционная система.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   Picture         =   "Операционная система.frx":0442
   ScaleHeight     =   605
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   783
   StartUpPosition =   3  'Windows Default
   Begin VB.OptionButton Option3 
      BackColor       =   &H00000000&
      Caption         =   "5 мин"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   9600
      TabIndex        =   17
      Top             =   4200
      Width           =   1095
   End
   Begin VB.OptionButton Option2 
      BackColor       =   &H00000000&
      Caption         =   "2 мин"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   8400
      TabIndex        =   16
      Top             =   4200
      Width           =   1095
   End
   Begin VB.OptionButton Option1 
      BackColor       =   &H00000000&
      Caption         =   "1 мин"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   7200
      TabIndex        =   15
      Top             =   4200
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   11.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Left            =   8760
      MultiLine       =   -1  'True
      TabIndex        =   14
      Top             =   720
      Width           =   2535
   End
   Begin VB.Timer Timer1 
      Interval        =   1
      Left            =   10800
      Top             =   240
   End
   Begin VB.CheckBox Check3 
      Caption         =   "Check3"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Left            =   7560
      TabIndex        =   13
      Top             =   8160
      Width           =   255
   End
   Begin VB.CheckBox Check4 
      Caption         =   "Check4"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   5040
      TabIndex        =   10
      Top             =   8160
      Width           =   255
   End
   Begin VB.CommandButton Command6 
      Caption         =   "Тест2 выбор"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4560
      TabIndex        =   9
      Top             =   7440
      Width           =   1215
   End
   Begin VB.ListBox List2 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0;(0)"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1049
         SubFormatType   =   1
      EndProperty
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2670
      ItemData        =   "Операционная система.frx":899CA
      Left            =   120
      List            =   "Операционная система.frx":899CC
      TabIndex        =   8
      Top             =   4560
      Width           =   11535
   End
   Begin VB.ListBox List1 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1049
         SubFormatType   =   1
      EndProperty
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2190
      ItemData        =   "Операционная система.frx":899CE
      Left            =   120
      List            =   "Операционная система.frx":899D0
      TabIndex        =   7
      Top             =   1920
      Width           =   11535
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Справка"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   9360
      MaskColor       =   &H8000000F&
      TabIndex        =   6
      Top             =   7440
      Width           =   1215
   End
   Begin VB.CheckBox Check2 
      Caption         =   "Check2"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2760
      TabIndex        =   5
      Top             =   8160
      Width           =   255
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Check1"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   8160
      Width           =   255
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Выход"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   9360
      TabIndex        =   3
      Top             =   7920
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Результат"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6960
      TabIndex        =   2
      Top             =   7440
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Тест1 да/нет"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2280
      TabIndex        =   1
      Top             =   7440
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Обучение"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   240
      TabIndex        =   0
      Top             =   7440
      Width           =   1215
   End
   Begin VB.Label Label2 
      BackColor       =   &H00000000&
      Caption         =   "Ответы"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   240
      TabIndex        =   12
      Top             =   4200
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label Label1 
      BackColor       =   &H00000000&
      Caption         =   "Вопросы"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   240
      TabIndex        =   11
      Top             =   1560
      Visible         =   0   'False
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim zvezda(0 To 30) As String, inf, sozv(0 To 30) As String, fo As Single
Dim otv1(0 To 20) As String, otv(0 To 20) As Integer, protv As Integer, i As Integer, info As String, old(0 To 20) As Integer
Dim fl3 As Boolean, fl1 As Boolean, fl2 As Boolean, j As Integer, t As Integer, covp As Integer, rez As Single, oz As String, osh As Integer, k As Integer
Dim cw As Long, kk As Integer, uch(0 To 20) As Integer, um1(0 To 20) As Integer, um2(0 To 20) As Integer, itogo As Integer, r As Integer

Private Sub Check1_Click()
  If Option3.Value = False And Option1.Value = False And Option2.Value = False Then
 Command1.Enabled = False
 Command2.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False
  Form1.Cls
  ForeColor = 255
  FontSize = 14
  FontBold = True
  Form1.Print "Выберите уровень!"
  ForeColor = 16777088
  FontBold = False
  Else
   Command1.Enabled = True
 Command2.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False

 End If
If Check1.Value = 0 Then Command1.Enabled = False
 Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
fo = Time
Text1.Visible = True

End Sub

Private Sub Check2_Click()
  If Option3.Value = False And Option1.Value = False And Option2.Value = False Then
 Command2.Enabled = False
 Command1.Enabled = False
 Command3.Enabled = False
  Command6.Enabled = False
  Form1.Cls
  ForeColor = 255
  FontSize = 14
  FontBold = True
  Form1.Print "Выберите уровень!"
ForeColor = 16777088

  FontBold = False
  Else
     Command2.Enabled = True
 Command1.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False

 End If

If Check2.Value = 0 Then Command2.Enabled = False

 Check1.Value = 0
Check3.Value = 0
Check4.Value = 0
fo = Time
Text1.Visible = True

End Sub

Private Sub Check3_Click()
 Command3.Enabled = True
 
 Command2.Enabled = False
 Command1.Enabled = False
 Command6.Enabled = False
 If Check3.Value = 0 Then Command3.Enabled = False
Label2.Visible = True
Label1.Visible = True

Check4.Value = 0
Check2.Value = 0
Check1.Value = 0

End Sub

Private Sub Combo1_Change()

End Sub

Private Sub Check4_Click()
  If Option3.Value = False And Option1.Value = False And Option2.Value = False Then
 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = False
  Form1.Cls
  ForeColor = 255
  FontSize = 14
  FontBold = True
  Form1.Print "Выберите уровень!"
  ForeColor = 16777088
  FontBold = False
  Else
     Command6.Enabled = True
 Command2.Enabled = False
 Command3.Enabled = False
 Command1.Enabled = False

 End If

 If Check4.Value = 0 Then Command6.Enabled = False

 Check2.Value = 0
Check1.Value = 0
Check3.Value = 0
fo = Time
Text1.Visible = True

End Sub

Private Sub Command1_Click()
List1.Enabled = True
List2.Enabled = False
List2.Height = 180
itogo = 0
List2.FontBold = False
List2.FontSize = 11
osh = 0
protv = 0
fo = Time
Label2.Visible = True
Label1.Visible = True
Form1.Cls
If Command1.Enabled = True Then
Check2.Value = 0
Check3.Value = 0
List1.Visible = True
List2.Visible = True
kk = 0
covp = 0
oz = ""
rez = 0
For i = 0 To 16
old(i) = 0
Next
k = 0

fl1 = 0
fl2 = 0
List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11
List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11

For i = 0 To 16
List1.AddItem zvezda(i)
Next
For i = 0 To 16
List2.AddItem sozv(i)
Next
End If
Check1.Value = 1
 Command1.Enabled = False

End Sub

Private Sub Command2_Click()
Dim info As String
itogo = 0
List1.Enabled = False
List2.Enabled = False
List1.Visible = False
List2.Visible = False
itogo = 0
List2.FontBold = False
List2.FontSize = 11
osh = 0
protv = 0
fo = Time
Label2.Visible = True
Label1.Visible = True
Form1.Cls

 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = True
 Command6.Enabled = False

If zvezda(1) = "" Then GoTo 3

If Command2.Enabled = True Then
Check1.Value = 0
Check3.Value = 0
k = k + 1
Randomize (Timer)
kk = 0
covp = 0
oz = ""
rez = 0

For i = 0 To 16
old(i) = 0
Next

For i = 0 To 15
Form1.ForeColor = 4444444
Form1.FontSize = 12
Form1.FontBold = True
Form1.Cls
Form1.Print zvezda(i)
itogo = i
1 j = Int(Rnd * 16 - i) + i
fl1 = 0

For t = 0 To i
If j = old(t) Then fl1 = 1
Next

If fl1 = 0 Then old(i) = j Else GoTo 1
Form1.ForeColor = 7444444

Form1.Print sozv(j)

otv1(i) = InputBox("да - 1 или нет - 0")
otv(i) = Val(otv1(i))
If j = i Then
covp = covp + 1
End If

If j = i And otv(i) = 1 Then
protv = protv + 1
End If

If j <> i And otv(i) = 0 Then
protv = protv + 1
End If

If (j <> i And otv(i) = 1) Or (j = i And otv(i) = 0) Then
osh = osh + 1
End If
Next
End If
Form1.FontBold = False
3 If zvezda(1) = "" Then
info = "Нажмите клавишу ОБУЧЕНИЕ"
List2.AddItem info
End If
 Command3.Enabled = True
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = False
List1.Enabled = True
List2.Enabled = True
List1.Visible = True
List2.Visible = True
Check2.Value = 1
End Sub

Private Sub Command3_Click()
Dim Stra As String
List2.Height = 180
List1.Visible = False
List2.Visible = False

Label2.Visible = False
Label1.Visible = False

Text1.Visible = False
List1.Enabled = True
List2.Enabled = True
Check4.Enabled = True
Check1.Enabled = True
Check2.Enabled = True

inf = "1:00:00"
'Option3.Value = False
'Option2.Value = False
'Option1.Value = False

If Check4.Value = 1 Then
 Command1.Enabled = False
 Command2.Enabled = False
 'Command6.Enabled = False

End If
If Check1.Value = 1 Then
 Command6.Enabled = False
 Command2.Enabled = False
 'Command1.Enabled = False
End If
If Check2.Value = 1 Then
 Command6.Enabled = False
 Command1.Enabled = False
 'Command2.Enabled = False
End If

Form1.Cls
Form1.ForeColor = &HFFFF80
Form1.FontSize = 11

List2.Clear
List1.Clear
If zvezda(1) = "" And otv1(1) = "" Then GoTo 4
'If fl1 = False And fl2 = False Then GoTo 4

kk = 0
List2.FontSize = 11
'List2.FontBold = True
List1.ForeColor = 255

If itogo >= 16 Then
If Command2 = True Then
protv = 0
osh = 0
End If

For i = 0 To 16
kk = kk + 1
List1.AddItem zvezda(i)
List2.ForeColor = 7444444

If Command2 = True Then
info = sozv(i) + Str(otv(i))
End If

If Check4.Value = 1 Or Check1.Value = 1 Then
'Form1.Print otv(um2(kk))
info = sozv(i) + Str(otv(um2(kk)))
End If
List2.AddItem info 'sozv(i)
Form1.Print info
info = ""
Next
Form1.ForeColor = 255
Form1.FontSize = 14

If covp <> 0 And (Check4.Value = 1 Or Check1.Value = 1) Then
List2.ForeColor = 255
Stra = Str(covp) + " cовпало"
List2.AddItem Stra

Form1.Print Stra

rez = protv / 16 * 100
End If

If covp <> 0 And Check2.Value = 1 Then
List2.ForeColor = 255
Stra = Str(covp) + " cовпало"
List2.AddItem Stra
Form1.Print Stra

rez = protv / 16 * 100
End If

If covp = 0 And Check2.Value = 1 Then
Stra = "Совпадений "
List1.AddItem Stra
Form1.Print Stra

Stra = "не было"
List1.AddItem Stra
Form1.Print Stra

rez = 100
End If

If covp = 0 And (Check4.Value = 1 Or Check1.Value = 1) Then
Stra = "Совпадений "
List1.AddItem Stra
Form1.Print Stra

Stra = "не было"
List1.AddItem Stra
Form1.Print Stra

rez = 0

For i = 0 To 16
otv(i) = 0
Next

End If

List2.ForeColor = 4444444

If rez = 100 Then oz = "5"
If rez < 100 And rez >= 80 Then oz = "4"
If rez < 80 And rez >= 50 Then oz = "3"
If rez < 50 And rez >= 30 Then oz = "2"
If rez < 30 And rez >= 0 Then oz = "1"

List2.ForeColor = 255
Stra = Str(rez) + "%" + " правильных ответов,"
List2.AddItem Stra

Form1.Print Stra

Stra = " ошибок - " + Str(osh)
Form1.Print Stra,

List2.AddItem Stra
List2.FontSize = 14
Stra = "оценка " + oz
List2.AddItem Stra
Form1.Print Stra

Else
Form1.ForeColor = 255
Form1.FontSize = 14
Stra = "Должно быть 16 ответов"
List2.AddItem Stra
Form1.Print Stra

4 If zvezda(1) = "" Then

info = "Ишь чего захотел."
Form1.Print info
info = "Нажмите клавишу ОБУЧЕНИЕ"
Form1.Print info
info = "затем клавишу ТЕСТ"
Form1.Print info
End If
End If
Command3.Enabled = True
 Command2.Enabled = False
 Command1.Enabled = False
 Command6.Enabled = False
 Form1.ForeColor = &HFFFF80

 'If Check3.Value = 1 Then GoTo 55
'itogo = 0
'List2.FontBold = False
'List2.FontSize = 11
'osh = 0
'protv = 0
55 '
Option3.Enabled = True
Option1.Enabled = True
Option2.Enabled = True

End Sub

Private Sub Command4_Click()

List1.Clear
List2.Clear
List1.Visible = False
List2.Visible = False
End
End Sub

Private Sub Command5_Click()
Dim Stra As String
List1.Visible = True
List2.Visible = True
List1.Enabled = True
List2.Enabled = True

List1.Clear
List2.Clear
List2.FontSize = 12
List2.ForeColor = 4444444

If fl1 = False And fl2 = False Then
Stra = "Нажимай кнопки и работай, "
List2.AddItem Stra
Stra = "работай и работай!"
List2.AddItem Stra
Else
List2.ForeColor = 255
List2.FontBold = True
Stra = "Сказано же, "
List2.AddItem Stra
Stra = "работай и работай!"
List2.AddItem Stra
End If
Stra = "Для ТЕСТ1 при совпадении"
List2.AddItem Stra
Stra = "введите 1-да, либо 0-нет"
List2.AddItem Stra
List2.ForeColor = 25555
Stra = "Для ТЕСТ2 кликни мышкой"
List2.AddItem Stra
Stra = "сначала вопрос,"
List2.AddItem Stra
Stra = "затем ответ."
List2.AddItem Stra

List2.FontBold = False
fl1 = True
End Sub

Private Sub Command6_Click()

Dim info As String
List2.Height = 180
itogo = 0
List2.FontBold = False
List2.FontSize = 11
osh = 0
protv = 0
fo = Time
Label2.Visible = True
Label1.Visible = True

List1.Enabled = True
List2.Enabled = False
Form1.Cls

 Command3.Enabled = False
 Command1.Enabled = False
 Command2.Enabled = False
 Command6.Enabled = True
kk = 0
covp = 0
oz = ""
rez = 0
Randomize (Timer)
i = 0
t = 0
For i = 0 To 16
10 j = Int(Rnd * 18) + 1
fl1 = False
For t = 0 To i
If j = old(t) Then fl1 = 1
Next
If fl1 = False And j <= 16 Then old(i) = j Else: GoTo 10
Next
List2.Clear

info = ""
For i = 0 To 16
List1.AddItem info = ""
List2.AddItem info = ""
Next

k = 0
fl1 = False
fl2 = False
List1.Visible = True
List2.Visible = True
If zvezda(1) = "" Then GoTo 5
If Command6.Enabled = True Then
Check1.Value = 0
Check3.Value = 0
Check2.Value = 0

List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11

List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11
kk = 0
For i = 0 To 16
List1.AddItem zvezda(i)
List2.AddItem sozv(old(i))
Next
For i = 0 To 16
kk = i
um2(kk) = old(i)
Next
End If

5 If zvezda(1) = "" Then
info = "Нажмите клавишу ОБУЧЕНИЕ"
List2.AddItem info
End If
 Command6.Enabled = False
Check4.Value = 1
End Sub

Private Sub Form_DblClick()
If fl3 = False Then
Command2.Visible = True
Command1.Visible = True
Command3.Visible = True
Command6.Visible = True
List2.Visible = True
List1.Visible = True
Label1.Visible = True
Label2.Visible = True
Text1.Visible = True
fl3 = True
Else
Command2.Visible = False
Command1.Visible = False
Command3.Visible = False
Command6.Visible = False
List2.Visible = False
List1.Visible = False
Label1.Visible = False
Label2.Visible = False
fl3 = False
Command3 = True
Text1.Visible = False
End If
kk = 1
End Sub

Private Sub Form_Load()
 Check3.Visible = False
Command2.Enabled = False
 Command1.Enabled = False
 Command3.Enabled = False
 Command6.Enabled = False
 List2.Enabled = False
  Option3.Value = False
  Option1.Value = False
  Option2.Value = False
 osh = 0
 protv = 0
fl3 = False
kk = 0
covp = 0
oz = ""
rez = 0
r = 0
For i = 0 To 16
old(i) = 0
otv(i) = 0
Next
k = 0
fl1 = 0
fl2 = 0

List1.Clear
List1.ForeColor = 5444444
List1.FontSize = 11

Open "ОС_в.txt" For Input As #1
i = 0
Do Until EOF(1)
Input #1, zvezda(i)
i = i + 1
r = i
Loop
Close #1

List2.Clear
List2.ForeColor = 6444
List2.FontSize = 11

Open "ОС_о.txt" For Input As #2
i = 0
Do Until EOF(2)
Input #2, sozv(i)
i = i + 1
Loop
Close #2

List1.Visible = False
List2.Visible = False
fo = Time
inf = "1:00:00"
Text1.ZOrder
End Sub

Private Sub List1_Click()
If itogo >= 16 Then GoTo 20

Form1.Cls
itogo = itogo + 1
If itogo > 16 Then itogo = 16

If (fl1 = False And fl2 = False) And Check4.Value = 1 Then
k = List1.ListIndex
um1(k) = List1.ListIndex
Form1.Print zvezda(k)
fl1 = True
Else
k = List1.ListIndex
um1(k) = List1.ListIndex
Form1.Print zvezda(k); k
fl1 = True
End If
List2.Enabled = True
List1.Enabled = False
If fl1 = True And fl2 = True Then
fl1 = False
fl2 = False
info = ""
End If

'List1.RemoveItem (List1.ListIndex)
20 '
End Sub

Private Sub List2_Click()
If itogo > 16 Then GoTo 30

If (fl1 = True And fl2 = False) And Check4.Value = 1 Then

kk = (List2.ListIndex)
fl2 = True
End If

If (fl1 = True And fl2 = False) And (Check1.Value = 1 Or Check2.Value = 1) Then

kk = (List2.ListIndex)
um2(kk) = (List2.ListIndex)
If sozv(um1(k)) = sozv(um2(kk)) Then
 fl2 = True
 protv = protv + 1
 otv(k) = 1
 covp = covp + 1
 Form1.Print sozv(um2(kk)); " верно"
 Else
 osh = 16 - protv
 otv(k) = 0
 kk = (List2.ListIndex)
 um2(kk) = (List2.ListIndex)
 fl2 = True
End If
 '
End If
 
'If sozv(um1(k)) = sozv(um2(kk)) Then
 'Else
'End If

If fl1 = True And fl2 = True Then
fl1 = False
fl2 = False
info = ""
End If
If itogo >= 16 Then
fl1 = True
fl2 = True
Form1.Cls
Form1.Print "всё"
Form1.Print protv, covp
Command3.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command6.Enabled = False
List2.Enabled = False

Else
 'Form1.Print sozv(um2(kk))
Form1.Print itogo
List2.Enabled = False
List1.Enabled = True

End If
30 '
End Sub

Private Sub Option1_Click()
inf = "0:00:60"
fo = Time
Option2.Enabled = False
Option3.Enabled = False
End Sub

Private Sub Option2_Click()
inf = "0:02:00"
fo = Time
Option3.Enabled = False
Option1.Enabled = False

End Sub

Private Sub Option3_Click()
inf = "0:05:00"
fo = Time
Option1.Enabled = False
Option2.Enabled = False

End Sub

Private Sub Timer1_Timer()
Text1.Text = "Дата " + Str(Date) + "    " + "Время " + Str(Time) + "   " + "Время работы " + Str(Time - fo)
If Str(Time - fo) >= inf Then
Form1.Cls
Form1.Print "Ваше время истекло. Нажмите -Результат-"
inf = "1:00:00"
Command1.Enabled = False
Command2.Enabled = False
Command6.Enabled = False
Check1.Enabled = False
Check2.Enabled = False
Check4.Enabled = False
Command3.Enabled = True
List2.Visible = False
List1.Visible = False

End If
End Sub
