This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

php pastebin - collaborative irc debugging view php source

Paste #647

Posted by:
Posted on: 2026-03-06 19:28:04
Age: 3 days ago
Views: 13
Option Explicit

Public Const SETTINGS_FILE As String = "settings_.dat"

Private Sub Form_Load()
    LoadSettings
End Sub

'========================
' Загрузка настроек
'========================
Public Sub LoadSettings()

    Dim f As Integer
    Dim line1 As String
    
    If Dir$(SETTINGS_FILE) = "" Then
        enableIcons.Value = 1
        Exit Sub
    End If
    
    f = FreeFile
    Open SETTINGS_FILE For Input As #f
    
    If Not EOF(f) Then
        Line Input #f, line1
        
        If Trim(line1) = "1" Then
            enableIcons.Value = 1
        Else
            enableIcons.Value = 0
        End If
    End If
    
    Close #f

End Sub

'========================
' Сохранение настроек
'========================
Public Sub SaveSettings()

    Dim f As Integer
    
    f = FreeFile
    Open SETTINGS_FILE For Output As #f
    
    If enableIcons.Value = 1 Then
        Print #f, "1"
    Else
        Print #f, "0"
    End If
    
    Close #f

End Sub

'========================
' Получить значение enableIcons
'========================
Public Function IconsEnabled() As Boolean

    If enableIcons.Value = 1 Then
        IconsEnabled = True
    Else
        IconsEnabled = False
    End If

End Function

'========================
' OK
'========================
Private Sub cmdOK_Click()
    SaveSettings
End Sub

'========================
' Cancel
'========================
Private Sub cmdCancel_Click()
    Unload Me
End Sub

'========================
' Reset
'========================
Private Sub cmdReset_Click()
    enableIcons.Value = 1
End Sub

'========================
' Menu Close
'========================
Private Sub mnuClose_Click()
    Unload Me
End Sub

'========================
' Реальное переключение
'========================
Private Sub enableIcons_Click()

    Form1.UpdateTreeIcons IconsEnabled

End Sub

Download raw | Create new paste

© BitByByte, 2026.
Downgrade Counter