p align="left">End If Next i End Sub Private Sub Combo5_Click() zxz = Combo5.ListIndex Text7.Text = Combo5.List(zxz) Text6.Text = "" Text5.Text = "" Command11.Enabled = True Text5.Enabled = True Text6.Enabled = True End Sub Private Sub Combo7_Click() Text9.Enabled = True Text9.Text = nama(LinesCount - 1, Combo7.ListIndex) End Sub Private Sub Command1_Click() If Len(Dir("c:\Курсовая моя\Свободные автобусы.txt")) = 0 Then MsgBox "Файл свободных автобусов не найден!!!" + vbCrLf + _ "Проверьте его наличие : 'c:\ Курсовая моя\Свободные автобусы.txt'" Exit Sub End If Combo3.Enabled = True i = 0 Open "c:\ Курсовая моя\Свободные автобусы.txt" For Input As 3 Do While Not EOF(3) Input #3, arFreeBuses(i) Combo3.AddItem arFreeBuses(i) i = i + 1 Loop Close 3 End Sub Private Sub Command10_Click() If Command10.Caption = "Начать последовательность остановок" Then Command7.Enabled = False food = True q = 0 Else Command7.Enabled = True food = False Combo4.Enabled = False Text4.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = False Command6.Enabled = False End If End Sub Private Sub Command11_Click() Combo6.Enabled = True If Text7.Text = "" Or Text6.Text = "" Or Text5.Text = "" Then MsgBox "Все поля должны быть заполнены!!!" Exit Sub End If arBusNumber(LinesCount - 1, zzz) = LTrim(Str$(LinesCount - 1 + 1) + Combo5.List(zxz)) arDriveName(LinesCount - 1, zzz) = Text6.Text arConductorName(LinesCount - 1, zzz) = Text5.Text Combo6.AddItem arBusNumber(LinesCount - 1, zzz) Combo5.RemoveItem Mi zzz = zzz + 1 End Sub Private Sub Command12_Click() If Len(Dir("c:\ Курсовая моя\Свободные автобусы.txt")) = 0 Then MsgBox "Файл свободных автобусов не найден!!!" + vbCrLf + _ "Проверьте его наличие : 'c:\ Курсовая моя\Свободные автобусы.txt'" Exit Sub End If Combo3.Enabled = True Combo5.Enabled = True End Sub Private Sub Command13_Click() If Text8.Text = "" Then MsgBox "Напишите название маршруту!!!": Exit Sub If Len(Dir("c:\ Курсовая моя\Маршруты.txt")) = 0 Then MsgBox "Файл маршрутов не найден!!!" + vbCrLf + _ "Проверьте его наличие : 'c:\ Курсовая моя\Маршруты.txt'" Combo1.Enabled = False Label11.Visible = False Exit Sub End If Open "c:\ Курсовая моя\Маршруты.txt" For Append As 1 Print #1, Text8.Text Close 1 Open "c:\курсовая моя\" + Text8.Text + ".txt" For Output As 3 For zzz = 0 To (Combo6.ListCount - 1) Print #3, "автобус,", arBusNumber(LinesCount - 1, zzz) Print #3, "водитель,", arDriveName(LinesCount - 1, zzz) Print #3, "кондуктор,", arConductorName(LinesCount - 1, zzz) Next zzz For i = 0 To (Combo7.ListCount - 1) Print #3, "остановка,", nama(LinesCount - 1, i), ",", Combo7.List(i) Next i Close 3 Open "c:\ Курсовая моя\Свободные автобусы.txt" For Output As 6 For i = 0 To (Combo5.ListCount - 1) Print #6, Combo5.List(i) Next i Close 6 mnuNewLine_Click End Sub Private Sub Command14_Click() Frame2.Visible = False End Sub Private Sub Command15_Click() Frame1.Visible = False End Sub Private Sub Command16_Click() If Text9.Text = "" Then MsgBox "Напишите название остановки!!!" Else _ nama(LinesCount - 1, Combo7.ListIndex) = Text9.Text End Sub Private Sub Command17_Click() Picture2.Cls Combo6.Clear: Combo6.Enabled = False Combo5.Enabled = False Text6.Text = "": Text6.Enabled = False Text5.Text = "": Text5.Enabled = False Command11.Enabled = False Combo7.Enabled = False: Combo7.Clear Text9.Text = "": Text9.Enabled = False Command16.Enabled = False: Command13.Enabled = False End Sub Private Sub Command2_Click() If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then MsgBox "Все поля должны быть заполнены!!!" Exit Sub End If Select Case DooM Case False: arDriveName(Mis, Misk) = Text2.Text arConductorName(Mis, Misk) = Text3.Text Case True: arBusNumber(Mis, Combo2.ListCount) = LTrim(Str$(Mis + 1) + Combo3.List(Mi)) arDriveName(Mis, Combo2.ListCount) = Text2.Text arConductorName(Mis, Combo2.ListCount) = Text3.Text Combo2.AddItem arBusNumber(Mis, Combo2.ListCount), Combo2.ListCount Combo3.RemoveItem Mi End Select End Sub Private Sub Command3_Click() Doomy = True Picture1.Cls Command4.Enabled = True Command5.Enabled = True Command6.Enabled = True End Sub Private Sub Command4_Click() If Doomy = True Then If disk <> 999 Then Image1(disk).Visible = False Label14(disk).Visible = False Combo4.List(disk) = " - " End If disk = 999 End If End Sub Private Sub Command5_Click() Text4.Enabled = True If Doomy = True Then Exit Sub If disk <> 999 Then If Do_Do = True Then If Text4.Text = "" Then MsgBox "напишите название остановки!!!" Else arStayName(Mis, disk) = Text4.Text For i = 0 To 35 If Label14(i).Caption = Combo4.List(disk) Then Label14(i).Caption = Text4.Text Next i Me.Combo4.List(disk) = Text4.Text Do_Do = False End If End If End If End Sub Private Sub Command6_Click() If Boom = True Then If disk <> 999 Then Image1(disk).DragMode = 1 Else If disk <> 999 Then Image1(disk).DragMode = 0 Boom = True End If End Sub Private Sub Command7_Click() Open "c:\Курсовая моя\" + Combo1.List(Mis) + ".txt" For Output As 5 For i = 0 To (Combo2.ListCount - 1) If Combo2.List(i) <> " - " Then Print #5, "автобус,", Combo2.List(i) Print #5, "водитель,", arDriveName(Mis, i) Print #5, "кондуктор,", arConductorName(Mis, i) End If Next i If Command10.Caption = "Сохранить все сделанные изменения" Then For i = 0 To (Combo4.ListCount - 1) If Combo4.List(i) <> " - " Then _ Print #5, "остановка,", arStayName(Mis, i), ",", arStayAbsciss(Mis, i), ",", arStayOrdinata(Mis, i) Next i Else For i = 0 To (Combo4.ListCount - 1) If Combo4.List(i) <> " - " Then _ Print #5, "остановка,", arName(Mis, i), ",", arAbsciss(Mis, i), ",", arOrdinata(Mis, i) Next i End If Close 5 Open "c:\ Курсовая моя\Свободные автобусы.txt" For Output As 6 For i = 0 To (Combo3.ListCount - 1) Print #6, Combo3.List(i) Next i Close 6 End Sub Private Sub Command8_Click() If DooM = True Then MsgBox "Нечего удалять!!!" If DooM = False Then Combo2.List(Misk) = " - " If Len(Dir("c:\ Курсовая моя\Свободные автобусы.txt")) = 0 Then MsgBox "Файл маршрутов не найден!!!" + vbCrLf + _ "Проверьте его наличие : 'c:\ Курсовая моя\Свободные автобусы.txt'" Exit Sub End If Open "c:\ Курсовая моя\Свободные автобусы.txt" For Append As 7 Print #7, arBusNumber(Mis, Misk) Close 7 End If End Sub Private Sub Command9_Click() If Len(Dir("c:\ Курсовая моя\маршруты.txt")) = 0 Then MsgBox " Файл маршрутов не найден!!!" + vbCrLf + _ " Проверьте его наличие: 'c:\ Курсовая моя\маршруты.txt'" Combo1.Enabled = False Label11.Visible = False Exit Sub End If Open "c:\ Курсовая моя\маршруты.txt" For Output As 4 For i = 0 To (Combo1.ListCount - 1) If i <> Mis Then Print #4, Combo1.List(i) Next i Close 4 Open "c:\Eo?niaay iiy\" + Combo1.List(Mis) + ".txt" For Output As 4 Close 4 End Sub Private Sub Form_Load() aa = 0 q = 999 For i = 1 To 35 Load Image1(i) Load Label14(i) Me.Image1(i).Visible = False Me.Label14(i).Visible = False Next i disk = 999 End Sub Private Sub Image1_Click(Index As Integer) w = Image1(0).Width / 2 If q = 0 Then Picture1.PSet (Image1(Index).Left, Image1(Index).Top) Combo4.Clear End If If food = True Then Command10.Caption = "Caiiiieou" arName(Mis, q) = arStayName(Mis, Index) arAbsciss(miss, q) = arStayAbsciss(Mis, Index) arOrdinata(miss, q) = arStayOrdinata(Mis, Index) Combo4.AddItem arName(Mis, q)
Страницы: 1, 2, 3, 4, 5
|