[ActiveLock-Development] CVS: alugen/app ALUGEN.vbp,1.6,1.7 frmMain.frm,1.6,1.7 frmMain.frx,1.4,1.5
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2004-07-19 12:09:30
|
Update of /cvsroot/activelock/alugen/app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15520 Modified Files: ALUGEN.vbp frmMain.frm frmMain.frx products.ini Log Message: Batch commit for 2.0.10 Index: ALUGEN.vbp =================================================================== RCS file: /cvsroot/activelock/alugen/app/ALUGEN.vbp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ALUGEN.vbp 16 May 2004 18:39:56 -0000 1.6 +++ ALUGEN.vbp 19 Jul 2004 12:09:14 -0000 1.7 @@ -20,11 +20,11 @@ CompatibleMode="1" MajorVer=2 MinorVer=0 -RevisionVer=6 +RevisionVer=10 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" -VersionLegalCopyright="Copyright © 2003" +VersionLegalCopyright="Copyright © 2003-2004" VersionProductName="ALUGEN" CompilationType=0 OptimizationType=0 Index: frmMain.frm =================================================================== RCS file: /cvsroot/activelock/alugen/app/frmMain.frm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- frmMain.frm 28 Apr 2004 10:00:45 -0000 1.6 +++ frmMain.frm 19 Jul 2004 12:09:14 -0000 1.7 @@ -1,39 +1,39 @@ VERSION 5.00 Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX" -Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" +Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "Tabctl32.ocx" Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX" Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form frmMain Appearance = 0 'Flat BorderStyle = 3 'Fixed Dialog Caption = "ActiveLock Universal GENerator" - ClientHeight = 5850 - ClientLeft = 45 - ClientTop = 330 - ClientWidth = 9735 + ClientHeight = 5844 + ClientLeft = 48 + ClientTop = 336 + ClientWidth = 9732 Icon = "frmMain.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False - ScaleHeight = 5850 - ScaleWidth = 9735 + ScaleHeight = 5844 + ScaleWidth = 9732 StartUpPosition = 3 'Windows Default Begin ComctlLib.StatusBar sbStatus Align = 2 'Align Bottom Height = 255 Left = 0 - TabIndex = 34 + TabIndex = 36 Top = 5595 Width = 9735 - _ExtentX = 17171 - _ExtentY = 450 + _ExtentX = 17166 + _ExtentY = 445 SimpleText = "" _Version = 327682 BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} NumPanels = 1 BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} AutoSize = 1 - Object.Width = 17119 + Object.Width = 17124 Text = "Ready" TextSave = "Ready" Key = "" @@ -47,8 +47,8 @@ TabIndex = 0 Top = 0 Width = 9735 - _ExtentX = 17171 - _ExtentY = 9895 + _ExtentX = 17166 + _ExtentY = 9885 _Version = 393216 Tabs = 2 TabHeight = 520 @@ -81,7 +81,7 @@ Width = 1000 End Begin VB.ComboBox cmbProds - Height = 315 + Height = 288 Left = -73560 Style = 2 'Dropdown List TabIndex = 16 @@ -95,11 +95,18 @@ TabIndex = 14 Top = 840 Width = 9495 + Begin VB.TextBox txtUser + Height = 315 + Left = 1320 + TabIndex = 24 + Top = 1080 + Width = 7095 + End Begin VB.CommandButton cmdBrowse Caption = "..." BeginProperty Font Name = "MS Sans Serif" - Size = 13.5 + Size = 13.8 Charset = 0 Weight = 400 Underline = 0 'False @@ -108,7 +115,7 @@ EndProperty Height = 315 Left = 8040 - TabIndex = 28 + TabIndex = 30 ToolTipText = "Generate liberation key for the above request code (which should not be blank)." Top = 4200 Width = 375 @@ -116,7 +123,7 @@ Begin VB.TextBox txtLibFile Height = 315 Left = 1320 - TabIndex = 27 + TabIndex = 29 Top = 4200 Width = 6735 End @@ -125,7 +132,7 @@ Enabled = 0 'False Height = 315 Left = 8520 - TabIndex = 29 + TabIndex = 31 ToolTipText = "Generate liberation key for the above request code (which should not be blank)." Top = 4200 Width = 975 @@ -162,21 +169,21 @@ BackColor = &H80000011& BeginProperty Font Name = "Courier New" - Size = 8.25 + Size = 8.4 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty - Height = 3075 + Height = 2592 Left = 1320 Locked = -1 'True MultiLine = -1 'True ScrollBars = 2 'Vertical - TabIndex = 24 + TabIndex = 26 Text = "frmMain.frx":0D35 - Top = 1080 + Top = 1560 Width = 7095 End Begin VB.CommandButton cmdKeyGen @@ -184,9 +191,9 @@ Enabled = 0 'False Height = 315 Left = 8520 - TabIndex = 25 + TabIndex = 27 ToolTipText = "Generate liberation key for the above request code (which should not be blank)." - Top = 1080 + Top = 1560 Width = 975 End Begin MSComDlg.CommonDialog CommonDlg @@ -196,11 +203,19 @@ _ExtentY = 847 _Version = 393216 End + Begin VB.Label Label11 + Caption = "User Name:" + Height = 252 + Left = 0 + TabIndex = 23 + Top = 1080 + Width = 1332 + End Begin VB.Label Label5 Caption = "Liberation &File:" Height = 255 Left = 0 - TabIndex = 26 + TabIndex = 28 Top = 4200 Width = 1335 End @@ -230,17 +245,17 @@ End Begin VB.Label Label12 Caption = "Liberation &Key:" - Height = 255 + Height = 252 Left = 0 - TabIndex = 23 - Top = 1080 - Width = 1335 + TabIndex = 25 + Top = 1560 + Width = 1332 End Begin VB.Label lblDays Caption = "days" Height = 255 Left = 2640 - TabIndex = 30 + TabIndex = 32 Top = 435 Width = 1335 End @@ -314,7 +329,7 @@ Caption = "GCode" Height = 255 Left = 5040 - TabIndex = 33 + TabIndex = 35 Top = 1080 Width = 1695 End @@ -322,7 +337,7 @@ Caption = "VCode" Height = 255 Left = 1320 - TabIndex = 32 + TabIndex = 34 Top = 1080 Width = 1695 End @@ -357,8 +372,8 @@ TabIndex = 11 Top = 2760 Width = 8265 - _ExtentX = 14579 - _ExtentY = 4895 + _ExtentX = 14584 + _ExtentY = 4890 _Version = 393216 Cols = 4 FixedCols = 0 @@ -379,7 +394,7 @@ Caption = "&Product List:" Height = 255 Left = 120 - TabIndex = 31 + TabIndex = 33 Top = 2520 Width = 1215 End @@ -400,7 +415,7 @@ Attribute VB_Exposed = False '* ActiveLock '* Copyright 1998-2002 Nelson Ferraz -'* Copyright 2003 The ActiveLock Software Group (ASG) +'* Copyright 2003-2004 The ActiveLock Software Group (ASG) '* All material is the property of the contributing authors. '* '* Redistribution and use in source and binary forms, with or without @@ -475,7 +490,12 @@ ' 28.04.04 - th2tran - Normalize date format to YYYY/MM/DD to handle different regional settings. ' This fixes the "type mismatch error" encountered by IActiveLock_Register() when ' it tried to call CDate() on a date string of the format yyyy.mm.dd. -' +' 11.07.04 - th2tran - Changed liberation file extension from .alb to .all +' - Added User Name text box to allow liberation key generation for lockToNone settings +' without requiring Installation Code to be entered. +' - Apparently, having the Code Generate button enabled for an added product was +' confusing to the users. So: Disable the Code Generate button after a product +' has been added to the list. i.e. only allow codeset generation once per product. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -774,7 +794,7 @@ ' Initialize AL Set ActiveLock = ActiveLock2.NewInstance() ActiveLock.KeyStoreType = alsFile - txtLibFile = App.Path & "\activelock.alb" + txtLibFile = App.Path & "\activelock.all" ' Initialize Generator Set GeneratorInstance = ALUGENLib.GeneratorInstance() @@ -870,13 +890,26 @@ End Sub Private Sub txtName_Change() + UpdateCodeGenButtonStatus UpdateAddButtonStatus End Sub Private Sub txtReqCodeIn_Change() UpdateKeyGenButtonStatus + If fDisableNotifications Then Exit Sub + fDisableNotifications = True + txtUser = GetUserFromInstallCode(txtReqCodeIn) + fDisableNotifications = False +End Sub + +Private Sub txtUser_Change() + If fDisableNotifications Then Exit Sub + fDisableNotifications = True + txtReqCodeIn = ActiveLock.InstallationCode(txtUser) + fDisableNotifications = False End Sub + Private Sub UpdateKeyGenButtonStatus() If txtReqCodeIn = "" Then cmdKeyGen.Enabled = False @@ -915,13 +948,14 @@ Private Sub UpdateCodeGenButtonStatus() If txtName = "" Or txtVer = "" Then cmdCodeGen.Enabled = False + ElseIf CheckDuplicate(txtName, txtVer) Then + cmdCodeGen.Enabled = False Else cmdCodeGen.Enabled = True End If End Sub Private Sub UpdateAddButtonStatus() - Dim fEnabled As Boolean If txtName = "" Or txtVer = "" Or txtCode1 = "" Then cmdAdd.Enabled = False ElseIf CheckDuplicate(txtName, txtVer) Then @@ -947,6 +981,17 @@ Next End Function +Private Function CheckDuplicateVCode(VCode As String) As Boolean + CheckDuplicateVCode = False + Dim i% + For i = 0 To gridProds.Rows - 1 + If gridProds.TextMatrix(i, 2) = VCode Then + CheckDuplicateVCode = True + End If + Next +End Function + + '' ' Initialize the GUI with the proper grid headings and alignments ' @@ -956,7 +1001,7 @@ With gridProds .Clear .Rows = 1 - .FormatString = "Name |Version | VCode |GCode " + .FormatString = "Name |Version | VCode |GCode " .ColAlignment(0) = flexAlignLeftCenter .ColAlignment(1) = flexAlignLeftCenter .ColAlignment(2) = flexAlignLeftCenter @@ -990,3 +1035,21 @@ AddRow .Name, .Version, .VCode, .GCode, False End With End Sub + +'' +' Retrieves lock string and user info from the request string +' +Private Function GetUserFromInstallCode(ByVal strInstCode As String) As String + If strInstCode = "" Then Exit Function + strInstCode = ActiveLock2.Base64Decode(strInstCode) + Dim Index%, i% + Index = 0: i = 1 + ' Get to the last vbLf, which denotes the ending of the lock code and beginning of user name. + Do While i > 0 + i = InStr(Index + 1, strInstCode, vbLf) + If i > 0 Then Index = i + Loop + ' user name starts from Index+1 to the end + GetUserFromInstallCode = Mid$(strInstCode, Index + 1) +End Function + Index: frmMain.frx =================================================================== RCS file: /cvsroot/activelock/alugen/app/frmMain.frx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 Binary files /tmp/cvs545lLl and /tmp/cvsyGeZaf differ Index: products.ini =================================================================== RCS file: /cvsroot/activelock/alugen/app/products.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- products.ini 5 Nov 2003 04:54:50 -0000 1.4 +++ products.ini 19 Jul 2004 12:09:14 -0000 1.5 @@ -3,3 +3,9 @@ Version=1.0 VCode=AAAAB3NzaC1yc2EAAAABJQAAAIB8/B2KWoai2WSGTRPcgmMoczeXpd8nv0Y4r1sJ1wV3vH21q4rTpEYuBiD4HFOpkbNBSRdpBHJGWec7jUi8ISV0pM6i2KznjhCms5CEtYHRybbiYvRXleGzFsAAP817PLN3JYo3WkErT2ofR5RCkfhmx060BT8waPoqnn3AB7sZ0Q== GCode=AAAAgEpQt55fVvkLo44f/fi8OvV08J9btR6NaAYHZpA6qU4dDHnbnqdawfHaIXDuP5VB4DSoABTt4xUS3IRGKz9tp5CWt8irOeRSSrt8fLhe3D1UtQgGBqoA4fujQC734ajLUcCvEGsao3Wf/vUH0V3991EyI973hAahUUWCbjhm8CflAAAAQPeCV4CpJfEbr/V2C6tEb1Cpoeow1JFJLGr8l6XmuIt8LCEG8E01rFoJzIQIcORl/htC3UDZHvxJRG2yo+8/FB8AAABAgUW/rGg1+0i7bL0UarO1gdzKQBVlGmJIMHpfbV+bLLlvr4qS6+FQaErN8JRtyEPrwHJrafDAdKg3G0BI37mUDwAAAEAIW/5Jxi1GPBagOt4LLY17TfoQH3YwigXy13FgpRuYA1fxzHIgF/Z0lSgI5+64K7CTonz5xEe6+Sk3i0WNYvPd + +[MyApp 1.0] +Name=MyApp +Version=1.0 +VCode=AAAAB3NzaC1yc2EAAAABJQAAAICkfLFku/R6Ag3GEu60w3mIIvIN+L3JxQiULI2db2baSsAGcA/aGgMzzBogh+UQB3lD3dr3ggdVXtn6G0V4OQ4zDBIc3o/8iWPUmpD7/5eGX3XKqOGvci2Pc8nzlDXGdvRxR73u31ibQkZ/ILU7BFkAAkG1njgSoZdoSXKr/y0dJQ== +GCode=AAAAgQCA7BxV32yW+rDZhHXnoCD7/7bMrjPjVT4TRYPAlZXNsDWkLlGdG06eODAnVcFflyexu7l14nRzWC5OaGbhsC24CYPRyMTQ1pWFVUZjt+MtXldQhspaSuZs722cEXuiMssadNLi8dz2jnttaBWcB5rTAPutmYa5yXZNx1CGCUtXOQAAAEDtnA8KNE+ULuWj4UDmbEMStNH7tLEfStAD911XDfS+0BFzuEBiHQp8jFHo8L7fa3oMtu3cDzS4rkcVQ/UwXD4DAAAAQLE3zTVO6SE4X1Tr/hQSPmGhBLHA42YVCFAAHpDH33dWNT74npgY0clRqnUtU/fqMiBs++ygSSWqd1kx6HxWQ7cAAABAkuRt1n9oI6CY+21UJ73BkZY1Yyl7TRLRePbi/aVKqjxPxM+7LEOWcROuQtliCNZ/v2ho0gjloWtcPPME7tES |