複数のフォルダーに dcm ファイルをコミットするツールを使用しています。今、コミットしたい正確なフォルダーを管理するチェックボックスを追加しようとしているので、サブフォルダーにファイルを含めたい場合はチェックボックスを押します。問題は、チェックボックスがオフになっていても、サブフォルダーをロードから除外できないことです
これは私が取り組んでいる機能です:
Sub CheckBox1CheckedChanged()
If IO.Directory.GetDirectories(CWPathTB.Text).Length > 1 AndAlso checkBox1.Checked= False Then
'how to clear the subfolders and make them unseen in this condition
LoadChangedFiles2()
Else
FilesGrid.Rows.Clear()
LoadChangedFiles()
End If
End Sub
あなたの助けは大歓迎です:)
……
関数 :
Public Sub LoadChangedFiles2()
'loading all the modified , added and removed files only in the top directory into files grid
Dim b,j As Integer
Dim PushokClientt As New PushOkSvn.SVNClient
Dim ModiFiles As New ArrayList
Dim ConflFiles As New ArrayList
FileLocalPos1.Clear()
FileList1.Clear()
ModFileArr1.Clear()
ConfFileArr1.Clear()
AddedFileArr1.Clear()
RemovedFileArr1.Clear()
Dim LocDir As New IO.DirectoryInfo(CWPath)
Dim ignorSharcc As Boolean = False
Dim FInfoLoc() As IO.FileInfo = LocDir.GetFiles("*.dcm",IO.SearchOption.TopDirectoryOnly)
Dim FileInfoLoc As IO.FileInfo
For Each FileInfoLoc In FInfoLoc
If FileInfoLoc.FullName.Substring(FileInfoLoc.FullName.Length - 4 , 4 ) = ".dcm" Then
If Not FileInfoLoc.FullName.Contains("sharcc") Then
Dim TempFileName() As String
Dim FileName As String
TempFileName = FileInfoLoc.FullName.Split("\")
FileName = TempFileName(TempFileName.Length - 1)
If Not FileLocalPos1.Contains(FileName)Then
FileLocalPos1.Add(FileInfoLoc.FullName , FileName )
FileList1.Add(FileName)
Else
MsgBox("In Pfad exist two .dcm files with the same name . Choose an exacter Pfad . ")
Exit Sub
End If
Else
ignorSharcc = True
End If
End If
Next
If ignorSharcc = True Then
MsgBox("Sharcc folder has been ignored.")
End If
Call checkStatus2(CWPath, PushokClientt)
j=0
For b = 0 To ModFileArr1.Count - 1
Dim Filerow1 As String() = {False, ModFileArr1.Item(b).ToString, "Modified", FileLocalPos1.Item(ModFileArr1.Item(b).ToString)}
DcmComm.FilesGrid.Rows.Add(Filerow1)
j = j + 1
Next
For b = 0 To ConfFileArr.Count - 1
Dim Filerow1 As String() = {False, ConfFileArr1.Item(b).ToString, "Conflicted", FileLocalPos1.Item(ConfFileArr1.Item(b).ToString)}
DcmComm.FilesGrid.Rows.Add(Filerow1)
DcmComm.FilesGrid.Rows(j).DefaultCellStyle.BackColor = Color.DarkGray
DcmComm.FilesGrid.Rows(j).ReadOnly = True
MsgBox(ConfFileArr1.Item(b).ToString & " is out of date! Please update first! ")
j = j + 1
Next
For b = 0 To AddedFileArr1.Count - 1
Dim row1 As String() = {False, AddedFileArr1.Item(b).ToString, "Added", FileLocalPos1.Item(AddedFileArr1.Item(b).ToString)}
DcmComm.FilesGrid.Rows.Add(row1)
j = j + 1
Next
For b = 0 To RemovedFileArr1.Count - 1
Dim row1 As String() = {False, RemovedFileArr1.Item(b).ToString, "Removed", ""}
DcmComm.FilesGrid.Rows.Add(row1)
j = j + 1
Next
Exit Sub
End Sub
...................................
エラーは次の行に表示されます:
Dim Filerow1 As String() = {False, ModFileArr1.Item(b).ToString, "Modified", FileLocalPos1.Item(ModFileArr1.Item(b).ToString)}