Changeset 5
- Timestamp:
- Nov 27, 2008, 12:46:04 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 7 edited
-
. (modified) (1 prop)
-
DiallingService.dpr (deleted)
-
KonfiguratorZdechovNET.bdsproj (modified) (1 diff)
-
KonfiguratorZdechovNET.dpr (modified) (2 diffs)
-
ServiceControl (deleted)
-
UDialingLog.dfm (deleted)
-
UDialingLog.pas (deleted)
-
UMainForm.dfm (modified) (10 diffs)
-
UMainForm.pas (modified) (18 diffs)
-
UNetworkTest.dfm (modified) (2 diffs)
-
UNetworkTest.pas (modified) (4 diffs)
-
svccont (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
*.dcu
KonfiguratorZdechovNET.exe
KonfiguratorZdechovNET.res
-
Property svn:ignore
set to
-
trunk/KonfiguratorZdechovNET.bdsproj
r1 r5 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <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> 177 177 </BorlandProject> -
trunk/KonfiguratorZdechovNET.dpr
r4 r5 10 10 ULogExceptions in 'ULogExceptions.pas' {LogExceptions}, 11 11 UMapFile in 'UMapFile.pas', 12 UDialingLog in 'UDialingLog.pas' {DialingLog},13 12 UTextFileStream in 'UTextFileStream.pas', 14 13 UServiceControl in 'ServiceControl\UServiceControl.pas'; … … 23 22 Application.CreateForm(TAboutWindow, AboutWindow); 24 23 Application.CreateForm(TLogExceptions, LogExceptions); 25 Application.CreateForm(TDialingLog, DialingLog);26 24 MainForm.Init; 27 25 Application.Run; -
trunk/UMainForm.dfm
r4 r5 2 2 Left = 287 3 3 Top = 165 4 Width = 3515 Height = 4476 4 Caption = 'Nastaven'#237 5 ClientHeight = 255 6 ClientWidth = 359 7 7 Color = clBtnFace 8 8 Constraints.MinHeight = 289 … … 19 19 OnShow = FormShow 20 20 DesignSize = ( 21 3 4322 413)21 359 22 255) 23 23 PixelsPerInch = 96 24 24 TextHeight = 13 25 25 object Bevel1: TBevel 26 26 Left = 8 27 Top = 37028 Width = 3 2927 Top = 212 28 Width = 345 29 29 Height = 2 30 30 Anchors = [akLeft, akRight, akBottom] 31 ExplicitTop = 370 32 ExplicitWidth = 329 31 33 end 32 34 object Button1: TButton 33 Left = 2 6434 Top = 37835 Left = 280 36 Top = 220 35 37 Width = 75 36 38 Height = 25 … … 39 41 TabOrder = 0 40 42 OnClick = Button1Click 43 ExplicitLeft = 264 44 ExplicitTop = 378 41 45 end 42 46 object Button2: TButton 43 Left = 18444 Top = 37847 Left = 200 48 Top = 220 45 49 Width = 75 46 50 Height = 25 … … 49 53 TabOrder = 1 50 54 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 134 57 end 135 58 object CheckBox4: TCheckBox … … 139 62 Height = 17 140 63 Caption = 'Domovsk'#225' str'#225'nka v prohl'#237#382'e'#269'i jako http://centrala.zdechov.net/' 141 TabOrder = 364 TabOrder = 2 142 65 end 143 66 object Button3: TButton 144 67 Left = 8 145 Top = 37868 Top = 220 146 69 Width = 81 147 70 Height = 25 148 71 Anchors = [akLeft, akBottom] 149 72 Caption = 'Aktivovat v'#353'e' 150 TabOrder = 473 TabOrder = 3 151 74 OnClick = Button3Click 75 ExplicitTop = 378 152 76 end 153 77 object CheckBox5: TCheckBox … … 157 81 Height = 17 158 82 Caption = 'Pracovn'#237' skupina ZDECHOV' 159 TabOrder = 583 TabOrder = 4 160 84 end 161 85 object CheckBox6: TCheckBox … … 165 89 Height = 17 166 90 Caption = 'Povolit v br'#225'n'#283' Firewall sd'#237'len'#237' pro celou lok'#225'ln'#237' s'#237#357 167 TabOrder = 691 TabOrder = 5 168 92 end 169 93 object CheckBox9: TCheckBox … … 173 97 Height = 17 174 98 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 239 100 end 240 101 object CoolTrayIcon1: TCoolTrayIcon … … 425 286 object Spustit1: TMenuItem 426 287 Caption = 'Spustit' 427 OnClick = Spustit1Click428 288 end 429 289 object Zasavit1: TMenuItem 430 290 Caption = 'Zasavit' 431 OnClick = Zasavit1Click432 291 end 433 292 end 434 293 object Zznamvyten1: TMenuItem 435 294 Caption = 'Z'#225'znam vyt'#225#269'en'#237 436 OnClick = Zznamvyten1Click437 295 end 438 296 object Oprogramu1: TMenuItem … … 454 312 Top = 16 455 313 end 456 object MagRasCon1: TMagRasCon457 SubEntry = 1458 CallbackId = 0459 CountryID = 0460 CountryCode = 0461 EntryOptions = 0462 DialMode = 0463 Left = 72464 Top = 16465 end466 object MagRasEdt1: TMagRasEdt467 bUseCountryAndAreaCodes = False468 bSpecificIPAddress = False469 bSpecificNameServers = False470 bHeaderCompression = False471 bRemoteDefaultGateway = False472 bDisableLCPExtensions = False473 bTerminalBeforeDial = False474 bTerminalAfterDial = False475 bModemLights = False476 bSoftwareCompression = False477 bRequireEncryptedPassword = False478 bRequireMSEncryptedPassword = False479 bRequireDataEncryption = False480 bNetworkLogon = False481 bUseLogonCredentials = False482 bPromoteAlternates = False483 bSecureLocalFiles = False484 bRequireEAP = False485 bRequirePAP = False486 bRequireSPAP = False487 bCustom = False488 bPreviewPhoneNumber = False489 bSharedPhoneNumbers = False490 bPreviewUserPw = False491 bPreviewDomain = False492 bShowDialingProgress = False493 bRequireCHAP = False494 bRequireMsCHAP = False495 bRequireMsCHAP2 = False496 bRequireW95MSCHAP = False497 bCustomScript = False498 CountryCode = 0499 CountryID = 0500 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 = 0506 FramingProtocol = framePPP507 bNetBEUI = False508 bNetIPX = False509 bNetTCPIP = False510 ISDNChannels = 0511 DialMode = dialAll512 DialExtraPercent = 0513 DialExtraSampleSeconds = 0514 HangUpExtraPercent = 0515 HangUpExtraSampleSeconds = 0516 IdleDisconnectSeconds = -1517 PType = typePhone518 EncryptionType = encryptOptional519 CustomAuthKey = 0520 VpnStrategy = vpnDefault521 bSecureFileAndPrint = False522 bSecureClientForMSNet = False523 bDontNegotiateMultilink = False524 bDontUseRasCredentials = False525 bUsePreSharedKey = False526 bInternet = False527 bDisableNbtOverIP = False528 bUseGlobalDeviceSettings = False529 bReconnectIfDropped = False530 bSharePhoneNumbers = False531 TcpWindowSize = 0532 RedialCount = 0533 RedialPause = 0534 Left = 40535 Top = 16536 end537 314 end -
trunk/UMainForm.pas
r4 r5 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 7 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; 10 10 11 11 const … … 39 39 Button1: TButton; 40 40 Button2: TButton; 41 GroupBox1: TGroupBox;42 CheckBox1: TCheckBox;43 ComboBox1: TComboBox;44 Label1: TLabel;45 CheckBox2: TCheckBox;46 41 Bevel1: TBevel; 47 42 CheckBox4: TCheckBox; … … 55 50 XPManifest1: TXPManifest; 56 51 CheckBox6: TCheckBox; 57 CheckBox7: TCheckBox;58 CheckBox8: TCheckBox;59 52 Oprogramu1: TMenuItem; 60 53 CheckBox9: TCheckBox; 61 54 Zznamvyten1: TMenuItem; 62 Label2: TLabel;63 55 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;72 56 VPNpipojen1: TMenuItem; 73 CheckBox11: TCheckBox;74 57 Spustit1: TMenuItem; 75 58 Zasavit1: TMenuItem; 76 Label4: TLabel;77 Edit2: TEdit;78 59 procedure FormShow(Sender: TObject); 79 60 procedure Button2Click(Sender: TObject); … … 86 67 procedure Button3Click(Sender: TObject); 87 68 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);93 69 private 94 70 procedure LoadOptions; 95 71 procedure SaveOptions; 96 function GetLocalNetworkRouting: Boolean;97 procedure SetLocalNetworkRouting(const Value: Boolean);98 72 function GetCentralaHomepage: Boolean; 99 73 procedure SetCentralaHomepage(const Value: Boolean); … … 104 78 function GetShareUnblockFirewall: Boolean; 105 79 procedure SetShareUnblockFirewall(const Value: Boolean); 106 function GetZdechovNetConnection: Boolean;107 procedure SetZdechovNetConnection(const Value: Boolean);108 80 function GetNetSharedFolder: Boolean; 109 81 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);122 82 function GetNetworkDomain: string; 123 function GetConditionNetworkDomain: string;124 procedure SetConditionNetworkDomain(const Value: string);125 83 public 126 DefaultGateway: string;127 84 FirstStart: Boolean; 128 85 HostFilterIndex: Integer; 129 86 PingTimeout: Integer; 130 AutoDial: Boolean;131 AutoRedial: Boolean;132 87 NetworkTestLastUpdate: TDateTime; 133 property LocalNetworkRouting: Boolean read GetLocalNetworkRouting134 write SetLocalNetworkRouting;135 88 property CentralaHomepage: Boolean read GetCentralaHomepage 136 89 write SetCentralaHomepage; … … 141 94 property ShareUnblockFirewall: Boolean read GetShareUnblockFirewall 142 95 write SetShareUnblockFirewall; 143 property ZdechovNetConnection: Boolean read GetZdechovNetConnection144 write SetZdechovNetConnection;145 96 property NetSharedFolder: Boolean read GetNetSharedFolder 146 97 write SetNetSharedFolder; 147 property LogFileEnabled: Boolean read GetLogFileEnabled148 write SetLogFileEnabled;149 property LogFileName: string read GetLogFileName150 write SetLogFileName;151 property LogClearOnStart: Boolean read GetLogClearOnStart152 write SetLogClearOnStart;153 property ConnectionName: string read GetConnectionName154 write SetConnectionName;155 property VpnServiceEnabled: Boolean read GetVpnServiceEnabled156 write SetVpnServiceEnabled;157 property VpnServiceRunning: Boolean read GetVpnServiceRunning158 write SetVpnServiceRunning;159 98 property NetworkDomain: string read GetNetworkDomain; 160 property ConditionNetworkDomain: string read GetConditionNetworkDomain161 write SetConditionNetworkDomain;162 99 163 100 procedure Init; 164 procedure AddConnection;165 procedure DeleteConnection;166 101 end; 167 102 … … 178 113 179 114 uses UNetworkTest, UAboutWindow, ULogExceptions, DateUtils, Math, 180 UDialingLog,StrUtils, UServiceControl;115 StrUtils, UServiceControl; 181 116 182 117 {$R *.dfm} … … 260 195 end; 261 196 262 function TMainForm.GetLocalNetworkRouting: Boolean;263 var264 Command: TDosCommand;265 I: Integer;266 Lines2: TStringList;267 begin268 Lines2 := TStringList.Create;269 Result := False;270 Command := TDosCommand.Create(nil);271 with Command do try272 CommandLine := 'route print ' + LocalNetAddr + ' mask ' + LocalNetMask +273 ' ' + DefaultGateway + ' metric 30';274 OutputLines := Lines2;275 Execute2;276 for I := 0 to Lines2.Count - 1 do277 if Pos(LocalNetMask, Lines2[I]) > 0 then Result := True;278 finally279 Free;280 Lines2.Free;281 end;282 end;283 284 procedure TMainForm.SetLocalNetworkRouting(const Value: Boolean);285 var286 Command: TDosCommand;287 begin288 Command := TDosCommand.Create(nil);289 with Command do try290 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 finally294 Free;295 end;296 end;297 298 197 function TMainForm.GetCentralaHomepage: Boolean; 299 198 begin … … 327 226 LogExceptions.NazevAplikace := ApplicationName + ' ' + Version; 328 227 329 CheckBox1.Checked := AutoRedial;330 CheckBox2.Checked := LocalNetworkRouting;331 CheckBox3.Checked := LogClearOnStart;332 228 CheckBox4.Checked := CentralaHomepage; 333 229 CheckBox5.Checked := WorkgroupZdechov; 334 230 CheckBox6.Checked := ShareUnblockFirewall; 335 CheckBox7.Checked := AutoDial;336 CheckBox8.Checked := ZdechovNetConnection;337 231 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;351 232 end; 352 233 … … 358 239 procedure TMainForm.Button1Click(Sender: TObject); 359 240 begin 360 AutoRedial := CheckBox1.Checked;361 LocalNetworkRouting := CheckBox2.Checked;362 LogClearOnStart := CheckBox3.Checked;363 241 CentralaHomepage := CheckBox4.Checked; 364 242 WorkgroupZdechov := CheckBox5.Checked; 365 243 ShareUnblockFirewall := CheckBox6.Checked; 366 AutoDial := CheckBox7.Checked;367 ZdechovNetConnection := CheckBox8.Checked;368 244 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 375 246 CoolTrayIcon1.HideMainForm; 376 247 SaveOptions; … … 456 327 LoadOptions; 457 328 Application.ShowMainForm := not FirstStart; 458 VpnServiceRunning;459 329 end; 460 330 … … 506 376 end; 507 377 508 procedure TMainForm.AddConnection;509 var510 I: Integer;511 begin512 if MagRasCon1.ValidateName(DefaultConnectionName) = 0 then513 with MagRasEdt1 do begin514 PPPDefault;515 PhoneBookPath := ''; // 4.60516 // telephone numbers517 SetCanonical(ConnectionHost) ;518 519 // dial params520 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 stuff531 I := 0;532 MagRasCon1.GetDeviceList;533 while (I < MagRasCon1.DeviceNameList.Count) and534 (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 then538 PutDialProps (DefaultConnectionName);539 end;540 end;541 542 function TMainForm.GetZdechovNetConnection: Boolean;543 var544 I: Integer;545 begin546 MagRasGetEntryList('');547 I := 0;548 while (I < MagRasNumEntryRec) and549 (MagRasEntryRecs[I].EntryName <> DefaultConnectionName) do I := I + 1;550 Result := I < MagRasNumEntryRec;551 end;552 553 procedure TMainForm.SetZdechovNetConnection(const Value: Boolean);554 begin555 if Value then AddConnection else DeleteConnection;556 end;557 558 procedure TMainForm.DeleteConnection;559 begin560 with MagRasCon1 do begin561 EntryName := DefaultConnectionName;562 DeletePhonebook;563 end;564 end;565 566 378 procedure TMainForm.Button3Click(Sender: TObject); 567 379 begin 568 CheckBox1.Checked := True;569 CheckBox2.Checked := True;570 CheckBox3.Checked := True;571 380 CheckBox4.Checked := True; 572 381 CheckBox5.Checked := True; 573 382 CheckBox6.Checked := True; 574 CheckBox7.Checked := True;575 CheckBox8.Checked := True;576 383 CheckBox9.Checked := True; 577 CheckBox11.Checked := True;578 ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(DefaultConnectionName);579 384 end; 580 385 … … 618 423 end; 619 424 620 procedure TMainForm.Zznamvyten1Click(Sender: TObject);621 begin622 // if not DialingLog.Visible then DialingLog.ShowModal;623 ShellLaunch(LogFileName);624 end;625 626 425 procedure TMainForm.Init; 627 426 var 628 WSAErr: string;629 427 Hostname: string; 630 428 begin 631 429 HostName := 'default'; 632 GetIPFromHost(Hostname, DefaultGateway, WSAErr);633 DefaultGateway := ReverseString(DefaultGateway);634 DefaultGateway := '1'+Copy(DefaultGateway, Pos('.', DefaultGateway), 255);635 DefaultGateway := ReverseString(DefaultGateway);636 430 637 431 //DefaultGateway := GetDefaultGateway; … … 644 438 PName = ^Name; 645 439 var 646 HEnt: pHostEnt; 440 HEnt: pHostEnt; 647 441 HName: PName; 648 442 WSAData: TWSAData; 649 443 i: Integer; 650 444 begin 651 Result := False; 445 Result := False; 652 446 if WSAStartup($0101, WSAData) <> 0 then begin 653 447 WSAErr := 'Winsock is not responding."'; … … 678 472 end; 679 473 680 procedure TMainForm.Button4Click(Sender: TObject);681 begin682 OpenDialog1.FileName := Edit1.Text;683 if OpenDialog1.Execute then begin684 Edit1.Text := OpenDialog1.FileName;685 end;686 end;687 688 procedure TMainForm.CheckBox10Click(Sender: TObject);689 begin690 Edit1.Enabled := CheckBox10.Checked;691 Button4.Enabled := CheckBox10.Checked;692 end;693 694 function TMainForm.GetLogFileEnabled: Boolean;695 begin696 with TRegistry.Create do697 try698 RootKey := HKEY_LOCAL_MACHINE;699 OpenKey(RegistryPath, True);700 if ValueExists('LogFileEnabled') then Result := ReadBool('LogFileEnabled')701 else Result := False;702 finally703 Free;704 end;705 end;706 707 procedure TMainForm.SetLogFileEnabled(const Value: Boolean);708 begin709 with TRegistry.Create do710 try711 RootKey := HKEY_LOCAL_MACHINE;712 OpenKey(RegistryPath, True);713 WriteBool('LogFileEnabled', Value)714 finally715 Free;716 end;717 end;718 719 function TMainForm.GetLogFileName: string;720 begin721 with TRegistry.Create do722 try723 RootKey := HKEY_LOCAL_MACHINE;724 OpenKey(RegistryPath, True);725 if ValueExists('LogFileName') then Result := ReadString('LogFileName')726 else Result := ApplicationDataFolder + '\' + DefaultLogFileName;727 finally728 Free;729 end;730 end;731 732 procedure TMainForm.SetLogFileName(const Value: string);733 begin734 with TRegistry.Create do735 try736 RootKey := HKEY_LOCAL_MACHINE;737 OpenKey(RegistryPath, True);738 WriteString('LogFileName', Value)739 finally740 Free;741 end;742 end;743 744 474 procedure TMainForm.LoadOptions; 745 475 begin … … 750 480 if ValueExists('FirstStart') then FirstStart := ReadBool('FirstStart') 751 481 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');755 482 if ValueExists('NetworkTestLastUpdate') then NetworkTestLastUpdate := StrToDate(ReadString('NetworkTestLastUpdate')); 756 483 if ValueExists('PingTimeout') then PingTimeout := ReadInteger('PingTimeout') 757 484 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;762 485 finally 763 486 Free; … … 772 495 OpenKey(RegistryPath, True); 773 496 WriteBool('FirstStart', True); 774 WriteBool('AutoDial', AutoDial);775 WriteBool('AutoRedial', AutoRedial);776 WriteString('ConnectionName', ConnectionName);777 497 WriteString('NetworkTestLastUpdate', DateToStr(NetworkTestLastUpdate)); 778 498 WriteInteger('PingTimeout', PingTimeout); 779 WriteBool('LogFileEnabled', LogFileEnabled);780 WriteString('LogFileName', LogFileName);781 499 finally 782 500 Free; 783 501 end; 784 end;785 786 function TMainForm.GetConnectionName: string;787 begin788 with TRegistry.Create do789 try790 RootKey := HKEY_LOCAL_MACHINE;791 OpenKey(RegistryPath, True);792 if ValueExists('ConnectionName') then Result := ReadString('ConnectionName')793 else Result := '';794 finally795 Free;796 end;797 end;798 799 procedure TMainForm.SetConnectionName(const Value: string);800 begin801 with TRegistry.Create do802 try803 RootKey := HKEY_LOCAL_MACHINE;804 OpenKey(RegistryPath, True);805 WriteString('ConnectionName', Value)806 finally807 Free;808 end;809 end;810 811 function TMainForm.GetLogClearOnStart: Boolean;812 begin813 with TRegistry.Create do814 try815 RootKey := HKEY_LOCAL_MACHINE;816 OpenKey(RegistryPath, True);817 if ValueExists('LogClearOnStart') then Result := ReadBool('LogClearOnStart')818 else Result := False;819 finally820 Free;821 end;822 end;823 824 procedure TMainForm.SetLogClearOnStart(const Value: Boolean);825 begin826 with TRegistry.Create do827 try828 RootKey := HKEY_LOCAL_MACHINE;829 OpenKey(RegistryPath, True);830 WriteBool('LogClearOnStart', Value)831 finally832 Free;833 end;834 end;835 836 function TMainForm.GetVpnServiceEnabled: Boolean;837 var838 ServiceControl: TServiceControl;839 begin840 ServiceControl := TServiceControl.Create;841 with ServiceControl do begin842 ReadServicesList;843 try844 Result := True;845 IndexByName(DiallingServiceName);846 except847 Result := False;848 end;849 end;850 ServiceControl.Free;851 end;852 853 procedure TMainForm.SetVpnServiceEnabled(const Value: Boolean);854 var855 Command: TDosCommand;856 begin857 Command := TDosCommand.Create(nil);858 with Command do try859 if Value and not VpnServiceEnabled then begin860 CommandLine := ExtractFileDir(Application.ExeName)+'\DiallingService.exe /install /silent';861 Execute2;862 end;863 if not Value and VpnServiceEnabled then begin864 VpnServiceRunning := False;865 CommandLine := ExtractFileDir(Application.ExeName)+'\DiallingService.exe /uninstall /silent';866 Execute2;867 end;868 finally869 Free;870 end;871 GetVpnServiceRunning;872 end;873 874 function TMainForm.GetVpnServiceRunning: Boolean;875 var876 ServiceControl: TServiceControl;877 begin878 Result := False;879 Spustit1.Enabled := False;880 Zasavit1.Enabled := False;881 ServiceControl := TServiceControl.Create;882 with ServiceControl do begin883 ReadServicesList;884 try885 with Services[IndexByName(DiallingServiceName)] do begin886 Result := State = ssRunning;887 Spustit1.Enabled := (State = ssStopped) or (State = ssStopPending);888 Zasavit1.Enabled := (State = ssRunning) or (State = ssStartPending);889 end;890 except891 end;892 end;893 ServiceControl.Free;894 end;895 896 procedure TMainForm.SetVpnServiceRunning(const Value: Boolean);897 var898 ServiceControl: TServiceControl;899 begin900 ServiceControl := TServiceControl.Create;901 with ServiceControl do begin902 ReadServicesList;903 try904 if Value then Services[IndexByName(DiallingServiceName)].Start905 else Services[IndexByName(DiallingServiceName)].Stop;906 except907 end;908 end;909 ServiceControl.Free;910 GetVpnServiceRunning;911 end;912 913 procedure TMainForm.Spustit1Click(Sender: TObject);914 begin915 VpnServiceRunning := True;916 end;917 918 procedure TMainForm.Zasavit1Click(Sender: TObject);919 begin920 VpnServiceRunning := False;921 502 end; 922 503 … … 943 524 end; 944 525 945 function TMainForm.GetConditionNetworkDomain: string;946 begin947 with TRegistry.Create do948 try949 RootKey := HKEY_LOCAL_MACHINE;950 OpenKey(RegistryPath, True);951 if ValueExists('ConditionNetworkDomain') then Result := ReadString('ConditionNetworkDomain')952 else Result := 'zdechov.net';953 finally954 Free;955 end;956 end;957 958 procedure TMainForm.SetConditionNetworkDomain(const Value: string);959 begin960 with TRegistry.Create do961 try962 RootKey := HKEY_LOCAL_MACHINE;963 OpenKey(RegistryPath, True);964 WriteString('ConditionNetworkDomain', Value);965 finally966 Free;967 end;968 end;969 970 526 end. -
trunk/UNetworkTest.dfm
r1 r5 2 2 Left = 295 3 3 Top = 207 4 Width = 4945 Height = 2666 4 ActiveControl = ListView1 7 5 Caption = 'Test s'#237't'#283 6 ClientHeight = 232 7 ClientWidth = 486 8 8 Color = clBtnFace 9 9 Constraints.MinHeight = 100 … … 112 112 end 113 113 object IdHTTP1: TIdHTTP 114 MaxLineAction = maException115 ReadTimeout = 0116 114 AllowCookies = True 117 115 ProxyParams.BasicAuthentication = False 118 116 ProxyParams.ProxyPort = 0 119 117 Request.ContentLength = -1 120 Request.ContentRangeEnd = 0121 Request.ContentRangeStart = 0122 118 Request.ContentType = 'text/html' 123 119 Request.Accept = 'text/html, */*' -
trunk/UNetworkTest.pas
r4 r5 78 78 function Parse: string; 79 79 begin 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); 82 82 end; 83 83 84 84 function NetworkListFilename: string; 85 85 begin 86 Result := CommonAppDataPath +'\'+Creator+'\'+ApplicationName;86 Result := CommonAppDataPath + '\' + Creator + '\' + ApplicationName; 87 87 if not DirectoryExists(Result) then 88 88 ForceDirectories(Result); … … 152 152 ListView1.SetFocus; 153 153 // ListView1.Items.BeginUpdate; 154 for I := 0 to ListView1.Items.Count -1 do with ListView1.Items[I] do begin154 for I := 0 to ListView1.Items.Count - 1 do with ListView1.Items[I] do begin 155 155 Selected := True; 156 156 Focused := True; … … 169 169 procedure TNetworkTest.Button2Click(Sender: TObject); 170 170 begin 171 if Button2.Caption = 'Otestovat' then begin 171 if Button2.Caption = 'Otestovat' then 172 begin 172 173 Button2.Caption := 'Pøeruit'; 173 174 ComboBox1.Enabled := False; … … 248 249 ListView1.Items.EndUpdate; 249 250 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; 252 253 end; 253 254
Note:
See TracChangeset
for help on using the changeset viewer.
