Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/dbs-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"Type": 4
},
"NavPane Width": {
"Value": 215,
"Value": 494,
"Type": 4
},
"Never Cache": {
Expand Down
137 changes: 83 additions & 54 deletions source/forms/ACLibImportWizardForm.bas
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Begin Form
GridY =10
Width =10214
DatasheetFontHeight =11
ItemSuffix =91
Left =3255
Top =2940
Right =15975
Bottom =12750
ItemSuffix =93
Left =5355
Top =3278
Right =17190
Bottom =10020
OnUnload ="[Event Procedure]"
RecSrcDt = Begin
0x212b6fd80e9ce340
Expand Down Expand Up @@ -733,7 +733,7 @@ Begin Form
Width =561
Height =228
FontSize =8
TabIndex =2
TabIndex =3
BackColor =14151142
BorderColor =0
ForeColor =0
Expand Down Expand Up @@ -764,71 +764,100 @@ Begin Form
SpecialEffect =0
OldBorderStyle =0
OverlapFlags =93
Left =113
Top =105
Width =8330
Height =397
TabIndex =3
Left =53
Top =53
Width =9414
Height =454
TabIndex =2
Name ="ogRepositorySource"
AfterUpdate ="[Event Procedure]"

LayoutCachedLeft =113
LayoutCachedTop =105
LayoutCachedWidth =8443
LayoutCachedHeight =502
LayoutCachedLeft =53
LayoutCachedTop =53
LayoutCachedWidth =9467
LayoutCachedHeight =507
Begin
Begin OptionButton
OverlapFlags =87
Left =3855
Top =203
OptionValue =1
Left =3878
Top =195
OptionValue =2
Name ="Option56"

LayoutCachedLeft =3855
LayoutCachedTop =203
LayoutCachedWidth =4115
LayoutCachedHeight =443
LayoutCachedLeft =3878
LayoutCachedTop =195
LayoutCachedWidth =4138
LayoutCachedHeight =435
Begin
Begin Label
OverlapFlags =247
Left =4085
Top =173
Left =4108
Top =165
Width =1921
Height =293
Name ="Label57"
Caption ="GitHub (web access)"
LayoutCachedLeft =4085
LayoutCachedTop =173
LayoutCachedWidth =6006
LayoutCachedHeight =466
LayoutCachedLeft =4108
LayoutCachedTop =165
LayoutCachedWidth =6029
LayoutCachedHeight =458
End
End
End
Begin OptionButton
OverlapFlags =87
Left =6292
Top =203
Left =6180
Top =195
Width =365
TabIndex =1
OptionValue =2
OptionValue =6
Name ="Option91"

LayoutCachedLeft =6180
LayoutCachedTop =195
LayoutCachedWidth =6545
LayoutCachedHeight =435
Begin
Begin Label
OverlapFlags =247
Left =6410
Top =165
Width =1013
Height =293
Name ="Label92"
Caption ="Packages"
LayoutCachedLeft =6410
LayoutCachedTop =165
LayoutCachedWidth =7423
LayoutCachedHeight =458
End
End
End
Begin OptionButton
OverlapFlags =87
Left =7507
Top =195
TabIndex =2
OptionValue =1
Name ="Option58"

LayoutCachedLeft =6292
LayoutCachedTop =203
LayoutCachedWidth =6552
LayoutCachedHeight =443
LayoutCachedLeft =7507
LayoutCachedTop =195
LayoutCachedWidth =7767
LayoutCachedHeight =435
Begin
Begin Label
OverlapFlags =247
Left =6522
Top =173
Left =7737
Top =165
Width =1643
Height =293
Name ="Label59"
Caption ="Local repository"
LayoutCachedLeft =6522
LayoutCachedTop =173
LayoutCachedWidth =8165
LayoutCachedHeight =466
LayoutCachedLeft =7737
LayoutCachedTop =165
LayoutCachedWidth =9380
LayoutCachedHeight =458
End
End
End
Expand Down Expand Up @@ -900,9 +929,9 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =6135
Left =6143
Top =960
Width =1703
Width =1786
Height =293
TabIndex =8
Name ="txtRepoName"
Expand All @@ -912,9 +941,9 @@ Begin Form
BottomPadding =150
HorizontalAnchor =2

LayoutCachedLeft =6135
LayoutCachedLeft =6143
LayoutCachedTop =960
LayoutCachedWidth =7838
LayoutCachedWidth =7929
LayoutCachedHeight =1253
ColumnStart =4
ColumnEnd =4
Expand Down Expand Up @@ -952,7 +981,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =3600
Left =3608
Top =960
Width =1703
Height =293
Expand All @@ -963,9 +992,9 @@ Begin Form
GroupTable =1
BottomPadding =150

LayoutCachedLeft =3600
LayoutCachedLeft =3608
LayoutCachedTop =960
LayoutCachedWidth =5303
LayoutCachedWidth =5311
LayoutCachedHeight =1253
ColumnStart =2
ColumnEnd =2
Expand Down Expand Up @@ -1023,7 +1052,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =8805
Left =8813
Top =960
Width =1290
Height =293
Expand All @@ -1035,9 +1064,9 @@ Begin Form
BottomPadding =150
HorizontalAnchor =2

LayoutCachedLeft =8805
LayoutCachedLeft =8813
LayoutCachedTop =960
LayoutCachedWidth =10095
LayoutCachedWidth =10103
LayoutCachedHeight =1253
ColumnStart =6
ColumnEnd =6
Expand All @@ -1050,15 +1079,15 @@ Begin Form
Begin Label
OverlapFlags =85
TextAlign =3
Left =7905
Left =7988
Top =960
Width =840
Width =757
Height =293
Name ="Label78"
Caption ="Branch:"
GroupTable =1
BottomPadding =150
LayoutCachedLeft =7905
LayoutCachedLeft =7988
LayoutCachedTop =960
LayoutCachedWidth =8745
LayoutCachedHeight =1253
Expand Down
40 changes: 30 additions & 10 deletions source/forms/ACLibImportWizardForm.cls
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ Option Explicit
' verwendete Erweiterungen
Private Const EXTENSION_KEY_APPFILE As String = "AppFile"
Private Const APPFILE_PROPNAME_APPICON As String = "AppIcon"
Private Const RepositorySource_GitHub As Long = 1
Private Const RepositorySource_LocalRepository As Long = 2
Private Const RepositorySource_LocalRepository As Long = 1
Private Const RepositorySource_GitHub As Long = 2
Private Const RepositorySource_Package As Long = 4

Private Const TEMPDB_TABNAME As String = "tRepositoryFiles"
Private Const TEMPDB_TABDDL As String = "create table " & TEMPDB_TABNAME & " (LocalRepositoryPath varchar(255) primary key, ObjectName varchar(255), Description memo)"
Expand Down Expand Up @@ -171,7 +172,7 @@ On Error GoTo HandleErr
Me.Repaint

Set ACLibFileMngr = CurrentACLibFileManager
If Me.ogRepositorySource = RepositorySource_GitHub Then
If (Me.ogRepositorySource And RepositorySource_GitHub) = RepositorySource_GitHub Then
Set m_ACLibFileManager = ACLibFileMngr
Else '
Set m_ACLibFileManager = Nothing
Expand Down Expand Up @@ -409,7 +410,9 @@ On Error GoTo HandleErr
Loop
End If

StartFolder = CurrentLocalRepositoryPath & StartFolder
If Mid(StartFolder, 2, 1) <> ":" Then
StartFolder = CurrentLocalRepositoryPath & StartFolder
End If
Do While Not DirExists(StartFolder)
Pos = InStrRev(StartFolder, "\")
If Pos = 0 Then Exit Do
Expand Down Expand Up @@ -670,13 +673,30 @@ Private Sub ConfigReproSourceMode(Optional NewMode As Long = 0)
End Sub

Private Sub SetACLibGitHubImporterConfig()
If Me.ogRepositorySource = RepositorySource_GitHub Then
If Len(Me.txtGitHubAuthPersonalAccessToken.Value) > 0 Then
ACLibGitHubImporter.GitHubApiAuthorizationToken = Me.txtGitHubAuthPersonalAccessToken.Value
End If
If (Me.ogRepositorySource.Value And RepositorySource_GitHub) = RepositorySource_GitHub Then
If Len(Me.txtGitHubAuthPersonalAccessToken.Value) > 0 Then
ACLibGitHubImporter.GitHubApiAuthorizationToken = Me.txtGitHubAuthPersonalAccessToken.Value
End If
If (Me.ogRepositorySource.Value And RepositorySource_Package) = RepositorySource_Package Then
SetRepositoryData "AccessCodeLib", "ACLibImportWizard-Package", "main"
ElseIf Me.txtRepoName.Value = "ACLibImportWizard-Package" Then
SetRepositoryData "AccessCodeLib", "AccessCodeLib", "master"
End If
End If
End Sub

Private Sub SetRepositoryData(ByVal RepositoryOwner As String, ByVal RepositoryName As String, ByVal BranchName As String)

Me.txtRepoOwner.Value = RepositoryOwner
Me.txtRepoName.Value = RepositoryName
Me.txtRepoBranch.Value = BranchName

ACLibGitHubImporter.RepositoryOwner = RepositoryOwner
ACLibGitHubImporter.RepositoryName = RepositoryName
ACLibGitHubImporter.BranchName = BranchName

End Sub

Private Sub Form_Unload(ByRef Cancel As Integer)
On Error Resume Next
If Not (m_TempDb Is Nothing) Then
Expand Down Expand Up @@ -846,7 +866,7 @@ Private Sub AddFileFromFileName(ByVal ACLibFileString As String)

On Error GoTo HandleErr

If Me.ogRepositorySource = RepositorySource_GitHub Then
If (Me.ogRepositorySource.Value And RepositorySource_GitHub) = RepositorySource_GitHub Then

FileArray(0) = ACLibFileString
DownLoadFiles FileArray
Expand Down Expand Up @@ -1139,7 +1159,7 @@ Private Sub OpenRepositoryFileInTextViewer(ByVal ACLibPath As String)

Dim FullPath As String

If Me.ogRepositorySource = RepositorySource_GitHub Then
If (Me.ogRepositorySource.Value And RepositorySource_GitHub) = RepositorySource_GitHub Then
FullPath = DownLoadFile(ACLibPath)
Else
FullPath = CurrentACLibFileManager.GetRepositoryFullPath(ACLibPath)
Expand Down
Loading