Changeset 5


Ignore:
Timestamp:
Nov 27, 2008, 12:46:04 PM (16 years ago)
Author:
george
Message:
  • Odstraněno: Funkce a ovládací prvky související s vytáčením VPN.
Location:
trunk
Files:
5 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      *.dcu
      KonfiguratorZdechovNET.exe
      KonfiguratorZdechovNET.res
  • trunk/KonfiguratorZdechovNET.bdsproj

    r1 r5  
    11<?xml version="1.0" encoding="utf-8"?>
    22<BorlandProject>
    3   <PersonalityInfo>
    4     <Option>
    5       <Option Name="Personality">Delphi.Personality</Option>
    6       <Option Name="ProjectType"></Option>
    7       <Option Name="Version">1.0</Option>
    8       <Option Name="GUID">{71588091-4F13-462B-AF60-39BC3B3B376F}</Option>
    9     </Option>
    10   </PersonalityInfo>
    11   <Delphi.Personality>
    12     <Source>
    13       <Source Name="MainSource">KonfiguratorZdechovNET.dpr</Source>
    14     </Source>
    15     <FileVersion>
    16       <FileVersion Name="Version">7.0</FileVersion>
    17     </FileVersion>
    18     <Compiler>
    19       <Compiler Name="A">8</Compiler>
    20       <Compiler Name="B">0</Compiler>
    21       <Compiler Name="C">1</Compiler>
    22       <Compiler Name="D">1</Compiler>
    23       <Compiler Name="E">0</Compiler>
    24       <Compiler Name="F">0</Compiler>
    25       <Compiler Name="G">1</Compiler>
    26       <Compiler Name="H">1</Compiler>
    27       <Compiler Name="I">1</Compiler>
    28       <Compiler Name="J">0</Compiler>
    29       <Compiler Name="K">0</Compiler>
    30       <Compiler Name="L">1</Compiler>
    31       <Compiler Name="M">0</Compiler>
    32       <Compiler Name="N">1</Compiler>
    33       <Compiler Name="O">1</Compiler>
    34       <Compiler Name="P">1</Compiler>
    35       <Compiler Name="Q">0</Compiler>
    36       <Compiler Name="R">0</Compiler>
    37       <Compiler Name="S">0</Compiler>
    38       <Compiler Name="T">0</Compiler>
    39       <Compiler Name="U">0</Compiler>
    40       <Compiler Name="V">1</Compiler>
    41       <Compiler Name="W">0</Compiler>
    42       <Compiler Name="X">1</Compiler>
    43       <Compiler Name="Y">1</Compiler>
    44       <Compiler Name="Z">1</Compiler>
    45       <Compiler Name="ShowHints">True</Compiler>
    46       <Compiler Name="ShowWarnings">True</Compiler>
    47       <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
    48       <Compiler Name="NamespacePrefix"></Compiler>
    49       <Compiler Name="GenerateDocumentation">False</Compiler>
    50       <Compiler Name="DefaultNamespace"></Compiler>
    51       <Compiler Name="SymbolDeprecated">True</Compiler>
    52       <Compiler Name="SymbolLibrary">True</Compiler>
    53       <Compiler Name="SymbolPlatform">True</Compiler>
    54       <Compiler Name="SymbolExperimental">True</Compiler>
    55       <Compiler Name="UnitLibrary">True</Compiler>
    56       <Compiler Name="UnitPlatform">True</Compiler>
    57       <Compiler Name="UnitDeprecated">True</Compiler>
    58       <Compiler Name="UnitExperimental">True</Compiler>
    59       <Compiler Name="HResultCompat">True</Compiler>
    60       <Compiler Name="HidingMember">True</Compiler>
    61       <Compiler Name="HiddenVirtual">True</Compiler>
    62       <Compiler Name="Garbage">True</Compiler>
    63       <Compiler Name="BoundsError">True</Compiler>
    64       <Compiler Name="ZeroNilCompat">True</Compiler>
    65       <Compiler Name="StringConstTruncated">True</Compiler>
    66       <Compiler Name="ForLoopVarVarPar">True</Compiler>
    67       <Compiler Name="TypedConstVarPar">True</Compiler>
    68       <Compiler Name="AsgToTypedConst">True</Compiler>
    69       <Compiler Name="CaseLabelRange">True</Compiler>
    70       <Compiler Name="ForVariable">True</Compiler>
    71       <Compiler Name="ConstructingAbstract">True</Compiler>
    72       <Compiler Name="ComparisonFalse">True</Compiler>
    73       <Compiler Name="ComparisonTrue">True</Compiler>
    74       <Compiler Name="ComparingSignedUnsigned">True</Compiler>
    75       <Compiler Name="CombiningSignedUnsigned">True</Compiler>
    76       <Compiler Name="UnsupportedConstruct">True</Compiler>
    77       <Compiler Name="FileOpen">True</Compiler>
    78       <Compiler Name="FileOpenUnitSrc">True</Compiler>
    79       <Compiler Name="BadGlobalSymbol">True</Compiler>
    80       <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
    81       <Compiler Name="InvalidDirective">True</Compiler>
    82       <Compiler Name="PackageNoLink">True</Compiler>
    83       <Compiler Name="PackageThreadVar">True</Compiler>
    84       <Compiler Name="ImplicitImport">True</Compiler>
    85       <Compiler Name="HPPEMITIgnored">True</Compiler>
    86       <Compiler Name="NoRetVal">True</Compiler>
    87       <Compiler Name="UseBeforeDef">True</Compiler>
    88       <Compiler Name="ForLoopVarUndef">True</Compiler>
    89       <Compiler Name="UnitNameMismatch">True</Compiler>
    90       <Compiler Name="NoCFGFileFound">True</Compiler>
    91       <Compiler Name="ImplicitVariants">True</Compiler>
    92       <Compiler Name="UnicodeToLocale">True</Compiler>
    93       <Compiler Name="LocaleToUnicode">True</Compiler>
    94       <Compiler Name="ImagebaseMultiple">True</Compiler>
    95       <Compiler Name="SuspiciousTypecast">True</Compiler>
    96       <Compiler Name="PrivatePropAccessor">True</Compiler>
    97       <Compiler Name="UnsafeType">False</Compiler>
    98       <Compiler Name="UnsafeCode">False</Compiler>
    99       <Compiler Name="UnsafeCast">False</Compiler>
    100       <Compiler Name="OptionTruncated">True</Compiler>
    101       <Compiler Name="WideCharReduced">True</Compiler>
    102       <Compiler Name="DuplicatesIgnored">True</Compiler>
    103       <Compiler Name="UnitInitSeq">True</Compiler>
    104       <Compiler Name="LocalPInvoke">True</Compiler>
    105       <Compiler Name="MessageDirective">True</Compiler>
    106       <Compiler Name="CodePage"></Compiler>
    107     </Compiler>
    108     <Linker>
    109       <Linker Name="MapFile">0</Linker>
    110       <Linker Name="OutputObjs">0</Linker>
    111       <Linker Name="GenerateHpps">False</Linker>
    112       <Linker Name="ConsoleApp">1</Linker>
    113       <Linker Name="DebugInfo">False</Linker>
    114       <Linker Name="RemoteSymbols">False</Linker>
    115       <Linker Name="GenerateDRC">False</Linker>
    116       <Linker Name="MinStackSize">16384</Linker>
    117       <Linker Name="MaxStackSize">1048576</Linker>
    118       <Linker Name="ImageBase">4194304</Linker>
    119       <Linker Name="ExeDescription"></Linker>
    120     </Linker>
    121     <Directories>
    122       <Directories Name="OutputDir"></Directories>
    123       <Directories Name="UnitOutputDir"></Directories>
    124       <Directories Name="PackageDLLOutputDir"></Directories>
    125       <Directories Name="PackageDCPOutputDir"></Directories>
    126       <Directories Name="SearchPath"></Directories>
    127       <Directories Name="Packages"></Directories>
    128       <Directories Name="Conditionals"></Directories>
    129       <Directories Name="DebugSourceDirs"></Directories>
    130       <Directories Name="UsePackages">False</Directories>
    131     </Directories>
    132     <Parameters>
    133       <Parameters Name="RunParams"></Parameters>
    134       <Parameters Name="HostApplication"></Parameters>
    135       <Parameters Name="Launcher"></Parameters>
    136       <Parameters Name="UseLauncher">False</Parameters>
    137       <Parameters Name="DebugCWD"></Parameters>
    138       <Parameters Name="Debug Symbols Search Path"></Parameters>
    139       <Parameters Name="LoadAllSymbols">True</Parameters>
    140       <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
    141     </Parameters>
    142     <Language>
    143       <Language Name="ActiveLang"></Language>
    144       <Language Name="ProjectLang">$00000000</Language>
    145       <Language Name="RootDir"></Language>
    146     </Language>
    147     <VersionInfo>
    148       <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
    149       <VersionInfo Name="AutoIncBuild">False</VersionInfo>
    150       <VersionInfo Name="MajorVer">1</VersionInfo>
    151       <VersionInfo Name="MinorVer">0</VersionInfo>
    152       <VersionInfo Name="Release">0</VersionInfo>
    153       <VersionInfo Name="Build">0</VersionInfo>
    154       <VersionInfo Name="Debug">False</VersionInfo>
    155       <VersionInfo Name="PreRelease">False</VersionInfo>
    156       <VersionInfo Name="Special">False</VersionInfo>
    157       <VersionInfo Name="Private">False</VersionInfo>
    158       <VersionInfo Name="DLL">False</VersionInfo>
    159       <VersionInfo Name="Locale">1029</VersionInfo>
    160       <VersionInfo Name="CodePage">1250</VersionInfo>
    161     </VersionInfo>
    162     <VersionInfoKeys>
    163       <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
    164       <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
    165       <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
    166       <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
    167       <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
    168       <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
    169       <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
    170       <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
    171       <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
    172       <VersionInfoKeys Name="Comments"></VersionInfoKeys>
    173     </VersionInfoKeys>
    174   </Delphi.Personality>
    175   <StarTeamAssociation></StarTeamAssociation>
    176   <StarTeamNonRelativeFiles></StarTeamNonRelativeFiles>
     3        <PersonalityInfo>
     4                <Option>
     5                        <Option Name="Personality">Delphi.Personality</Option>
     6                        <Option Name="ProjectType"></Option>
     7                        <Option Name="Version">1.0</Option>
     8                        <Option Name="GUID">{71588091-4F13-462B-AF60-39BC3B3B376F}</Option>
     9                </Option>
     10        </PersonalityInfo>
     11        <Delphi.Personality>
     12                <Source>
     13                        <Source Name="MainSource">KonfiguratorZdechovNET.dpr</Source>
     14                </Source>
     15                <FileVersion>
     16                        <FileVersion Name="Version">7.0</FileVersion>
     17                </FileVersion>
     18                <Compiler>
     19                        <Compiler Name="A">8</Compiler>
     20                        <Compiler Name="B">0</Compiler>
     21                        <Compiler Name="C">1</Compiler>
     22                        <Compiler Name="D">1</Compiler>
     23                        <Compiler Name="E">0</Compiler>
     24                        <Compiler Name="F">0</Compiler>
     25                        <Compiler Name="G">1</Compiler>
     26                        <Compiler Name="H">1</Compiler>
     27                        <Compiler Name="I">1</Compiler>
     28                        <Compiler Name="J">0</Compiler>
     29                        <Compiler Name="K">0</Compiler>
     30                        <Compiler Name="L">1</Compiler>
     31                        <Compiler Name="M">0</Compiler>
     32                        <Compiler Name="N">1</Compiler>
     33                        <Compiler Name="O">1</Compiler>
     34                        <Compiler Name="P">1</Compiler>
     35                        <Compiler Name="Q">0</Compiler>
     36                        <Compiler Name="R">0</Compiler>
     37                        <Compiler Name="S">0</Compiler>
     38                        <Compiler Name="T">0</Compiler>
     39                        <Compiler Name="U">0</Compiler>
     40                        <Compiler Name="V">1</Compiler>
     41                        <Compiler Name="W">0</Compiler>
     42                        <Compiler Name="X">1</Compiler>
     43                        <Compiler Name="Y">1</Compiler>
     44                        <Compiler Name="Z">1</Compiler>
     45                        <Compiler Name="ShowHints">True</Compiler>
     46                        <Compiler Name="ShowWarnings">True</Compiler>
     47                        <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
     48                        <Compiler Name="NamespacePrefix"></Compiler>
     49                        <Compiler Name="GenerateDocumentation">False</Compiler>
     50                        <Compiler Name="DefaultNamespace"></Compiler>
     51                        <Compiler Name="SymbolDeprecated">True</Compiler>
     52                        <Compiler Name="SymbolLibrary">True</Compiler>
     53                        <Compiler Name="SymbolPlatform">True</Compiler>
     54                        <Compiler Name="SymbolExperimental">True</Compiler>
     55                        <Compiler Name="UnitLibrary">True</Compiler>
     56                        <Compiler Name="UnitPlatform">True</Compiler>
     57                        <Compiler Name="UnitDeprecated">True</Compiler>
     58                        <Compiler Name="UnitExperimental">True</Compiler>
     59                        <Compiler Name="HResultCompat">True</Compiler>
     60                        <Compiler Name="HidingMember">True</Compiler>
     61                        <Compiler Name="HiddenVirtual">True</Compiler>
     62                        <Compiler Name="Garbage">True</Compiler>
     63                        <Compiler Name="BoundsError">True</Compiler>
     64                        <Compiler Name="ZeroNilCompat">True</Compiler>
     65                        <Compiler Name="StringConstTruncated">True</Compiler>
     66                        <Compiler Name="ForLoopVarVarPar">True</Compiler>
     67                        <Compiler Name="TypedConstVarPar">True</Compiler>
     68                        <Compiler Name="AsgToTypedConst">True</Compiler>
     69                        <Compiler Name="CaseLabelRange">True</Compiler>
     70                        <Compiler Name="ForVariable">True</Compiler>
     71                        <Compiler Name="ConstructingAbstract">True</Compiler>
     72                        <Compiler Name="ComparisonFalse">True</Compiler>
     73                        <Compiler Name="ComparisonTrue">True</Compiler>
     74                        <Compiler Name="ComparingSignedUnsigned">True</Compiler>
     75                        <Compiler Name="CombiningSignedUnsigned">True</Compiler>
     76                        <Compiler Name="UnsupportedConstruct">True</Compiler>
     77                        <Compiler Name="FileOpen">True</Compiler>
     78                        <Compiler Name="FileOpenUnitSrc">True</Compiler>
     79                        <Compiler Name="BadGlobalSymbol">True</Compiler>
     80                        <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
     81                        <Compiler Name="InvalidDirective">True</Compiler>
     82                        <Compiler Name="PackageNoLink">True</Compiler>
     83                        <Compiler Name="PackageThreadVar">True</Compiler>
     84                        <Compiler Name="ImplicitImport">True</Compiler>
     85                        <Compiler Name="HPPEMITIgnored">True</Compiler>
     86                        <Compiler Name="NoRetVal">True</Compiler>
     87                        <Compiler Name="UseBeforeDef">True</Compiler>
     88                        <Compiler Name="ForLoopVarUndef">True</Compiler>
     89                        <Compiler Name="UnitNameMismatch">True</Compiler>
     90                        <Compiler Name="NoCFGFileFound">True</Compiler>
     91                        <Compiler Name="ImplicitVariants">True</Compiler>
     92                        <Compiler Name="UnicodeToLocale">True</Compiler>
     93                        <Compiler Name="LocaleToUnicode">True</Compiler>
     94                        <Compiler Name="ImagebaseMultiple">True</Compiler>
     95                        <Compiler Name="SuspiciousTypecast">True</Compiler>
     96                        <Compiler Name="PrivatePropAccessor">True</Compiler>
     97                        <Compiler Name="UnsafeType">False</Compiler>
     98                        <Compiler Name="UnsafeCode">False</Compiler>
     99                        <Compiler Name="UnsafeCast">False</Compiler>
     100                        <Compiler Name="OptionTruncated">True</Compiler>
     101                        <Compiler Name="WideCharReduced">True</Compiler>
     102                        <Compiler Name="DuplicatesIgnored">True</Compiler>
     103                        <Compiler Name="UnitInitSeq">True</Compiler>
     104                        <Compiler Name="LocalPInvoke">True</Compiler>
     105                        <Compiler Name="MessageDirective">True</Compiler>
     106                        <Compiler Name="CodePage"></Compiler>
     107                </Compiler>
     108                <Linker>
     109                        <Linker Name="MapFile">0</Linker>
     110                        <Linker Name="OutputObjs">0</Linker>
     111                        <Linker Name="GenerateHpps">False</Linker>
     112                        <Linker Name="ConsoleApp">1</Linker>
     113                        <Linker Name="DebugInfo">False</Linker>
     114                        <Linker Name="RemoteSymbols">False</Linker>
     115                        <Linker Name="GenerateDRC">False</Linker>
     116                        <Linker Name="MinStackSize">16384</Linker>
     117                        <Linker Name="MaxStackSize">1048576</Linker>
     118                        <Linker Name="ImageBase">4194304</Linker>
     119                        <Linker Name="ExeDescription"></Linker>
     120                </Linker>
     121                <Directories>
     122                        <Directories Name="OutputDir"></Directories>
     123                        <Directories Name="UnitOutputDir"></Directories>
     124                        <Directories Name="PackageDLLOutputDir"></Directories>
     125                        <Directories Name="PackageDCPOutputDir"></Directories>
     126                        <Directories Name="SearchPath"></Directories>
     127                        <Directories Name="Packages"></Directories>
     128                        <Directories Name="Conditionals"></Directories>
     129                        <Directories Name="DebugSourceDirs"></Directories>
     130                        <Directories Name="UsePackages">False</Directories>
     131                </Directories>
     132                <Parameters>
     133                        <Parameters Name="RunParams"></Parameters>
     134                        <Parameters Name="HostApplication"></Parameters>
     135                        <Parameters Name="Launcher"></Parameters>
     136                        <Parameters Name="UseLauncher">False</Parameters>
     137                        <Parameters Name="DebugCWD"></Parameters>
     138                        <Parameters Name="Debug Symbols Search Path"></Parameters>
     139                        <Parameters Name="LoadAllSymbols">True</Parameters>
     140                        <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
     141                </Parameters>
     142                <Language>
     143                        <Language Name="ActiveLang"></Language>
     144                        <Language Name="ProjectLang">$00000000</Language>
     145                        <Language Name="RootDir"></Language>
     146                </Language>
     147                <VersionInfo>
     148                        <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
     149                        <VersionInfo Name="AutoIncBuild">False</VersionInfo>
     150                        <VersionInfo Name="MajorVer">1</VersionInfo>
     151                        <VersionInfo Name="MinorVer">0</VersionInfo>
     152                        <VersionInfo Name="Release">0</VersionInfo>
     153                        <VersionInfo Name="Build">0</VersionInfo>
     154                        <VersionInfo Name="Debug">False</VersionInfo>
     155                        <VersionInfo Name="PreRelease">False</VersionInfo>
     156                        <VersionInfo Name="Special">False</VersionInfo>
     157                        <VersionInfo Name="Private">False</VersionInfo>
     158                        <VersionInfo Name="DLL">False</VersionInfo>
     159                        <VersionInfo Name="Locale">1029</VersionInfo>
     160                        <VersionInfo Name="CodePage">1250</VersionInfo>
     161                </VersionInfo>
     162                <VersionInfoKeys>
     163                        <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
     164                        <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
     165                        <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
     166                        <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
     167                        <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
     168                        <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
     169                        <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
     170                        <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
     171                        <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
     172                        <VersionInfoKeys Name="Comments"></VersionInfoKeys>
     173                </VersionInfoKeys>
     174        </Delphi.Personality>
     175        <StarTeamAssociation></StarTeamAssociation>
     176        <StarTeamNonRelativeFiles></StarTeamNonRelativeFiles>
    177177</BorlandProject>
  • trunk/KonfiguratorZdechovNET.dpr

    r4 r5  
    1010  ULogExceptions in 'ULogExceptions.pas' {LogExceptions},
    1111  UMapFile in 'UMapFile.pas',
    12   UDialingLog in 'UDialingLog.pas' {DialingLog},
    1312  UTextFileStream in 'UTextFileStream.pas',
    1413  UServiceControl in 'ServiceControl\UServiceControl.pas';
     
    2322  Application.CreateForm(TAboutWindow, AboutWindow);
    2423  Application.CreateForm(TLogExceptions, LogExceptions);
    25   Application.CreateForm(TDialingLog, DialingLog);
    2624  MainForm.Init;
    2725  Application.Run;
  • trunk/UMainForm.dfm

    r4 r5  
    22  Left = 287
    33  Top = 165
    4   Width = 351
    5   Height = 447
    64  Caption = 'Nastaven'#237
     5  ClientHeight = 255
     6  ClientWidth = 359
    77  Color = clBtnFace
    88  Constraints.MinHeight = 289
     
    1919  OnShow = FormShow
    2020  DesignSize = (
    21     343
    22     413)
     21    359
     22    255)
    2323  PixelsPerInch = 96
    2424  TextHeight = 13
    2525  object Bevel1: TBevel
    2626    Left = 8
    27     Top = 370
    28     Width = 329
     27    Top = 212
     28    Width = 345
    2929    Height = 2
    3030    Anchors = [akLeft, akRight, akBottom]
     31    ExplicitTop = 370
     32    ExplicitWidth = 329
    3133  end
    3234  object Button1: TButton
    33     Left = 264
    34     Top = 378
     35    Left = 280
     36    Top = 220
    3537    Width = 75
    3638    Height = 25
     
    3941    TabOrder = 0
    4042    OnClick = Button1Click
     43    ExplicitLeft = 264
     44    ExplicitTop = 378
    4145  end
    4246  object Button2: TButton
    43     Left = 184
    44     Top = 378
     47    Left = 200
     48    Top = 220
    4549    Width = 75
    4650    Height = 25
     
    4953    TabOrder = 1
    5054    OnClick = Button2Click
    51   end
    52   object GroupBox1: TGroupBox
    53     Left = 8
    54     Top = 96
    55     Width = 329
    56     Height = 145
    57     Anchors = [akLeft, akTop, akRight]
    58     Caption = 'VPN p'#345'ipojen'#237
    59     TabOrder = 2
    60     object Label1: TLabel
    61       Left = 8
    62       Top = 40
    63       Width = 81
    64       Height = 13
    65       Caption = 'Vyt'#225#269'et p'#345'ipojen'#237
    66     end
    67     object Label2: TLabel
    68       Left = 216
    69       Top = 98
    70       Width = 31
    71       Height = 13
    72       Caption = 'Label2'
    73     end
    74     object Label4: TLabel
    75       Left = 8
    76       Top = 120
    77       Width = 129
    78       Height = 13
    79       Caption = 'Vyt'#225#269'et, pokud dom'#233'na je '
    80     end
    81     object CheckBox1: TCheckBox
    82       Left = 8
    83       Top = 80
    84       Width = 153
    85       Height = 17
    86       Caption = 'Znovu vyto'#269'it p'#345'i odpojen'#237
    87       TabOrder = 0
    88     end
    89     object ComboBox1: TComboBox
    90       Left = 104
    91       Top = 36
    92       Width = 153
    93       Height = 21
    94       Style = csDropDownList
    95       ItemHeight = 13
    96       TabOrder = 1
    97     end
    98     object CheckBox2: TCheckBox
    99       Left = 8
    100       Top = 96
    101       Width = 201
    102       Height = 17
    103       Caption = 'P'#345'idat sm'#283'rov'#225'n'#237' do cel'#233' lok'#225'ln'#237' s'#237't'#283
    104       TabOrder = 2
    105     end
    106     object CheckBox7: TCheckBox
    107       Left = 8
    108       Top = 64
    109       Width = 113
    110       Height = 17
    111       Hint = 'P'#345'ipojen'#237' bude vyto'#269'eno p'#345'i ka'#382'd'#233'm startu po'#269#237'ta'#269'e.'
    112       Caption = 'Vyto'#269'it p'#345'i startu'
    113       TabOrder = 3
    114     end
    115     object CheckBox8: TCheckBox
    116       Left = 8
    117       Top = 16
    118       Width = 297
    119       Height = 17
    120       Hint =
    121         'Tato volba vytvo'#345#237' v nov'#233' s'#237#357'ov'#233' p'#345'ipojen'#237'. P'#345'ed vyto'#269'en'#237'm je nu' +
    122         'tn'#233' zadat heslo pro v'#225#353' po'#269#237'ta'#269'.'
    123       Caption = 'P'#345'idat s'#237#357'ov'#233' p'#345'ipojen'#237' Zd'#283'chovNET (nutno doplnit heslo)'
    124       TabOrder = 4
    125     end
    126     object Edit2: TEdit
    127       Left = 144
    128       Top = 116
    129       Width = 121
    130       Height = 21
    131       TabOrder = 5
    132       Text = 'Edit2'
    133     end
     55    ExplicitLeft = 184
     56    ExplicitTop = 378
    13457  end
    13558  object CheckBox4: TCheckBox
     
    13962    Height = 17
    14063    Caption = 'Domovsk'#225' str'#225'nka v prohl'#237#382'e'#269'i jako http://centrala.zdechov.net/'
    141     TabOrder = 3
     64    TabOrder = 2
    14265  end
    14366  object Button3: TButton
    14467    Left = 8
    145     Top = 378
     68    Top = 220
    14669    Width = 81
    14770    Height = 25
    14871    Anchors = [akLeft, akBottom]
    14972    Caption = 'Aktivovat v'#353'e'
    150     TabOrder = 4
     73    TabOrder = 3
    15174    OnClick = Button3Click
     75    ExplicitTop = 378
    15276  end
    15377  object CheckBox5: TCheckBox
     
    15781    Height = 17
    15882    Caption = 'Pracovn'#237' skupina ZDECHOV'
    159     TabOrder = 5
     83    TabOrder = 4
    16084  end
    16185  object CheckBox6: TCheckBox
     
    16589    Height = 17
    16690    Caption = 'Povolit v br'#225'n'#283' Firewall sd'#237'len'#237' pro celou lok'#225'ln'#237' s'#237#357
    167     TabOrder = 6
     91    TabOrder = 5
    16892  end
    16993  object CheckBox9: TCheckBox
     
    17397    Height = 17
    17498    Caption = 'Vytvo'#345'it sd'#237'lenou slo'#382'ku C:\Net pro z'#225'pis'
    175     TabOrder = 7
    176   end
    177   object GroupBox2: TGroupBox
    178     Left = 8
    179     Top = 248
    180     Width = 329
    181     Height = 105
    182     Anchors = [akLeft, akTop, akRight]
    183     Caption = 'Z'#225'znam vyt'#225#269'en'#237
    184     TabOrder = 8
    185     DesignSize = (
    186       329
    187       105)
    188     object Label3: TLabel
    189       Left = 8
    190       Top = 52
    191       Width = 82
    192       Height = 13
    193       Caption = 'Cesta k souboru:'
    194     end
    195     object CheckBox10: TCheckBox
    196       Left = 8
    197       Top = 16
    198       Width = 233
    199       Height = 17
    200       Caption = 'Zaznamen'#225'vat lad'#237'c'#237' informace do souboru'
    201       TabOrder = 0
    202       OnClick = CheckBox10Click
    203     end
    204     object Edit1: TEdit
    205       Left = 8
    206       Top = 68
    207       Width = 241
    208       Height = 21
    209       Anchors = [akLeft, akTop, akRight]
    210       TabOrder = 1
    211     end
    212     object Button4: TButton
    213       Left = 259
    214       Top = 66
    215       Width = 62
    216       Height = 25
    217       Anchors = [akTop, akRight]
    218       Caption = 'Vybrat...'
    219       TabOrder = 2
    220       OnClick = Button4Click
    221     end
    222     object CheckBox3: TCheckBox
    223       Left = 8
    224       Top = 32
    225       Width = 233
    226       Height = 17
    227       Caption = 'Mazat soubor p'#345'i spu'#353't'#283'n'#237
    228       TabOrder = 3
    229       OnClick = CheckBox10Click
    230     end
    231   end
    232   object CheckBox11: TCheckBox
    233     Left = 8
    234     Top = 80
    235     Width = 129
    236     Height = 17
    237     Caption = 'Vyt'#225#269'et VPN p'#345'ipojen'#237
    238     TabOrder = 9
     99    TabOrder = 6
    239100  end
    240101  object CoolTrayIcon1: TCoolTrayIcon
     
    425286      object Spustit1: TMenuItem
    426287        Caption = 'Spustit'
    427         OnClick = Spustit1Click
    428288      end
    429289      object Zasavit1: TMenuItem
    430290        Caption = 'Zasavit'
    431         OnClick = Zasavit1Click
    432291      end
    433292    end
    434293    object Zznamvyten1: TMenuItem
    435294      Caption = 'Z'#225'znam vyt'#225#269'en'#237
    436       OnClick = Zznamvyten1Click
    437295    end
    438296    object Oprogramu1: TMenuItem
     
    454312    Top = 16
    455313  end
    456   object MagRasCon1: TMagRasCon
    457     SubEntry = 1
    458     CallbackId = 0
    459     CountryID = 0
    460     CountryCode = 0
    461     EntryOptions = 0
    462     DialMode = 0
    463     Left = 72
    464     Top = 16
    465   end
    466   object MagRasEdt1: TMagRasEdt
    467     bUseCountryAndAreaCodes = False
    468     bSpecificIPAddress = False
    469     bSpecificNameServers = False
    470     bHeaderCompression = False
    471     bRemoteDefaultGateway = False
    472     bDisableLCPExtensions = False
    473     bTerminalBeforeDial = False
    474     bTerminalAfterDial = False
    475     bModemLights = False
    476     bSoftwareCompression = False
    477     bRequireEncryptedPassword = False
    478     bRequireMSEncryptedPassword = False
    479     bRequireDataEncryption = False
    480     bNetworkLogon = False
    481     bUseLogonCredentials = False
    482     bPromoteAlternates = False
    483     bSecureLocalFiles = False
    484     bRequireEAP = False
    485     bRequirePAP = False
    486     bRequireSPAP = False
    487     bCustom = False
    488     bPreviewPhoneNumber = False
    489     bSharedPhoneNumbers = False
    490     bPreviewUserPw = False
    491     bPreviewDomain = False
    492     bShowDialingProgress = False
    493     bRequireCHAP = False
    494     bRequireMsCHAP = False
    495     bRequireMsCHAP2 = False
    496     bRequireW95MSCHAP = False
    497     bCustomScript = False
    498     CountryCode = 0
    499     CountryID = 0
    500     IPAddress = '0.0.0.0'
    501     DNSAddress = '0.0.0.0'
    502     DNSAddressAlt = '0.0.0.0'
    503     WINSAddress = '0.0.0.0'
    504     WINSAddressAlt = '0.0.0.0'
    505     FrameSize = 0
    506     FramingProtocol = framePPP
    507     bNetBEUI = False
    508     bNetIPX = False
    509     bNetTCPIP = False
    510     ISDNChannels = 0
    511     DialMode = dialAll
    512     DialExtraPercent = 0
    513     DialExtraSampleSeconds = 0
    514     HangUpExtraPercent = 0
    515     HangUpExtraSampleSeconds = 0
    516     IdleDisconnectSeconds = -1
    517     PType = typePhone
    518     EncryptionType = encryptOptional
    519     CustomAuthKey = 0
    520     VpnStrategy = vpnDefault
    521     bSecureFileAndPrint = False
    522     bSecureClientForMSNet = False
    523     bDontNegotiateMultilink = False
    524     bDontUseRasCredentials = False
    525     bUsePreSharedKey = False
    526     bInternet = False
    527     bDisableNbtOverIP = False
    528     bUseGlobalDeviceSettings = False
    529     bReconnectIfDropped = False
    530     bSharePhoneNumbers = False
    531     TcpWindowSize = 0
    532     RedialCount = 0
    533     RedialPause = 0
    534     Left = 40
    535     Top = 16
    536   end
    537314end
  • trunk/UMainForm.pas

    r4 r5  
    66  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    77  Dialogs, StdCtrls, ComCtrls, ShellApi, DosCommand, Registry, Menus,
    8   CoolTrayIcon, ExtCtrls, XPMan, magrascon, magrasedt, magrasent, SHFolder,
    9   ShlObj, magrasapi, Winsock, UTextFileStream;
     8  CoolTrayIcon, ExtCtrls, XPMan, SHFolder,
     9  ShlObj, Winsock, UTextFileStream;
    1010
    1111const
     
    3939    Button1: TButton;
    4040    Button2: TButton;
    41     GroupBox1: TGroupBox;
    42     CheckBox1: TCheckBox;
    43     ComboBox1: TComboBox;
    44     Label1: TLabel;
    45     CheckBox2: TCheckBox;
    4641    Bevel1: TBevel;
    4742    CheckBox4: TCheckBox;
     
    5550    XPManifest1: TXPManifest;
    5651    CheckBox6: TCheckBox;
    57     CheckBox7: TCheckBox;
    58     CheckBox8: TCheckBox;
    5952    Oprogramu1: TMenuItem;
    6053    CheckBox9: TCheckBox;
    6154    Zznamvyten1: TMenuItem;
    62     Label2: TLabel;
    6355    OpenDialog1: TOpenDialog;
    64     GroupBox2: TGroupBox;
    65     CheckBox10: TCheckBox;
    66     Label3: TLabel;
    67     Edit1: TEdit;
    68     Button4: TButton;
    69     MagRasCon1: TMagRasCon;
    70     MagRasEdt1: TMagRasEdt;
    71     CheckBox3: TCheckBox;
    7256    VPNpipojen1: TMenuItem;
    73     CheckBox11: TCheckBox;
    7457    Spustit1: TMenuItem;
    7558    Zasavit1: TMenuItem;
    76     Label4: TLabel;
    77     Edit2: TEdit;
    7859    procedure FormShow(Sender: TObject);
    7960    procedure Button2Click(Sender: TObject);
     
    8667    procedure Button3Click(Sender: TObject);
    8768    procedure Oprogramu1Click(Sender: TObject);
    88     procedure Zznamvyten1Click(Sender: TObject);
    89     procedure Button4Click(Sender: TObject);
    90     procedure CheckBox10Click(Sender: TObject);
    91     procedure Spustit1Click(Sender: TObject);
    92     procedure Zasavit1Click(Sender: TObject);
    9369  private
    9470    procedure LoadOptions;
    9571    procedure SaveOptions;
    96     function GetLocalNetworkRouting: Boolean;
    97     procedure SetLocalNetworkRouting(const Value: Boolean);
    9872    function GetCentralaHomepage: Boolean;
    9973    procedure SetCentralaHomepage(const Value: Boolean);
     
    10478    function GetShareUnblockFirewall: Boolean;
    10579    procedure SetShareUnblockFirewall(const Value: Boolean);
    106     function GetZdechovNetConnection: Boolean;
    107     procedure SetZdechovNetConnection(const Value: Boolean);
    10880    function GetNetSharedFolder: Boolean;
    10981    procedure SetNetSharedFolder(const Value: Boolean);
    110     function GetLogFileEnabled: Boolean;
    111     procedure SetLogFileEnabled(const Value: Boolean);
    112     function GetLogFileName: string;
    113     procedure SetLogFileName(const Value: string);
    114     function GetConnectionName: string;
    115     procedure SetConnectionName(const Value: string);
    116     function GetLogClearOnStart: Boolean;
    117     procedure SetLogClearOnStart(const Value: Boolean);
    118     function GetVpnServiceEnabled: Boolean;
    119     procedure SetVpnServiceEnabled(const Value: Boolean);
    120     function GetVpnServiceRunning: Boolean;
    121     procedure SetVpnServiceRunning(const Value: Boolean);
    12282    function GetNetworkDomain: string;
    123     function GetConditionNetworkDomain: string;
    124     procedure SetConditionNetworkDomain(const Value: string);
    12583  public
    126     DefaultGateway: string;
    12784    FirstStart: Boolean;
    12885    HostFilterIndex: Integer;
    12986    PingTimeout: Integer;
    130     AutoDial: Boolean;
    131     AutoRedial: Boolean;
    13287    NetworkTestLastUpdate: TDateTime;
    133     property LocalNetworkRouting: Boolean read GetLocalNetworkRouting
    134       write SetLocalNetworkRouting;
    13588    property CentralaHomepage: Boolean read GetCentralaHomepage
    13689      write SetCentralaHomepage;
     
    14194    property ShareUnblockFirewall: Boolean read GetShareUnblockFirewall
    14295      write SetShareUnblockFirewall;
    143     property ZdechovNetConnection: Boolean read GetZdechovNetConnection
    144       write SetZdechovNetConnection;
    14596    property NetSharedFolder: Boolean read GetNetSharedFolder
    14697      write SetNetSharedFolder;
    147     property LogFileEnabled: Boolean read GetLogFileEnabled
    148       write SetLogFileEnabled;
    149     property LogFileName: string read GetLogFileName
    150       write SetLogFileName;
    151     property LogClearOnStart: Boolean read GetLogClearOnStart
    152       write SetLogClearOnStart;
    153     property ConnectionName: string read GetConnectionName
    154       write SetConnectionName;
    155     property VpnServiceEnabled: Boolean read GetVpnServiceEnabled
    156       write SetVpnServiceEnabled;
    157     property VpnServiceRunning: Boolean read GetVpnServiceRunning
    158       write SetVpnServiceRunning;
    15998    property NetworkDomain: string read GetNetworkDomain;
    160     property ConditionNetworkDomain: string read GetConditionNetworkDomain
    161       write SetConditionNetworkDomain;
    16299
    163100    procedure Init;
    164     procedure AddConnection;
    165     procedure DeleteConnection;
    166101  end;
    167102
     
    178113
    179114uses UNetworkTest, UAboutWindow, ULogExceptions, DateUtils, Math,
    180   UDialingLog, StrUtils, UServiceControl;
     115  StrUtils, UServiceControl;
    181116
    182117{$R *.dfm}
     
    260195end;
    261196
    262 function TMainForm.GetLocalNetworkRouting: Boolean;
    263 var
    264   Command: TDosCommand;
    265   I: Integer;
    266   Lines2: TStringList;
    267 begin
    268   Lines2 := TStringList.Create;
    269   Result := False;
    270   Command := TDosCommand.Create(nil);
    271   with Command do try
    272     CommandLine := 'route print ' + LocalNetAddr + ' mask ' + LocalNetMask +
    273       ' ' + DefaultGateway + ' metric 30';
    274     OutputLines := Lines2;
    275     Execute2;
    276     for I := 0 to Lines2.Count - 1 do
    277       if Pos(LocalNetMask, Lines2[I]) > 0 then Result := True;
    278   finally
    279     Free;
    280     Lines2.Free;
    281   end;
    282 end;
    283 
    284 procedure TMainForm.SetLocalNetworkRouting(const Value: Boolean);
    285 var
    286   Command: TDosCommand;
    287 begin
    288   Command := TDosCommand.Create(nil);
    289   with Command do try
    290     if Value then CommandLine := 'route -p add '+LocalNetAddr+' mask '+LocalNetMask+' '+DefaultGateway+' metric 30'
    291       else CommandLine := 'route delete '+LocalNetAddr+' mask '+LocalNetMask+' '+DefaultGateway+' metric 30';
    292     Execute2;
    293   finally
    294     Free;
    295   end;
    296 end;
    297 
    298197function TMainForm.GetCentralaHomepage: Boolean;
    299198begin
     
    327226  LogExceptions.NazevAplikace := ApplicationName + ' ' + Version;
    328227
    329   CheckBox1.Checked := AutoRedial;
    330   CheckBox2.Checked := LocalNetworkRouting;
    331   CheckBox3.Checked := LogClearOnStart;
    332228  CheckBox4.Checked := CentralaHomepage;
    333229  CheckBox5.Checked := WorkgroupZdechov;
    334230  CheckBox6.Checked := ShareUnblockFirewall;
    335   CheckBox7.Checked := AutoDial;
    336   CheckBox8.Checked := ZdechovNetConnection;
    337231  CheckBox9.Checked := NetSharedFolder;
    338 
    339         MagRasCon1.GetPhoneBookEntries;
    340   ComboBox1.Items.Assign(MagRasCon1.PhoneBookEntries);
    341   ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(ConnectionName);
    342   Edit2.Text := ConditionNetworkDomain;
    343 
    344   CheckBox10.Checked := LogFileEnabled;
    345   CheckBox11.Checked := VpnServiceEnabled;
    346   Edit1.Text := LogFileName;
    347   Edit1.Enabled := LogFileEnabled;
    348   Button4.Enabled := LogFileEnabled;
    349 
    350   Label2.Caption := 'Brána: ' + DefaultGateway;
    351232end;
    352233
     
    358239procedure TMainForm.Button1Click(Sender: TObject);
    359240begin
    360   AutoRedial := CheckBox1.Checked;
    361   LocalNetworkRouting := CheckBox2.Checked;
    362   LogClearOnStart := CheckBox3.Checked;
    363241  CentralaHomepage := CheckBox4.Checked;
    364242  WorkgroupZdechov := CheckBox5.Checked;
    365243  ShareUnblockFirewall := CheckBox6.Checked;
    366   AutoDial := CheckBox7.Checked;
    367   ZdechovNetConnection := CheckBox8.Checked;
    368244  NetSharedFolder := CheckBox9.Checked;
    369   LogFileEnabled := CheckBox10.Checked;
    370   LogFileName := Edit1.Text;
    371   VpnServiceEnabled := CheckBox11.Checked;
    372 
    373   ConditionNetworkDomain := Edit2.Text;
    374   ConnectionName := ComboBox1.Items.Strings[ComboBox1.ItemIndex];
     245
    375246  CoolTrayIcon1.HideMainForm;
    376247  SaveOptions;
     
    456327  LoadOptions;
    457328  Application.ShowMainForm := not FirstStart;
    458   VpnServiceRunning;
    459329end;
    460330
     
    506376end;
    507377
    508 procedure TMainForm.AddConnection;
    509 var
    510   I: Integer;
    511 begin
    512   if MagRasCon1.ValidateName(DefaultConnectionName) = 0 then
    513   with MagRasEdt1 do begin
    514     PPPDefault;
    515     PhoneBookPath := '';  // 4.60
    516     // telephone numbers
    517     SetCanonical(ConnectionHost) ;
    518 
    519     // dial params
    520     UserName := LowerCase(GetComputerNetName);
    521     Password := '';
    522 
    523     bPreviewUserPw := True;
    524     bShowDialingProgress := True;
    525     bRequireCHAP := False;
    526     bRequireMSEncryptedPassword := False;
    527     bSoftwareCompression := True;
    528     bCustom := True;
    529 
    530     // device stuff
    531     I := 0;
    532     MagRasCon1.GetDeviceList;
    533     while (I < MagRasCon1.DeviceNameList.Count) and
    534       (Pos('PPTP', MagRasCon1.DeviceNameList[I]) = 0) do I := I + 1;
    535     DeviceName := MagRasCon1.DeviceNameList[I];
    536     DeviceType := MagRasCon1.DeviceTypeList[I] ;
    537     if PutAllEntryProps(DefaultConnectionName) = 0 then
    538       PutDialProps (DefaultConnectionName);
    539   end;
    540 end;
    541 
    542 function TMainForm.GetZdechovNetConnection: Boolean;
    543 var
    544   I: Integer;
    545 begin
    546   MagRasGetEntryList('');
    547   I := 0;
    548   while (I < MagRasNumEntryRec) and
    549     (MagRasEntryRecs[I].EntryName <> DefaultConnectionName) do I := I + 1;
    550   Result := I < MagRasNumEntryRec;
    551 end;
    552 
    553 procedure TMainForm.SetZdechovNetConnection(const Value: Boolean);
    554 begin
    555   if Value then AddConnection else DeleteConnection;
    556 end;
    557 
    558 procedure TMainForm.DeleteConnection;
    559 begin
    560   with MagRasCon1 do begin
    561     EntryName := DefaultConnectionName;
    562     DeletePhonebook;
    563   end;
    564 end;
    565 
    566378procedure TMainForm.Button3Click(Sender: TObject);
    567379begin
    568   CheckBox1.Checked := True;
    569   CheckBox2.Checked := True;
    570   CheckBox3.Checked := True;
    571380  CheckBox4.Checked := True;
    572381  CheckBox5.Checked := True;
    573382  CheckBox6.Checked := True;
    574   CheckBox7.Checked := True;
    575   CheckBox8.Checked := True;
    576383  CheckBox9.Checked := True;
    577   CheckBox11.Checked := True;
    578   ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(DefaultConnectionName);
    579384end;
    580385
     
    618423end;
    619424
    620 procedure TMainForm.Zznamvyten1Click(Sender: TObject);
    621 begin
    622 //  if not DialingLog.Visible then DialingLog.ShowModal;
    623   ShellLaunch(LogFileName);
    624 end;
    625 
    626425procedure TMainForm.Init;
    627426var
    628   WSAErr: string;
    629427  Hostname: string;
    630428begin
    631429  HostName := 'default';
    632   GetIPFromHost(Hostname, DefaultGateway, WSAErr);
    633   DefaultGateway := ReverseString(DefaultGateway);
    634   DefaultGateway := '1'+Copy(DefaultGateway, Pos('.', DefaultGateway), 255);
    635   DefaultGateway := ReverseString(DefaultGateway);
    636430
    637431  //DefaultGateway := GetDefaultGateway;
     
    644438  PName = ^Name;
    645439var
    646   HEnt: pHostEnt; 
     440  HEnt: pHostEnt;
    647441  HName: PName;
    648442  WSAData: TWSAData;
    649443  i: Integer;
    650444begin
    651   Result := False;     
     445  Result := False;
    652446  if WSAStartup($0101, WSAData) <> 0 then begin
    653447    WSAErr := 'Winsock is not responding."';
     
    678472end;
    679473
    680 procedure TMainForm.Button4Click(Sender: TObject);
    681 begin
    682   OpenDialog1.FileName := Edit1.Text;
    683   if OpenDialog1.Execute then begin
    684     Edit1.Text := OpenDialog1.FileName;
    685   end;
    686 end;
    687 
    688 procedure TMainForm.CheckBox10Click(Sender: TObject);
    689 begin
    690   Edit1.Enabled := CheckBox10.Checked;
    691   Button4.Enabled := CheckBox10.Checked;
    692 end;
    693 
    694 function TMainForm.GetLogFileEnabled: Boolean;
    695 begin
    696   with TRegistry.Create do
    697   try
    698     RootKey := HKEY_LOCAL_MACHINE;
    699     OpenKey(RegistryPath, True);
    700     if ValueExists('LogFileEnabled') then Result := ReadBool('LogFileEnabled')
    701       else Result := False;
    702   finally
    703     Free;
    704   end;
    705 end;
    706 
    707 procedure TMainForm.SetLogFileEnabled(const Value: Boolean);
    708 begin
    709   with TRegistry.Create do
    710   try
    711     RootKey := HKEY_LOCAL_MACHINE;
    712     OpenKey(RegistryPath, True);
    713     WriteBool('LogFileEnabled', Value)
    714   finally
    715     Free;
    716   end;
    717 end;
    718 
    719 function TMainForm.GetLogFileName: string;
    720 begin
    721   with TRegistry.Create do
    722   try
    723     RootKey := HKEY_LOCAL_MACHINE;
    724     OpenKey(RegistryPath, True);
    725     if ValueExists('LogFileName') then Result := ReadString('LogFileName')
    726       else Result := ApplicationDataFolder + '\' + DefaultLogFileName;
    727   finally
    728     Free;
    729   end;
    730 end;
    731 
    732 procedure TMainForm.SetLogFileName(const Value: string);
    733 begin
    734   with TRegistry.Create do
    735   try
    736     RootKey := HKEY_LOCAL_MACHINE;
    737     OpenKey(RegistryPath, True);
    738     WriteString('LogFileName', Value)
    739   finally
    740     Free;
    741   end;
    742 end;
    743 
    744474procedure TMainForm.LoadOptions;
    745475begin
     
    750480      if ValueExists('FirstStart') then FirstStart := ReadBool('FirstStart')
    751481        else FirstStart := False;
    752       if ValueExists('AutoDial') then AutoDial := ReadBool('AutoDial');
    753       if ValueExists('AutoRedial') then AutoRedial := ReadBool('AutoRedial');
    754       if ValueExists('ConnectionName') then ConnectionName := ReadString('ConnectionName');
    755482      if ValueExists('NetworkTestLastUpdate') then NetworkTestLastUpdate := StrToDate(ReadString('NetworkTestLastUpdate'));
    756483      if ValueExists('PingTimeout') then PingTimeout := ReadInteger('PingTimeout')
    757484        else PingTimeout := 200;
    758       if ValueExists('LogFileEnabled') then LogFileEnabled := ReadBool('LogFileEnabled')
    759         else LogFileEnabled := False;
    760       if ValueExists('LogFileName') then LogFileName := ReadString('LogFileName')
    761         else LogFileName := ApplicationDataFolder + '\' + DefaultLogFileName;
    762485    finally
    763486      Free;
     
    772495      OpenKey(RegistryPath, True);
    773496      WriteBool('FirstStart', True);
    774       WriteBool('AutoDial', AutoDial);
    775       WriteBool('AutoRedial', AutoRedial);
    776       WriteString('ConnectionName', ConnectionName);
    777497      WriteString('NetworkTestLastUpdate', DateToStr(NetworkTestLastUpdate));
    778498      WriteInteger('PingTimeout', PingTimeout);
    779       WriteBool('LogFileEnabled', LogFileEnabled);
    780       WriteString('LogFileName', LogFileName);
    781499    finally
    782500      Free;
    783501    end;
    784 end;
    785 
    786 function TMainForm.GetConnectionName: string;
    787 begin
    788   with TRegistry.Create do
    789   try
    790     RootKey := HKEY_LOCAL_MACHINE;
    791     OpenKey(RegistryPath, True);
    792     if ValueExists('ConnectionName') then Result := ReadString('ConnectionName')
    793       else Result := '';
    794   finally
    795     Free;
    796   end;
    797 end;
    798 
    799 procedure TMainForm.SetConnectionName(const Value: string);
    800 begin
    801   with TRegistry.Create do
    802   try
    803     RootKey := HKEY_LOCAL_MACHINE;
    804     OpenKey(RegistryPath, True);
    805     WriteString('ConnectionName', Value)
    806   finally
    807     Free;
    808   end;
    809 end;
    810 
    811 function TMainForm.GetLogClearOnStart: Boolean;
    812 begin
    813   with TRegistry.Create do
    814   try
    815     RootKey := HKEY_LOCAL_MACHINE;
    816     OpenKey(RegistryPath, True);
    817     if ValueExists('LogClearOnStart') then Result := ReadBool('LogClearOnStart')
    818       else Result := False;
    819   finally
    820     Free;
    821   end;
    822 end;
    823 
    824 procedure TMainForm.SetLogClearOnStart(const Value: Boolean);
    825 begin
    826   with TRegistry.Create do
    827   try
    828     RootKey := HKEY_LOCAL_MACHINE;
    829     OpenKey(RegistryPath, True);
    830     WriteBool('LogClearOnStart', Value)
    831   finally
    832     Free;
    833   end;
    834 end;
    835 
    836 function TMainForm.GetVpnServiceEnabled: Boolean;
    837 var
    838   ServiceControl: TServiceControl;
    839 begin
    840   ServiceControl := TServiceControl.Create;
    841   with ServiceControl do begin
    842     ReadServicesList;
    843     try
    844       Result := True;
    845       IndexByName(DiallingServiceName);
    846     except
    847       Result := False;
    848     end;
    849   end;
    850   ServiceControl.Free;
    851 end;
    852 
    853 procedure TMainForm.SetVpnServiceEnabled(const Value: Boolean);
    854 var
    855   Command: TDosCommand;
    856 begin
    857   Command := TDosCommand.Create(nil);
    858   with Command do try
    859     if Value and not VpnServiceEnabled then begin
    860       CommandLine := ExtractFileDir(Application.ExeName)+'\DiallingService.exe /install /silent';
    861       Execute2;
    862     end;
    863     if not Value and VpnServiceEnabled then begin
    864         VpnServiceRunning := False;
    865         CommandLine := ExtractFileDir(Application.ExeName)+'\DiallingService.exe /uninstall /silent';
    866         Execute2;
    867       end;
    868   finally
    869     Free;
    870   end;
    871   GetVpnServiceRunning;
    872 end;
    873 
    874 function TMainForm.GetVpnServiceRunning: Boolean;
    875 var
    876   ServiceControl: TServiceControl;
    877 begin
    878   Result := False;
    879   Spustit1.Enabled := False;
    880   Zasavit1.Enabled := False;
    881   ServiceControl := TServiceControl.Create;
    882   with ServiceControl do begin
    883     ReadServicesList;
    884     try
    885       with Services[IndexByName(DiallingServiceName)] do begin
    886         Result := State = ssRunning;
    887         Spustit1.Enabled := (State = ssStopped) or (State = ssStopPending);
    888         Zasavit1.Enabled := (State = ssRunning) or (State = ssStartPending);
    889       end;
    890     except
    891     end;
    892   end;
    893   ServiceControl.Free;
    894 end;
    895 
    896 procedure TMainForm.SetVpnServiceRunning(const Value: Boolean);
    897 var
    898   ServiceControl: TServiceControl;
    899 begin
    900   ServiceControl := TServiceControl.Create;
    901   with ServiceControl do begin
    902     ReadServicesList;
    903     try
    904       if Value then Services[IndexByName(DiallingServiceName)].Start
    905         else Services[IndexByName(DiallingServiceName)].Stop;
    906     except
    907     end;
    908   end;
    909   ServiceControl.Free;
    910   GetVpnServiceRunning;
    911 end;
    912 
    913 procedure TMainForm.Spustit1Click(Sender: TObject);
    914 begin
    915   VpnServiceRunning := True;
    916 end;
    917 
    918 procedure TMainForm.Zasavit1Click(Sender: TObject);
    919 begin
    920   VpnServiceRunning := False;
    921502end;
    922503
     
    943524end;
    944525
    945 function TMainForm.GetConditionNetworkDomain: string;
    946 begin
    947   with TRegistry.Create do
    948   try
    949     RootKey := HKEY_LOCAL_MACHINE;
    950     OpenKey(RegistryPath, True);
    951     if ValueExists('ConditionNetworkDomain') then Result := ReadString('ConditionNetworkDomain')
    952       else Result := 'zdechov.net';
    953   finally
    954     Free;
    955   end;
    956 end;
    957 
    958 procedure TMainForm.SetConditionNetworkDomain(const Value: string);
    959 begin
    960   with TRegistry.Create do
    961   try
    962     RootKey := HKEY_LOCAL_MACHINE;
    963     OpenKey(RegistryPath, True);
    964     WriteString('ConditionNetworkDomain', Value);
    965   finally
    966     Free;
    967   end;
    968 end;
    969 
    970526end.
  • trunk/UNetworkTest.dfm

    r1 r5  
    22  Left = 295
    33  Top = 207
    4   Width = 494
    5   Height = 266
    64  ActiveControl = ListView1
    75  Caption = 'Test s'#237't'#283
     6  ClientHeight = 232
     7  ClientWidth = 486
    88  Color = clBtnFace
    99  Constraints.MinHeight = 100
     
    112112  end
    113113  object IdHTTP1: TIdHTTP
    114     MaxLineAction = maException
    115     ReadTimeout = 0
    116114    AllowCookies = True
    117115    ProxyParams.BasicAuthentication = False
    118116    ProxyParams.ProxyPort = 0
    119117    Request.ContentLength = -1
    120     Request.ContentRangeEnd = 0
    121     Request.ContentRangeStart = 0
    122118    Request.ContentType = 'text/html'
    123119    Request.Accept = 'text/html, */*'
  • trunk/UNetworkTest.pas

    r4 r5  
    7878function Parse: string;
    7979begin
    80   Result:= Copy(Row,1,Pos(':',Row)-1);
    81   Delete(Row,1,Length(Result)+1);
     80  Result:= Copy(Row, 1, Pos(':', Row) - 1);
     81  Delete(Row, 1, Length(Result) + 1);
    8282end;
    8383
    8484function NetworkListFilename: string;
    8585begin
    86   Result := CommonAppDataPath+'\'+Creator+'\'+ApplicationName;
     86  Result := CommonAppDataPath + '\' + Creator + '\' + ApplicationName;
    8787  if not DirectoryExists(Result) then
    8888    ForceDirectories(Result);
     
    152152    ListView1.SetFocus;
    153153//    ListView1.Items.BeginUpdate;
    154     for I := 0 to ListView1.Items.Count-1 do with ListView1.Items[I] do begin
     154    for I := 0 to ListView1.Items.Count - 1 do with ListView1.Items[I] do begin
    155155      Selected := True;
    156156      Focused := True;
     
    169169procedure TNetworkTest.Button2Click(Sender: TObject);
    170170 begin
    171   if Button2.Caption = 'Otestovat' then begin
     171  if Button2.Caption = 'Otestovat' then
     172  begin
    172173    Button2.Caption := 'Pøerušit';
    173174    ComboBox1.Enabled := False;
     
    248249  ListView1.Items.EndUpdate;
    249250  if ListView1.Items.Count > 4 then Height := ListView1.Items.Count * 15 + 97
    250     else Height := 4*15 + 97;
    251   if Height > (Screen.Height-50) then Height := Screen.Height - 50;
     251    else Height := 4 * 15 + 97;
     252  if Height > (Screen.Height - 50) then Height := Screen.Height - 50;
    252253end;
    253254
Note: See TracChangeset for help on using the changeset viewer.