Bläddra i källkod

corrections diverses

olivier.massot 9 år sedan
förälder
incheckning
14b6cee5d4
2 ändrade filer med 28 tillägg och 37 borttagningar
  1. 28 37
      source/modules/vcs.bas
  2. BIN
      vcs.accda.zip

+ 28 - 37
source/modules/vcs.bas

@@ -2,43 +2,46 @@ Option Compare Database
 
 Public Function vcsprompt()
     Dim prompt, prompttext, warning As String
-
+    Dim continue As Boolean
+    
     prompttext = "Write your command here:" & vbNewLine & _
                  "> 'makesources' to create or update the source files" & vbNewLine & _
                  "> 'update' to update the current application within the source files" & vbNewLine & _
-                 "> 'ok' to close this input box" & vbNewLine & _
                  "(see docs for more commands)"
     prompt = ""
+    continue = True
     
-    While prompt <> "ok"
+    While continue
         prompt = InputBox(prompttext, "VCS", "")
         
-        Select Case prompt
+        If Right(prompt, 1) = "&" Then
+            prompt = Left(prompt, Len(prompt) - 1)
+        Else
+            continue = False
+        End If
         
-        Case "makesources"
+        Select Case prompt
         
-            Call make_sources
-            MsgBox "Done"
+            Case "makesources"
             
-        Case "update"
-        
-            Call update_from_sources
-            MsgBox "Done"
-        
-        Case "sync"
-        
-            Call sync
-            MsgBox "Done"
-        
-        
-        Case vbNullString
-            MsgBox "Operation cancelled"
-            prompt = "ok"
+                Call make_sources
+                MsgBox "Done"
+                
+            Case "update"
             
-        Case "ok"
-        
-        Case Else
-            MsgBox "Unknown command"
+                Call update_from_sources
+                MsgBox "Done"
+            
+            Case "sync"
+            
+                Call sync
+                MsgBox "Done"
+            
+            Case vbNullString
+                
+            
+            Case Else
+                MsgBox "Unknown command"
         
         End Select
 whil:
@@ -52,12 +55,6 @@ End Function
 Public Function make_sources()
 'creates the source-code of the app
 
-    If CodeProject.Path = CurrentProject.Path Then
-        MsgBox "ERROR: you should not run VSC for VCS from here, VCS modules would not be exported" & vbNewLine & _
-                "Use VCS - AddIn instead"
-        Exit Function
-    End If
-
     Debug.Print "Zip the app file"
     Call zip_app_file
     Debug.Print "> done"
@@ -75,12 +72,6 @@ Public Function update_from_sources()
 'updates the application from the sources
 Dim backup As Boolean
 
-    If CodeProject.Path = CurrentProject.Path Then
-        MsgBox "ERROR: you should not run VSC for VCS from here, VCS modules would not be exported" & vbNewLine & _
-                "Use VCS - AddIn instead"
-        Exit Function
-    End If
-
     Debug.Print "Creates a backup of the app file"
     backup = make_backup()
     

BIN
vcs.accda.zip