geitemp=digein
EndIf
EndSub
PrivateSubCommand3_Click()
Loadmap
map.Show
EndSub
PrivateSubCommand4_Click()
'以下代码写得不是很好,有点乱的感觉
'其思路是先统计要经过的车站个数,再把最小车站个数的线路显示出来
'还有要注意的一点是在显示出了最近车站的线路后,为了返回开始查询到的线路,我用了MSF1(i)做为存储
DimintminAsInteger
DimintcountAsInteger
Dimalloks()AsInteger
DimrsAsInteger
DimoksnAsInteger
DimstrbijAsString
DimbfinAsBoolean
intmin=10000
Ifgcaf=2Then
IfCommand4.Caption="查找经过站点最小的线路"Then
Command4.Caption="返回"
oksn=0
IfMSF1(0).Visible=TrueThen
ReDimalloks(MSF1(0).Rows)
MSF1(1).Clear
MSF1(1).Rows=MSF1(0).Rows
Fork=0ToMSF1(0).Rows-1
intcount=9999
bfin=False
Fort=0ToNC+2
IfMSF1(0).TextMatrix(k,t)=""Then
ExitFor
EndIf
MSF1(1).TextMatrix(k,t)=MSF1(0).TextMatrix(k,t)
Ifbfin=FalseThen
Ifcbs.Text=MSF1(0).TextMatrix(k,t)OrCbe.Text=MSF1(0).TextMatrix(k,t)Then
Ifintcount=9999Then
intcount=0
Else
intcount=intcount+1
bfin=True
EndIf
Else
Ifintcount<>9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(1).TextMatrix(k,NC+2)=MSF1(0).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(0).TextMatrix(k,NC+2)=MSF1(1).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(0).TextMatrix(k,NC+2)=MSF1(2).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount""Then
Label7.Visible=True
EndIf
digein=0
showSEdatacbs.Text,Cbm.Text,1'把转发站作为终点站进行查询
digeitemp=digein
digein=0
showSEdataCbm.Text,Cbe.Text,2'把转发站作为起点站进行查询
digeitemp=digein
EndIf
EndSub
PrivateSubCommand3_Click()
Loadmap
map.Show
EndSub
PrivateSubCommand4_Click()
'以下代码写得不是很好,有点乱的感觉
'其思路是先统计要经过的车站个数,再把最小车站个数的线路显示出来
'还有要注意的一点是在显示出了最近车站的线路后,为了返回开始查询到的线路,我用了MSF1(i)做为存储
DimintminAsInteger
DimintcountAsInteger
Dimalloks()AsInteger
DimrsAsInteger
DimoksnAsInteger
DimstrbijAsString
DimbfinAsBoolean
intmin=10000
Ifgcaf=2Then
IfCommand4.Caption="查找经过站点最小的线路"Then
Command4.Caption="返回"
oksn=0
IfMSF1(0).Visible=TrueThen
ReDimalloks(MSF1(0).Rows)
MSF1(1).Clear
MSF1(1).Rows=MSF1(0).Rows
Fork=0ToMSF1(0).Rows-1
intcount=9999
bfin=False
Fort=0ToNC+2
IfMSF1(0).TextMatrix(k,t)=""Then
ExitFor
EndIf
MSF1(1).TextMatrix(k,t)=MSF1(0).TextMatrix(k,t)
Ifbfin=FalseThen
Ifcbs.Text=MSF1(0).TextMatrix(k,t)OrCbe.Text=MSF1(0).TextMatrix(k,t)Then
Ifintcount=9999Then
intcount=0
Else
intcount=intcount+1
bfin=True
EndIf
Else
Ifintcount<>9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(1).TextMatrix(k,NC+2)=MSF1(0).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(0).TextMatrix(k,NC+2)=MSF1(1).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount9999Then
intcount=intcount+1
EndIf
EndIf
EndIf
Next
MSF1(0).TextMatrix(k,NC+2)=MSF1(2).TextMatrix(k,NC+2)
alloks(oksn)=intcount
oksn=oksn+1
Ifintcount
上一篇:VBAC售楼管理系统(论文和程序)
下一篇:白色姜花,略微开了