Files
Epole_Class/FileToDataTable.vb
Chikyun 59db93a1be initial commit
스타일 숨김/표시 처리 기능 추가됨
2019-02-23 23:53:40 +09:00

404 lines
26 KiB
VB.net

Public Class FileToDataTable
Public Shared Sub ReadFile_New(ByRef stylelist() As C_Epole.SStyle, ByVal FILENAME As String, ByVal CurIdx As Short)
'//2009-02-27일 각분리된 파일기능추가로 이 프로시져를 둘로 나눈다
Dim FI As New System.IO.FileInfo(FILENAME)
Dim Findkey As String = ""
Dim Line As String
Dim KeyPos As Integer = -1
Dim Seppos As Integer = -1
Dim dr As DataRow
Dim FS As System.IO.FileStream
Dim SR As System.IO.StreamReader
'//테이블데이터초기화
stylelist(CurIdx).PATTERNTABLE = New DataTable
stylelist(CurIdx).PATTERNTABLE.Columns.Add("설명")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("")
stylelist(CurIdx).Backimg = ""
stylelist(CurIdx).CanvasX = 292
stylelist(CurIdx).CanvasY = 520
stylelist(CurIdx).Desc = "기본설명"
stylelist(CurIdx).dummmyx = 0
stylelist(CurIdx).dummmyy = 50
stylelist(CurIdx).Dummy = False
stylelist(CurIdx).DummyCnt = 1
stylelist(CurIdx).Dummytype = 1
stylelist(CurIdx).DrawItemRepeat = False '//기본값은 사용안함
stylelist(CurIdx).RowDivCnt = 0 '//줄바꿈기능 170715
stylelist(CurIdx).rowdivy = 0
stylelist(CurIdx).rowdivx = 0
stylelist(CurIdx).visible = True
stylelist(CurIdx).File = FI.Name
'MsgBox(stylelist(CurIdx).File)
stylelist(CurIdx).Filter = ""
stylelist(CurIdx).LandScape = False
stylelist(CurIdx).MarginX = 50
stylelist(CurIdx).MarginY = 50
stylelist(CurIdx).picstyle = 1
stylelist(CurIdx).PrintFontOffset = 0
stylelist(CurIdx).ScaleX = 1.5
stylelist(CurIdx).ScaleY = 1.5
stylelist(CurIdx).Viewimage = False
'//파일종류는 CFG(프린터정보) .각태그(개체정보) .ck(체크박스) .layout(화면위치정보)
'//Read_CFG(받아오는 기본파일의 확장자가 CFG 이므로 일단 그대로쓴다)
FS = New System.IO.FileStream(FI.FullName, IO.FileMode.Open)
SR = New IO.StreamReader(FS, System.Text.Encoding.Default)
While SR.Peek > -1
Line = SR.ReadLine.ToUpper
If Line <> "" AndAlso Line.Trim.Substring(0, 2) <> "//" Then '//주석문도아니고 빈줄도 아니라면 읽기시작
If Findkey = "" Then '//아직 셋팅된 키가 없다면
If Line.ToUpper.IndexOf("[") > -1 Then Findkey = Line.Trim("[").ToString.Trim("]").ToString
Else '//셋팅된 키가 있다면 테이블에 추가해준다.
If Line.IndexOf("[") = -1 Then '//그다음 키가왔는가? 아니라면 이전키의 데이터이므로 모두 적용한다
Seppos = Line.IndexOf("=")
If Findkey.ToUpper = "STYLE" Then
Select Case Line.Substring(0, Seppos).ToUpper.Trim
Case "VISIBLE" : stylelist(CurIdx).visible = Line.Substring(Seppos + 1).ToUpper
Case "DESC" : stylelist(CurIdx).Desc = Line.Substring(Seppos + 1).ToUpper
Case "FILE" '이부분은 바로 대체되었다.stylelist(CurIdx).File = Line.Substring(Seppos + 1).ToUpper
Case "BACKIMG" : stylelist(CurIdx).Backimg = Line.Substring(Seppos + 1).ToUpper
Case "CANVASX" : stylelist(CurIdx).CanvasX = Line.Substring(Seppos + 1).ToUpper
Case "CANVASY" : stylelist(CurIdx).CanvasY = Line.Substring(Seppos + 1).ToUpper
Case "DUMMYCNT" : stylelist(CurIdx).DummyCnt = Line.Substring(Seppos + 1).ToUpper
Case "DUMMY" : stylelist(CurIdx).Dummy = Line.Substring(Seppos + 1).ToUpper
Case "DUMMMYX" : stylelist(CurIdx).dummmyx = Line.Substring(Seppos + 1).ToUpper
Case "DUMMMYY" : stylelist(CurIdx).dummmyy = Line.Substring(Seppos + 1).ToUpper
Case "DRAWITEMREPEAT" : stylelist(CurIdx).DrawItemRepeat = Line.Substring(Seppos + 1).ToUpper
Case "ROWDIVCNT" : stylelist(CurIdx).RowDivCnt = Line.Substring(Seppos + 1).ToUpper
Case "ROWDIVX" : stylelist(CurIdx).rowdivx = Line.Substring(Seppos + 1).ToUpper
Case "ROWDIVY" : stylelist(CurIdx).rowdivy = Line.Substring(Seppos + 1).ToUpper
Case "DUMMYTYPE" : stylelist(CurIdx).Dummytype = Line.Substring(Seppos + 1).ToUpper
Case "LANDSCAPE" : stylelist(CurIdx).LandScape = Line.Substring(Seppos + 1).ToUpper
Case "PICSTYLE" : stylelist(CurIdx).picstyle = Line.Substring(Seppos + 1).ToUpper
Case "VIEWIMAGE" : stylelist(CurIdx).Viewimage = Line.Substring(Seppos + 1).ToUpper
Case "FILTER" : stylelist(CurIdx).Filter = Line.Substring(Seppos + 1).ToUpper
Case "FIXEDSTYLE" : stylelist(CurIdx).FixedStyle = Line.Substring(Seppos + 1).ToUpper
Case "PRINTRANGE" : stylelist(CurIdx).PrintRange = Line.Substring(Seppos + 1).ToUpper
Case "MARGINX" : stylelist(CurIdx).MarginX = Line.Substring(Seppos + 1).ToUpper
Case "MARGINY" : stylelist(CurIdx).MarginY = Line.Substring(Seppos + 1).ToUpper
Case "PRINTFONTOFFSET" : stylelist(CurIdx).PrintFontOffset = Line.Substring(Seppos + 1).ToUpper
Case "SCALEX" : stylelist(CurIdx).ScaleX = Line.Substring(Seppos + 1).ToUpper
Case "SCALEY" : stylelist(CurIdx).ScaleY = Line.Substring(Seppos + 1).ToUpper
End Select
End If
Else '//다음키가 발견되었다.
Findkey = Line.Trim("[").ToString.Trim("]").ToString
End If
End If
End If
End While
' MsgBox(StyleList(CurIdx).Filter)
SR.Close()
FS.Close()
'//Read_STyle(CFG CK LAYOUT 외의 실제 스타일및 패턴파일을 가져온다.
'//INI는 더이상 사용하지않는다
'//CFG는 바로위에서 읽는다
'//LAYOUT 은 가로,세로변경시 스스로 가져온다
'//CK 체크박스 역시 바로가져온다
Dim OnlyFname As String = FI.Name.Substring(0, FI.Name.LastIndexOf("."))
For Each eFi As System.IO.FileInfo In FI.Directory.GetFiles(OnlyFname & ".*")
If eFi.Extension.ToUpper <> ".INI" AndAlso _
eFi.Extension.ToUpper <> ".CK" AndAlso _
eFi.Extension.ToUpper <> ".CFG" AndAlso _
eFi.Extension.ToUpper <> ".LAYOUT" Then
FS = New System.IO.FileStream(eFi.FullName, IO.FileMode.Open)
SR = New IO.StreamReader(FS, System.Text.Encoding.Default)
While SR.Peek > -1
Line = SR.ReadLine.ToUpper
If Line <> "" AndAlso Line.Trim.Substring(0, 2) <> "//" Then '//주석문도아니고 빈줄도 아니라면 읽기시작
If Findkey = "" Then '//아직 셋팅된 키가 없다면
If Line.ToUpper.IndexOf("[") > -1 Then Findkey = Line.Trim("[").ToString.Trim("]").ToString
Else '//셋팅된 키가 있다면 테이블에 추가해준다.
If Line.IndexOf("[") = -1 Then '//개별파일의 모든내용은 집어넣는다
Seppos = Line.IndexOf("=")
dr = stylelist(CurIdx).PATTERNTABLE.NewRow
dr(0) = CStr(Findkey & Line.Substring(0, Seppos)).ToUpper
dr(1) = Line.Substring(Seppos + 1).ToUpper
stylelist(CurIdx).PATTERNTABLE.Rows.Add(dr)
Else '//다음키가 발견되었다.
Findkey = Line.Trim("[").ToString.Trim("]").ToString
End If
End If
End If
End While
SR.Close()
FS.Close()
End If
Next
End Sub
Public Shared Sub ReadFile_OLD(ByRef stylelist() As C_Epole.SStyle, ByVal FILENAME As String, ByVal CurIdx As Short)
'//2009-02-27일 각분리된 파일기능추가로 이 프로시져를 둘로 나눈다
Dim FI As New System.IO.FileInfo(FILENAME)
Dim FS As New System.IO.FileStream(FI.FullName, IO.FileMode.Open)
Dim SR As New IO.StreamReader(FS, System.Text.Encoding.Default)
Dim Findkey As String = ""
Dim Line As String
Dim KeyPos As Integer = -1
Dim Seppos As Integer = -1
Dim dr As DataRow
Dim TxtBuf As String
'Arin.WLog2(Auto_Log, "getallSection : 파일의 모든내용을 테이블로 옴긴다.()", LogFile)
stylelist(CurIdx).PATTERNTABLE = New DataTable
stylelist(CurIdx).PATTERNTABLE.Columns.Add("설명")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("섹션")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("개체")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("")
stylelist(CurIdx).PATTERNTABLE.Columns.Add("파일")
'//초기값셋팅
stylelist(CurIdx).Backimg = ""
stylelist(CurIdx).CanvasX = 292
stylelist(CurIdx).CanvasY = 520
stylelist(CurIdx).Desc = "기본설명"
stylelist(CurIdx).dummmyx = 0
stylelist(CurIdx).dummmyy = 50
stylelist(CurIdx).Dummy = False
stylelist(CurIdx).Dummytype = 1
stylelist(CurIdx).File = FILENAME.Substring(FILENAME.LastIndexOf("\") + 1)
'MsgBox(stylelist(CurIdx).File)
stylelist(CurIdx).visible = True
stylelist(CurIdx).Filter = ""
stylelist(CurIdx).LandScape = False
stylelist(CurIdx).MarginX = 50
stylelist(CurIdx).MarginY = 50
stylelist(CurIdx).picstyle = 1
stylelist(CurIdx).PrintFontOffset = 0
stylelist(CurIdx).ScaleX = 1.5
stylelist(CurIdx).ScaleY = 1.5
stylelist(CurIdx).Viewimage = False
'//모든줄을 읽어서 섹션&키 = 설명 으로 한다.
While SR.Peek > -1
Line = SR.ReadLine.ToUpper
If Line <> "" Then
If Findkey = "" Then '//아직 셋팅된 키가 없다면
If Line.ToUpper.IndexOf("[") > -1 Then Findkey = Line.Trim("[").ToString.Trim("]").ToString
Else '//셋팅된 키가 있다면 테이블에 추가해준다.
If Line.IndexOf("[") = -1 Then '//그다음 키가 오기전까지 모두 추가한다.
Seppos = Line.IndexOf("=")
Select Case Line.Substring(0, Seppos).ToUpper
Case "DESC"
If Findkey.ToUpper = "STYLE" Then
stylelist(CurIdx).Desc = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DESC")
Else
TxtBuf = Line.Substring(0, Seppos).ToUpper.Trim
dr = stylelist(CurIdx).PATTERNTABLE.NewRow
dr(0) = CStr(Findkey & Line.Substring(0, Seppos)).ToUpper
dr(1) = Line.Substring(Seppos + 1).ToUpper.Trim
dr(2) = Findkey '//섹션
dr(3) = "DESC" '//개체
dr(4) = "" '//키
dr(5) = ""
'//DESC경우에 파일을 찾을수없으므로 데이터베이스내에서검색한다(거의확인됨)
stylelist(CurIdx).PATTERNTABLE.Rows.Add(dr)
End If
Case "FILE" '이부분은 바로 대체되었다.stylelist(CurIdx).File = Line.Substring(Seppos + 1).ToUpper
Case "BACKIMG"
stylelist(CurIdx).Backimg = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "BACKIMG")
Case "CANVASX"
stylelist(CurIdx).CanvasX = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "CANVASX")
Case "CANVASY"
stylelist(CurIdx).CanvasY = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "CANVASY")
Case "DUMMY"
stylelist(CurIdx).Dummy = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DUMMY")
Case "DUMMYCNT"
stylelist(CurIdx).DummyCnt = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DUMMYCNT")
Case "DUMMMYX"
stylelist(CurIdx).dummmyx = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DUMMMYX")
Case "DUMMMYY"
stylelist(CurIdx).dummmyy = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DUMMMYY")
Case "DUMMYTYPE"
stylelist(CurIdx).Dummytype = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "DUMMYTYPE")
Case "LANDSCAPE"
stylelist(CurIdx).LandScape = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "LANDSCAPE")
Case "MARGINX"
stylelist(CurIdx).MarginX = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "MARGINX")
Case "MARGINY"
stylelist(CurIdx).MarginY = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "MARGINY")
Case "PICSTYLE"
stylelist(CurIdx).picstyle = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "PICSTYLE")
Case "PRINTFONTOFFSET"
stylelist(CurIdx).PrintFontOffset = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "PRINTFONTOFFSET")
Case "SCALEX"
stylelist(CurIdx).ScaleX = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "SCALEX")
Case "SCALEY"
stylelist(CurIdx).ScaleY = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "SCALEY")
Case "VIEWIMAGE"
stylelist(CurIdx).Viewimage = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "VIEWIMAGE")
Case "FILTER"
stylelist(CurIdx).Filter = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "FILTER", "DB")
Case "FIXEDSTYLE"
stylelist(CurIdx).FixedStyle = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "FIXEDSTYLE")
Case "PRINTRANGE"
stylelist(CurIdx).PrintRange = Line.Substring(Seppos + 1).ToUpper
Add_StyleRow(stylelist(CurIdx).PATTERNTABLE, CStr(Findkey & Line.Substring(0, Seppos)).ToUpper, Line.Substring(Seppos + 1).ToUpper, "STYLE", "PRINTRANGE")
Case Else
TxtBuf = Line.Substring(0, Seppos).ToUpper.Trim
dr = stylelist(CurIdx).PATTERNTABLE.NewRow
dr(0) = CStr(Findkey & Line.Substring(0, Seppos)).ToUpper
dr(1) = Line.Substring(Seppos + 1).ToUpper.Trim
dr(2) = Findkey '//섹션
If TxtBuf.IndexOf("LINETYPE") <> -1 Then
dr(3) = "LINETYPE" '//개체
dr(4) = "" '//키
dr(5) = ""
ElseIf TxtBuf.Trim.IndexOf("NUMTYPE") <> -1 Then
dr(3) = "NUMTYPE" '//개체
dr(4) = "" '//키
dr(5) = ""
ElseIf Findkey.IndexOf("PAGETYPE") <> -1 Then
dr(3) = TxtBuf
dr(4) = ""
dr(5) = "layout"
ElseIf TxtBuf.IndexOf("POS") <> -1 Then
dr(3) = TxtBuf.Substring(0, TxtBuf.IndexOf("POS")) '//개체
dr(4) = "POS" '//키
dr(5) = dr(3).ToString.Substring(0, 1)
If IsNumeric(dr(3).ToString.Substring(dr(3).ToString.Length - 1, 1)) = False Then
dr(3) = "미처리(pos)"
dr(4) = TxtBuf
dr(5) = ""
End If
ElseIf TxtBuf.IndexOf("VISIBLE") <> -1 Then
dr(3) = TxtBuf.Substring(0, TxtBuf.IndexOf("VISIBLE")) '//개체
dr(4) = "VISIBLE" '//키
dr(5) = dr(3).ToString.Substring(0, 1)
If IsNumeric(dr(3).ToString.Substring(dr(3).ToString.Length - 1, 1)) = False Then
dr(3) = "미처리(visible)"
dr(4) = TxtBuf
dr(5) = ""
End If
ElseIf TxtBuf.IndexOf("FONT") <> -1 Then
dr(3) = TxtBuf.Substring(0, TxtBuf.IndexOf("FONT")) '//개체
dr(4) = "FONT" '//키
dr(5) = dr(3).ToString.Substring(0, 1)
If IsNumeric(dr(3).ToString.Substring(dr(3).ToString.Length - 1, 1)) = False Then
dr(3) = "미처리(font)"
dr(4) = TxtBuf
dr(5) = ""
End If
ElseIf TxtBuf.IndexOf("SPACE") <> -1 Then
dr(3) = TxtBuf.Substring(0, TxtBuf.IndexOf("SPACE")) '//개체
dr(4) = "SPACE" '//키
dr(5) = dr(3).ToString.Substring(0, 1)
If IsNumeric(dr(3).ToString.Substring(dr(3).ToString.Length - 1, 1)) = False Then
dr(3) = "미처리(space)"
dr(4) = TxtBuf
dr(5) = ""
End If
ElseIf Findkey.IndexOf("PRINTFORM") <> -1 Then
dr(3) = TxtBuf
dr(4) = ""
dr(5) = "CFG"
ElseIf TxtBuf.IndexOf("MYTEXT") <> -1 Then
dr(3) = TxtBuf.Substring(0, TxtBuf.IndexOf("MYTEXT")) '//개체
dr(4) = "MYTEXT" '//키
dr(5) = dr(3).ToString.Substring(0, 1)
If IsNumeric(dr(3).ToString.Substring(dr(3).ToString.Length - 1, 1)) = False Then
dr(3) = "미처리(mytext)"
dr(4) = TxtBuf
dr(5) = ""
End If
ElseIf TxtBuf.IndexOf("CHECKBOX_") <> -1 Then
dr(3) = "CHECKBOX" '//키
dr(4) = TxtBuf.Substring(8) '//개체
dr(5) = "CK"
Else
dr(3) = "미처리"
dr(4) = TxtBuf
dr(5) = Findkey
End If
stylelist(CurIdx).PATTERNTABLE.Rows.Add(dr)
End Select
Else
Findkey = Line.Trim("[").ToString.Trim("]").ToString
End If
End If
End If
End While
'//데이터테이블 검색해서 DESC,NT,LT 의 파일명을 검색후 찾아낸다
'For Each DD As DataRow In stylelist(CurIdx).PATTERNTABLE.Select("개체 in ('DESC','NUMTYPE','LINETYPE')")
' If DD("섹션") <> "STYLE" Then DD("파일") = Get_FileName(stylelist(CurIdx).PATTERNTABLE, DD("섹션"))
'Next
' MsgBox(StyleList(CurIdx).Filter)
SR.Close()
FS.Close()
FI = Nothing
End Sub
''' <summary>
''' 해당 섹션이 속하는 파일명을 검색해서 반환 (DESc,LT,NT의경우사용한다)
''' </summary>
''' <param name="DataT"></param>
''' <param name="findkey"></param>
''' <returns></returns>
''' <remarks></remarks>
Private Shared Function Get_FileName(ByVal DataT As DataTable, ByVal findkey As String) As String
Dim DR() As DataRow = DataT.Select("섹션='" & findkey & "'")
If DR.GetUpperBound(0) = -1 Then Return ""
For Each DD As DataRow In DR
If DD("파일") <> "" Then Return DD("파일")
Next
Return ""
End Function
Private Shared Sub Add_StyleRow(ByVal Datat As DataTable, ByVal 설명 As String, ByVal As String, ByVal Findkey As String, ByVal 개체 As String, Optional ByVal 파일 As String = "")
Dim Dr As DataRow
Dr = Datat.NewRow
Dr(0) = 설명
Dr(1) =
Dr(2) = Findkey '//섹션
Dr(3) = 개체 '//개체
Dr(4) = "" '//키
If 파일 = "" Then
Dr(5) = "CFG"
Else
Dr(5) = 파일
End If
'//DESC경우에 파일을 찾을수없으므로 데이터베이스내에서검색한다(거의확인됨)
Datat.Rows.Add(Dr)
End Sub
End Class