home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmHTML
- BorderStyle = 3 'Fixed Dialog
- Caption = "ReportsWatcher - HTML Editor"
- ClientHeight = 5835
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5430
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5835
- ScaleWidth = 5430
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.Frame frmNvrFoot
- Caption = "Footer"
- Height = 1695
- Left = 120
- TabIndex = 28
- Top = 3420
- Width = 5175
- Begin VB.TextBox txtNvrFoot
- Height = 1335
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 29
- Tag = "</body></html>"
- Text = "html.frx":0000
- Top = 240
- Width = 4935
- End
- End
- Begin VB.Frame frmNvrHead
- Caption = "Header"
- Height = 2415
- Left = 120
- TabIndex = 26
- Top = 780
- Width = 5175
- Begin VB.TextBox txtNvrHead
- Height = 2085
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 27
- Tag = $"html.frx":0011
- Top = 240
- Width = 4935
- End
- End
- Begin VB.CommandButton cmdNvrUseDefault
- Caption = "&Use Default"
- Height = 375
- Left = 3720
- TabIndex = 25
- Top = 180
- Width = 1575
- End
- Begin VB.CommandButton OKButton
- Caption = "&OK"
- Height = 375
- Left = 1560
- TabIndex = 9
- Top = 5280
- Width = 1215
- End
- Begin VB.CommandButton CancelButton
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 2880
- TabIndex = 10
- Top = 5280
- Width = 1215
- End
- Begin VB.CommandButton cmdApply
- Caption = "&Apply"
- Height = 375
- Left = 4200
- TabIndex = 11
- Top = 5280
- Width = 1095
- End
- Begin VB.Frame frmSumHead
- Caption = "Header"
- Height = 2415
- Left = 120
- TabIndex = 24
- Top = 780
- Width = 5175
- Begin VB.TextBox txtSumHead
- Height = 2085
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Tag = $"html.frx":0267
- Top = 240
- Width = 4935
- End
- End
- Begin VB.Frame frmSumFoot
- Caption = "Footer"
- Height = 1695
- Left = 120
- TabIndex = 23
- Top = 3420
- Width = 5175
- Begin VB.TextBox txtSumFoot
- Height = 1335
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 5
- Tag = "</body></html>"
- Text = "html.frx":04E2
- Top = 240
- Width = 4935
- End
- End
- Begin VB.CommandButton cmdSumUseDefault
- Caption = "&Use Default"
- Height = 375
- Left = 3720
- TabIndex = 22
- Top = 180
- Width = 1575
- End
- Begin VB.Frame frmRepHead
- Caption = "Header"
- Height = 2415
- Left = 120
- TabIndex = 21
- Top = 780
- Width = 5175
- Begin VB.TextBox txtRepHead
- Height = 2085
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- Tag = $"html.frx":04F3
- Top = 240
- Width = 4935
- End
- End
- Begin VB.Frame frmRepFoot
- Caption = "Footer"
- Height = 1695
- Left = 120
- TabIndex = 20
- Top = 3420
- Width = 5175
- Begin VB.TextBox txtRepFoot
- Height = 1335
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 7
- Tag = "</body></html>"
- Text = "html.frx":06F6
- Top = 240
- Width = 4935
- End
- End
- Begin VB.CommandButton cmdRepUseDefault
- Caption = "&Use Default"
- Height = 375
- Left = 3720
- TabIndex = 19
- Top = 180
- Width = 1575
- End
- Begin VB.Frame frmSucHead
- Caption = "Header"
- Height = 2415
- Left = 120
- TabIndex = 18
- Top = 780
- Width = 5175
- Begin VB.TextBox txtSucHead
- Height = 2085
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 2
- Tag = $"html.frx":0707
- Top = 240
- Width = 4935
- End
- End
- Begin VB.Frame frmSucFoot
- Caption = "Footer"
- Height = 1695
- Left = 120
- TabIndex = 17
- Top = 3420
- Width = 5175
- Begin VB.TextBox txtSucFoot
- Height = 1335
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 6
- Tag = "</body></html>"
- Text = "html.frx":0906
- Top = 240
- Width = 4935
- End
- End
- Begin VB.CommandButton cmdSucUseDefault
- Caption = "&Use Default"
- Height = 375
- Left = 3720
- TabIndex = 16
- Top = 180
- Width = 1575
- End
- Begin VB.Frame frmErrHead
- Caption = "Header"
- Height = 2415
- Left = 120
- TabIndex = 15
- Top = 780
- Width = 5175
- Begin VB.TextBox txtErrHead
- Height = 2085
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 4
- Tag = $"html.frx":0917
- Top = 240
- Width = 4935
- End
- End
- Begin VB.Frame frmErrFoot
- Caption = "Footer"
- Height = 1695
- Left = 120
- TabIndex = 14
- Top = 3420
- Width = 5175
- Begin VB.TextBox txtErrFoot
- Height = 1335
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 8
- Tag = "</body></html>"
- Text = "html.frx":0B0C
- Top = 240
- Width = 4935
- End
- End
- Begin VB.CommandButton cmdErrUseDefault
- Caption = "&Use Default"
- Height = 375
- Left = 3720
- TabIndex = 13
- Top = 180
- Width = 1575
- End
- Begin VB.ComboBox cmbChooseHTML
- Height = 315
- ItemData = "html.frx":0B1D
- Left = 720
- List = "html.frx":0B30
- TabIndex = 0
- Text = "Summary"
- Top = 210
- Width = 2655
- End
- Begin VB.Label lblHTMLChooser
- Caption = "Report:"
- Height = 255
- Left = 120
- TabIndex = 12
- Top = 240
- Width = 615
- End
- Attribute VB_Name = "frmHTML"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- ' html.frm (frmHTML)
- ' Code for running the Edit HTML window.
- ' Copyright 1999 Dantz Development Corporation
- Option Explicit
- ' setApplyAndDefault
- ' Enable/disable the Apply and Default buttons.
- ' There is one Use Default button for each type of report.
- Private Sub setApplyAndDefault(Optional alwaysSet As Boolean = False)
- If (alwaysSet = False And Me.Visible = False) Then Exit Sub
- If (frmWatcher.GetHTMLData(kSummary, kHead) = txtSumHead And _
- frmWatcher.GetHTMLData(kSummary, kFoot) = txtSumFoot And _
- frmWatcher.GetHTMLData(kReport, kHead) = txtRepHead And _
- frmWatcher.GetHTMLData(kReport, kFoot) = txtRepFoot And _
- frmWatcher.GetHTMLData(kSuccess, kHead) = txtSucHead And _
- frmWatcher.GetHTMLData(kSuccess, kFoot) = txtSucFoot And _
- frmWatcher.GetHTMLData(kError, kHead) = txtErrHead And _
- frmWatcher.GetHTMLData(kError, kFoot) = txtErrFoot And _
- frmWatcher.GetHTMLData(kNever, kHead) = txtNvrHead And _
- frmWatcher.GetHTMLData(kNever, kFoot) = txtNvrFoot) Then
- cmdApply.Enabled = False ' No changes to apply
- Else
- cmdApply.Enabled = True
- End If
- ' Handle the "Use Default" buttons
- If (frmWatcher.GetHTMLDefault(kSummary, kHead) = txtSumHead And _
- frmWatcher.GetHTMLDefault(kSummary, kFoot) = txtSumFoot) Then
- cmdSumUseDefault.Enabled = False
- Else
- cmdSumUseDefault.Enabled = True
- End If
- If (frmWatcher.GetHTMLDefault(kReport, kHead) = txtRepHead And _
- frmWatcher.GetHTMLDefault(kReport, kFoot) = txtRepFoot) Then
- cmdRepUseDefault.Enabled = False
- Else
- cmdRepUseDefault.Enabled = True
- End If
- If (frmWatcher.GetHTMLDefault(kSuccess, kHead) = txtSucHead And _
- frmWatcher.GetHTMLDefault(kSuccess, kFoot) = txtSucFoot) Then
- cmdSucUseDefault.Enabled = False
- Else
- cmdSucUseDefault.Enabled = True
- End If
- If (frmWatcher.GetHTMLDefault(kError, kHead) = txtErrHead And _
- frmWatcher.GetHTMLDefault(kError, kFoot) = txtErrFoot) Then
- cmdErrUseDefault.Enabled = False ' No changes to apply
- Else
- cmdErrUseDefault.Enabled = True
- End If
- If (frmWatcher.GetHTMLDefault(kNever, kHead) = txtNvrHead And _
- frmWatcher.GetHTMLDefault(kNever, kFoot) = txtNvrFoot) Then
- cmdNvrUseDefault.Enabled = False ' No changes to apply
- Else
- cmdNvrUseDefault.Enabled = True
- End If
- End Sub
- ' cmbChooseHTML_*
- ' The following may be called whenever the popup menu changes.
- Private Sub cmbChooseHTML_Change()
- showForm
- End Sub
- Private Sub cmbChooseHTML_Click()
- showForm
- End Sub
- Private Sub cmbChooseHTML_DropDown()
- showForm
- End Sub
- Private Sub cmbChooseHTML_KeyDown(KeyCode As Integer, Shift As Integer)
- showForm
- End Sub
- Private Sub cmbChooseHTML_KeyUp(KeyCode As Integer, Shift As Integer)
- showForm
- End Sub
- ' OKButton_Click
- ' Implement the OK button
- Private Sub OKButton_Click()
- frmWatcher.InitDataFromForm
- Me.Hide
- setApplyAndDefault
- End Sub
- ' CancelButton_Click
- ' Implement the Cancel button
- Private Sub CancelButton_Click()
- frmWatcher.RevertForm
- Me.Hide
- setApplyAndDefault
- End Sub
- ' cmdApply_Click
- ' Implement the Apply button.
- Private Sub cmdApply_Click()
- frmWatcher.InitDataFromForm
- setApplyAndDefault
- End Sub
- ' Implement the Use Default buttons
- Private Sub cmdGenUseDefault_Click()
- frmWatcher.UseDefaultFromGen
- setApplyAndDefault
- End Sub
- Private Sub cmdSumUseDefault_Click()
- frmWatcher.UseDefaultFromSum
- setApplyAndDefault
- End Sub
- Private Sub cmdRepUseDefault_Click()
- frmWatcher.UseDefaultFromRep
- setApplyAndDefault
- End Sub
- Private Sub cmdSucUseDefault_Click()
- frmWatcher.UseDefaultFromSuc
- setApplyAndDefault
- End Sub
- Private Sub cmdErrUseDefault_Click()
- frmWatcher.UseDefaultFromErr
- setApplyAndDefault
- End Sub
- Private Sub cmdNvrUseDefault_Click()
- frmWatcher.UseDefaultFromNvr
- setApplyAndDefault
- End Sub
- ' showForm
- ' Set up the form and show it. This includes showing the correct fields.
- Sub showForm()
- Dim who
- who = cmbChooseHTML
- cmdSumUseDefault.Visible = (who = kSummaryStr)
- frmSumHead.Visible = (who = kSummaryStr)
- frmSumFoot.Visible = (who = kSummaryStr)
- cmdRepUseDefault.Visible = (who = kAllBackupsStr)
- frmRepHead.Visible = (who = kAllBackupsStr)
- frmRepFoot.Visible = (who = kAllBackupsStr)
- cmdSucUseDefault.Visible = (who = kSuccessfulBackupsStr)
- frmSucHead.Visible = (who = kSuccessfulBackupsStr)
- frmSucFoot.Visible = (who = kSuccessfulBackupsStr)
- cmdErrUseDefault.Visible = (who = kFailedBackupsStr)
- frmErrHead.Visible = (who = kFailedBackupsStr)
- frmErrFoot.Visible = (who = kFailedBackupsStr)
- cmdNvrUseDefault.Visible = (who = kNeverBackedUpStr)
- frmNvrHead.Visible = (who = kNeverBackedUpStr)
- frmNvrFoot.Visible = (who = kNeverBackedUpStr)
- setApplyAndDefault True
- Show
- End Sub
- ' The following call setApplyAndDefault whenever a field changes
- Private Sub txtSumHead_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtSumFoot_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtRepHead_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtRepFoot_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtSucHead_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtSucFoot_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtErrHead_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtErrFoot_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtNvrHead_Change()
- setApplyAndDefault
- End Sub
- Private Sub txtNvrFoot_Change()
- setApplyAndDefault
- End Sub
-