Option Strict Off
Option Explicit On
Friend Class FrmRelRecebDiaBancoClasse
	Inherits System.Windows.Forms.Form
	Private irstFaturas As ADODB.Recordset
	Private istrTabela As String
	Private istrCabecTotal As String
	Private istrCabec As String
	Private ifrmRelRecebDiaBancoClasse As FrmRelatorio
	Private istrTamCol As String
	Private istrBranco As String
	
	Private istrTemp As String
	Private istrNomClass As Object
	Private istrCondicao As Object
	
	Private istrCabTit As String
	
	'UPGRADE_WARNING: Lower bound of array idblTotal was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
	Private idblTotal(21) As Double
	'UPGRADE_WARNING: Lower bound of array idblTotalAnt was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
	Private idblTotalAnt(21) As Double
	'UPGRADE_WARNING: Lower bound of array idblTotalBancos was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
	Private idblTotalBancos(21) As Double
	'UPGRADE_WARNING: Lower bound of array idblColuna was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
	Private idblColuna(21) As Double
	
	Private Sub cmdFechar_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdFechar.Click
		Call Me.Close()
	End Sub
	
	Private Sub dtpIni_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles dtpIni.Change
		dtpFim.value = UltimoDiaMes((dtpIni.Month), (dtpIni.Year)) & "/" & dtpIni.Month & "/" & dtpIni.Year
	End Sub
	
	Private Sub FrmRelRecebDiaBancoClasse_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
		Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
		If KeyAscii = System.Windows.Forms.Keys.Escape Then
			Call Me.Close()
		ElseIf KeyAscii = System.Windows.Forms.Keys.Return Then 
			Call SendKeysA(System.Windows.Forms.Keys.Tab, True)
		End If
		eventArgs.KeyChar = Chr(KeyAscii)
		If KeyAscii = 0 Then
			eventArgs.Handled = True
		End If
	End Sub
	
	Private Sub FrmRelRecebDiaBancoClasse_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		irstFaturas = New ADODB.Recordset
		ifrmRelRecebDiaBancoClasse = New FrmRelatorio
		Me.dtpIni.value = CDate(VB6.Format(BuscaDataBD, "dd/mm/yyyy"))
		Me.dtpFim.value = UltimoDiaMes((Me.dtpIni.Month), (Me.dtpIni.Year)) & "/" & Me.dtpIni.Month & "/" & Me.dtpIni.Year
	End Sub
	
	Private Sub FrmRelRecebDiaBancoClasse_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
		If irstFaturas.State = ADODB.ObjectStateEnum.adStateOpen Then Call irstFaturas.Close()
		'UPGRADE_NOTE: Object irstFaturas may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
		irstFaturas = Nothing
		'UPGRADE_NOTE: Object ifrmRelRecebDiaBancoClasse may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
		ifrmRelRecebDiaBancoClasse = Nothing
	End Sub
	
	Private Sub cmdImprimir_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdImprimir.Click
		istrTabela = LCase("temp_recbtos_bancos_classe" & gstrNmEstacao & gstrUsuario_Login)
		'Verifica se foi informado as datas corretamente
		'UPGRADE_WARNING: Couldn't resolve default property of object Me.dtpFim.value. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		'UPGRADE_WARNING: Couldn't resolve default property of object Me.dtpIni.value. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		If Me.dtpIni.value > Me.dtpFim.value Then
			Call MsgBox("A data inicial está maior que a data final!", MsgBoxStyle.Exclamation, gstrTituloMensagem)
			Call Me.dtpIni.Focus()
		Else
			Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
			Call LigDes(False)
			Call RelatorioPaisagemPadraoColunas(istrTamCol, istrCabec, istrTemp, istrBranco, istrNomClass, istrCondicao)
			'
			Me.lblInfo.Text = " Limpando as tabelas auxiliares..."
			Call Me.lblInfo.Refresh()
			'Elimina as tabelas temporarias caso existir
			Call Executar("DROP TEMPORARY TABLE IF EXISTS " & istrTabela)
			Call Executar("DROP TEMPORARY TABLE IF EXISTS " & istrTabela & "_itens")
			'
			Me.lblInfo.Text = " Localizando as faturas do período informado..."
			Call Me.lblInfo.Refresh()
			'
			If RelatorioPaisagemSelecionaNFs(irstFaturas, Me.dtpIni.value, Me.dtpFim.value, Me.chkReserva.CheckState = System.Windows.Forms.CheckState.Checked) = True Then
				Call RelatorioPaisagemMontaTabela(1, istrTabela, irstFaturas, (Me.ProgressBar), (Me.lblInfo), (Me.lblPerc))
				Me.lblInfo.Text = " Montando Relatório..."
				Call Me.lblInfo.Refresh()
				istrCabTit = "(Dia/Banco/Classe)"
				With ifrmRelRecebDiaBancoClasse
					.quem_chama = Me
					.VS.Font = VB6.FontChangeName(.VS.Font, "Arial")
					.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
					.VS.TableBorder = VSVIEW6.TableBorderSettings.tbAll
					.VS.Orientation = VSVIEW6.OrientationSettings.orLandscape
					.VS.PhysicalPage = True
					.VS.PaperSize = VSVIEW6.PaperSizeSettings.pprA4
					.VS.MarginTop = "7mm"
					.VS.MarginRight = "7mm"
					.VS.MarginLeft = "7mm"
					.VS.MarginBottom = "5mm"
					.VS.TextColor = System.Drawing.Color.Black
					.VS.BrushStyle = VSVIEW6.BrushStyleSettings.bsSolid
					.VS.Font = VB6.FontChangeBold(.VS.Font, False)
					.VS.StartDoc()
					Call ImprimeResumoDiario()
					.VS.CurrentLine = 0
					Me.lblInfo.Text = " Pronto!"
					Call Me.lblInfo.Refresh()
					Call .VS.EndDoc()
					Call .Show()
				End With
				'Elimina as tabelas temporarias caso existir
				Call Executar("DROP TEMPORARY TABLE IF EXISTS " & istrTabela)
				Call Executar("DROP TEMPORARY TABLE IF EXISTS " & istrTabela & "_itens")
				Call LigDes(True)
			Else
				Call MsgBox("Não existem recebimentos no intervalo selecionado!", MsgBoxStyle.Information, gstrTituloMensagem)
				Call LigDes(True)
				Call Me.dtpIni.Focus()
				If irstFaturas.State = ADODB.ObjectStateEnum.adStateOpen Then Call irstFaturas.Close()
				Me.lblInfo.Text = ""
				Call Me.lblInfo.Refresh()
			End If
			Me.Cursor = System.Windows.Forms.Cursors.Default
		End If
	End Sub
	
	Private Sub ImprimeResumoDiario() ' REL 97 '
		Dim lstrTab As String
		Dim lstrTabTotal As String
		Dim lstrTabTotBco As String
		Dim llngAux As Integer
		
		Dim ldtePtoPri As Date
		Dim ldtePtoAux As Date
		Dim lstrBcoPri As String
		Dim lstrBcoAux As String
		Dim lstrClasse As String
		Dim lstrTeste As String
		Dim lstrSql As String
		Dim lrstAux As ADODB.Recordset
		lrstAux = New ADODB.Recordset
		
		lstrSql = RelatorioPaisagemSelecionaDados(5, lstrSql, istrTabela)
		lstrSql = lstrSql & " WHERE (`datapag` BETWEEN '" & VB6.Format(Me.dtpIni.value, "yyyy-MM-dd") & "' AND '" & VB6.Format(Me.dtpFim.value, "yyyy-MM-dd") & "') "
		lstrSql = lstrSql & " GROUP BY `datapag` ASC, `banco` ASC, `nmbanco` ASC, `classes` ASC "
		Call Conectar(lstrSql, lrstAux)
		ldtePtoAux = CDate("01/01/1950")
		lstrBcoAux = ""
		With lrstAux
			If .State = ADODB.ObjectStateEnum.adStateOpen Then
				If .RecordCount > 0 Then
					Call BarraProgresso((Me.ProgressBar), (Me.lblPerc), (Me.lblInfo), 0, .RecordCount)
					While Not .EOF
						'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
						ldtePtoPri = CDate(IIf(IsDbNull(.Fields("datapag").value), "1900-01-01", .Fields("datapag").value))
						'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
						lstrBcoPri = Trim(IIf(IsDbNull(.Fields("nmbanco").value), "", .Fields("nmbanco").value))
						'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
						lstrClasse = Mid(Trim(IIf(IsDbNull(.Fields("classes").value), "", .Fields("classes").value)), 3)
						With ifrmRelRecebDiaBancoClasse
							.VS.Font = VB6.FontChangeBold(.VS.Font, True)
							.VS.Font = VB6.FontChangeSize(.VS.Font, 8)
							.VS.TableBorder = VSVIEW6.TableBorderSettings.tbNone
							.VS.Font = VB6.FontChangeBold(.VS.Font, False)
							.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
							'--------------TOTAL------------'
							'Se o banco atual for diferente do banco anterior ou a data de pagamento atual for diferente a data de pagamento anterior então totaliza esse banco ou essa data
							If lstrBcoPri <> lstrBcoAux Or ldtePtoPri <> ldtePtoAux Then
								Call TotalResumoDiario(lstrTab, lstrTabTotal, lstrTabTotBco)
							End If
							'------- DATA -----'
							If ldtePtoPri <> ldtePtoAux Then
								For llngAux = 1 To UBound(idblTotalAnt)
									idblTotalAnt(llngAux) = 0
								Next llngAux
								If CInt(Len(lstrTab)) > 0 Then
									.VS.Table = istrTamCol & "Total|" & lstrTabTotal
									.VS.NewPage()
								End If
								.VS.Font = VB6.FontChangeBold(.VS.Font, True)
								.VS.Font = VB6.FontChangeSize(.VS.Font, 7)
								'UPGRADE_ISSUE: VBControlExtender method ifrmRelRecebDiaBancoClasse.VS.CurrentY was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'
								.VS.CurrentY = .VS.CurrentY + 100
								.VS.Table = "<20mm;" & VB6.Format(ldtePtoPri, "dd/mm/yyyy")
								ldtePtoAux = ldtePtoPri
								lstrBcoAux = ""
								.VS.Font = VB6.FontChangeBold(.VS.Font, False)
								.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
							End If
							'------- BANCO --------'
							If lstrBcoPri <> lstrBcoAux Then
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbAll
								.VS.Table = "<271mm;" & lstrBcoPri & "|"
								.VS.Table = istrTamCol & istrCabec
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbNone
								lstrBcoAux = lstrBcoPri
							End If
							'------CLASSE---------'
							If lstrBcoPri = lstrBcoAux Or ldtePtoPri = ldtePtoAux Then
								For llngAux = 1 To UBound(idblColuna)
									
									lstrTeste = lrstAux.Fields(llngAux + 3).Name
									'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
									idblColuna(llngAux) = IIf(IsDbNull(lrstAux.Fields(llngAux + 3).value), 0, lrstAux.Fields(llngAux + 3).value)
									idblTotal(llngAux) = idblTotal(llngAux) + idblColuna(llngAux)
									idblTotalAnt(llngAux) = idblTotalAnt(llngAux) + idblColuna(llngAux)
									idblTotalBancos(llngAux) = idblTotalBancos(llngAux) + idblColuna(llngAux)
								Next llngAux
								lstrTab = RelatorioPaisagemMontaTemp(lrstAux)
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbColumns
								.VS.Table = istrTamCol & lstrClasse & "|" & lstrTab
								'.VS.Table = istrTamCol & istrBranco
							End If
						End With
						Call .MoveNext()
						Call BarraProgresso((Me.ProgressBar), (Me.lblPerc), (Me.lblInfo), 1)
						If .EOF = True Then
							Call TotalResumoDiario(lstrTab, lstrTabTotal, lstrTabTotBco)
							ifrmRelRecebDiaBancoClasse.VS.Table = istrTamCol & "Total|" & lstrTabTotal
							istrCabTit = "(Total por bancos)"
							ifrmRelRecebDiaBancoClasse.VS.NewPage()
							Call ImprimeTotalResumoDiario()
						End If
					End While
				End If
				Call .Close()
			End If
		End With
		'UPGRADE_NOTE: Object lrstAux may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
		lrstAux = Nothing
	End Sub
	
	Private Function ImprimeTotalResumoDiario() As Object ' TOTAL REL 97 '
		Dim lstrBcoPri As String
		Dim lstrBcoAux As String
		Dim llngAux As Integer
		Dim lstrTab As String
		Dim lstrTabTotal As String
		Dim lstrTabTotBco As String
		Dim lstrSql As String
		Dim lrstAux As ADODB.Recordset
		'
		lrstAux = New ADODB.Recordset
		'
		lstrSql = RelatorioPaisagemSelecionaDados(5, lstrSql, istrTabela)
		lstrSql = lstrSql & " WHERE (`datapag` BETWEEN '" & VB6.Format(Me.dtpIni.value, "yyyy-MM-dd") & "' AND '" & VB6.Format(Me.dtpFim.value, "yyyy-MM-dd") & "') "
		lstrSql = lstrSql & " GROUP BY `banco` ASC, `nmbanco` ASC "
		Call Conectar(lstrSql, lrstAux)
		With lrstAux
			If .State = ADODB.ObjectStateEnum.adStateOpen Then
				lstrBcoAux = ""
				lstrTabTotal = CStr(0)
				If .RecordCount > 0 Then
					For llngAux = 1 To UBound(idblTotalBancos)
						idblTotalBancos(llngAux) = 0
					Next llngAux
					While Not .EOF
						'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
						lstrBcoPri = IIf(IsDbNull(.Fields("nmbanco").value), "", .Fields("nmbanco").value)
						With ifrmRelRecebDiaBancoClasse
							.VS.Font = VB6.FontChangeBold(.VS.Font, True)
							.VS.Font = VB6.FontChangeSize(.VS.Font, 8)
							.VS.TableBorder = VSVIEW6.TableBorderSettings.tbNone
							.VS.Font = VB6.FontChangeBold(.VS.Font, False)
							.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
						End With
						'--------------TOTAL------------'
						If lstrBcoPri <> lstrBcoAux Then
							For llngAux = 1 To UBound(idblTotalAnt)
								idblTotalAnt(llngAux) = 0
							Next llngAux
							Call TotalResumoDiario(lstrTab, lstrTabTotal, lstrTabTotBco)
						End If
						'------- BANCO --------'
						If lstrBcoPri <> lstrBcoAux Then
							With ifrmRelRecebDiaBancoClasse
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbAll
								.VS.Font = VB6.FontChangeBold(.VS.Font, False)
								.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
								.VS.Table = istrTamCol & lstrBcoPri & "|" & Replace(istrCabec, "Classe|", "")
								.VS.Font = VB6.FontChangeBold(.VS.Font, False)
								.VS.Font = VB6.FontChangeSize(.VS.Font, 5)
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbNone
								.VS.TableBorder = VSVIEW6.TableBorderSettings.tbNone
							End With
							lstrBcoAux = lstrBcoPri
						End If
						'------QUANTIDADE---------'
						If lstrBcoPri = lstrBcoAux Then
							For llngAux = 1 To UBound(idblColuna)
								'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
								idblColuna(llngAux) = IIf(IsDbNull(.Fields(llngAux + 3).value), 0, .Fields(llngAux + 3).value)
								idblTotal(llngAux) = idblTotal(llngAux) + idblColuna(llngAux)
								idblTotalAnt(llngAux) = idblTotalAnt(llngAux) + idblColuna(llngAux)
								idblTotalBancos(llngAux) = idblTotalBancos(llngAux) + idblColuna(llngAux)
							Next llngAux
							lstrTab = RelatorioPaisagemMontaTemp(lrstAux)
							
						End If
						Call .MoveNext()
						'UPGRADE_WARNING: Couldn't resolve default property of object ImprimeTotalResumoDiario. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
						ImprimeTotalResumoDiario = True
						If .EOF Then
							Call TotalResumoDiario(lstrTab, lstrTabTotal, lstrTabTotBco)
						End If
					End While
				End If
				Call .Close()
			End If
		End With
		ifrmRelRecebDiaBancoClasse.VS.Table = istrTamCol & "Total Geral|" & lstrTabTotBco
		Call ImprimeDetalhamentosPaisagem(ifrmRelRecebDiaBancoClasse, istrTabela & "_itens", 0, 3)
		'UPGRADE_NOTE: Object lrstAux may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
		lrstAux = Nothing
	End Function
	
	Public Function CabecaRel() As Object
		Call Cabecalho_Relatorio((ifrmRelRecebDiaBancoClasse.VS), "Recebimentos no período - Resumo Diário " & istrCabTit, "Período de: " & VB6.Format(dtpIni.value, "dd/mm/yyyy") & " até " & VB6.Format(dtpFim.value, "dd/mm/yyyy"), "3", False, "")
		Call LineFeed((ifrmRelRecebDiaBancoClasse.VS), 1)
	End Function
	
	Private Sub TotalResumoDiario(ByRef astrTemp As String, ByRef astrTempTotalAnt As String, ByRef astrTempTotalBancos As String)
		Dim lngCol As Integer
		Dim llngAux As Integer
		Dim lstrMsc As String
		If CInt(Len(astrTemp)) > 0 Then
			astrTemp = ""
			astrTempTotalAnt = ""
			astrTempTotalBancos = ""
			For llngAux = 1 To UBound(idblTotal)
				If llngAux = 1 Then
					lstrMsc = "#,##0"
				Else
					lstrMsc = "#,##0.00"
				End If
				If (llngAux >= 1 And llngAux <= 17) Or (llngAux = 21) Then
					astrTemp = astrTemp & VB6.Format(idblTotal(llngAux), lstrMsc) & IIf(llngAux < 21, "|", "")
					astrTempTotalAnt = astrTempTotalAnt & VB6.Format(idblTotalAnt(llngAux), lstrMsc) & IIf(llngAux < 21, "|", "")
					astrTempTotalBancos = astrTempTotalBancos & VB6.Format(idblTotalBancos(llngAux), lstrMsc) & IIf(llngAux < 21, "|", "")
				ElseIf llngAux = 18 Then 
					astrTemp = astrTemp & VB6.Format(idblTotal(18) + idblTotal(19) + idblTotal(20), lstrMsc) & "|"
					astrTempTotalAnt = astrTempTotalAnt & VB6.Format(idblTotalAnt(18) + idblTotalAnt(19) + idblTotalAnt(20), lstrMsc) & "|"
					astrTempTotalBancos = astrTempTotalBancos & VB6.Format(idblTotalBancos(18) + idblTotalBancos(19) + idblTotalBancos(20), lstrMsc) & "|"
				End If
			Next llngAux
			For llngAux = 1 To UBound(idblTotal)
				idblTotal(llngAux) = 0
			Next llngAux
			With ifrmRelRecebDiaBancoClasse
				.VS.TableBorder = VSVIEW6.TableBorderSettings.tbAll
				.VS.Table = istrTamCol & "Total|" & astrTemp
				'UPGRADE_ISSUE: VBControlExtender method ifrmRelRecebDiaBancoClasse.VS.CurrentY was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"'
				.VS.CurrentY = .VS.CurrentY + 200
			End With
		End If
	End Sub
	
	Private Sub LigDes(ByVal ablnMode As Boolean)
		Me.dtpIni.Enabled = ablnMode
		Me.dtpFim.Enabled = ablnMode
		Me.cmdImprimir.Enabled = ablnMode
		Me.cmdFechar.Enabled = ablnMode
		Me.chkReserva.Enabled = ablnMode
	End Sub
End Class