Fixed the GUI finally

This commit is contained in:
kake26 2023-01-09 19:33:11 -06:00
parent 58dded8116
commit e2b4c2c8a3
17 changed files with 324 additions and 249 deletions

View file

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="11"/> <Version Value="12"/>
<General> <General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="bandy2"/> <Title Value="bandy2"/>
<Scaled Value="True"/> <Scaled Value="True"/>
<ResourceType Value="res"/> <ResourceType Value="res"/>
@ -14,8 +16,76 @@
</XPManifest> </XPManifest>
<Icon Value="0"/> <Icon Value="0"/>
</General> </General>
<BuildModes Count="1"> <BuildModes Count="3">
<Item1 Name="Default" Default="True"/> <Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="bandy2"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="bandy2"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes> </BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@ -23,7 +93,6 @@
</PublishOptions> </PublishOptions>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <RequiredPackages Count="1">
<Item1> <Item1>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectSession> <ProjectSession>
<Version Value="11"/> <Version Value="12"/>
<BuildModes Active="Default"/> <BuildModes Active="Release"/>
<Units Count="2"> <Units Count="4">
<Unit0> <Unit0>
<Filename Value="bandy2.lpr"/> <Filename Value="bandy2.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -11,7 +11,7 @@
<WindowIndex Value="-1"/> <WindowIndex Value="-1"/>
<TopLine Value="-1"/> <TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/> <CursorPos X="-1" Y="-1"/>
<UsageCount Value="29"/> <UsageCount Value="36"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
@ -22,133 +22,160 @@
<UnitName Value="Unit1"/> <UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<TopLine Value="72"/> <TopLine Value="72"/>
<CursorPos X="73" Y="75"/> <CursorPos X="87" Y="101"/>
<UsageCount Value="29"/> <UsageCount Value="36"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
<Unit2>
<Filename Value="../../../../tmp/fpc/lazarus/lcl/include/screen.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="667"/>
<CursorPos Y="696"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="../../../../tmp/fpc/lazarus/lcl/customtimer.pas"/>
<UnitName Value="CustomTimer"/>
<EditorIndex Value="-1"/>
<TopLine Value="163"/>
<CursorPos Y="180"/>
<UsageCount Value="10"/>
</Unit3>
</Units> </Units>
<JumpHistory Count="29" HistoryIndex="28"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="37" Column="26"/> <Caret Line="54" Column="13" TopLine="23"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="51" Column="13" TopLine="20"/> <Caret Line="55" Column="13" TopLine="24"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="53" Column="13" TopLine="22"/> <Caret Line="59" Column="38" TopLine="30"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="54" Column="13" TopLine="23"/> <Caret Line="60" Column="38" TopLine="31"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="55" Column="13" TopLine="24"/> <Caret Line="62" Column="38" TopLine="34"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="59" Column="38" TopLine="30"/> <Caret Line="63" Column="38" TopLine="35"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="60" Column="38" TopLine="31"/> <Caret Line="65" Column="38" TopLine="37"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="62" Column="38" TopLine="34"/> <Caret Line="80" Column="14" TopLine="44"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="63" Column="38" TopLine="35"/> <Caret Line="75" Column="14" TopLine="44"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="65" Column="38" TopLine="37"/> <Caret Column="13"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="80" Column="14" TopLine="44"/> <Caret Line="88" Column="21" TopLine="52"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="75" Column="14" TopLine="44"/> <Caret Line="81" Column="3" TopLine="55"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Column="13"/> <Caret Line="73" Column="21" TopLine="39"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="88" Column="21" TopLine="52"/> <Caret Line="77" Column="3" TopLine="48"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="81" Column="3" TopLine="55"/> <Caret Line="57" Column="34" TopLine="48"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="73" Column="21" TopLine="39"/> <Caret Line="88" Column="24" TopLine="52"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="77" Column="3" TopLine="48"/> <Caret Line="72" TopLine="39"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="57" Column="34" TopLine="48"/> <Caret Line="79" TopLine="43"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="88" Column="24" TopLine="52"/> <Caret Line="61" Column="27" TopLine="46"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="72" TopLine="39"/> <Caret Line="60" Column="27" TopLine="45"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="79" TopLine="43"/> <Caret Line="94" Column="74" TopLine="60"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="61" Column="27" TopLine="46"/> <Caret Line="93" Column="74" TopLine="59"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="60" Column="27" TopLine="45"/> <Caret Line="94" Column="74" TopLine="60"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="94" Column="74" TopLine="60"/> <Caret Line="101" Column="74" TopLine="67"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="93" Column="74" TopLine="59"/> <Caret Line="81" Column="94" TopLine="65"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="94" Column="74" TopLine="60"/> <Caret Line="83" Column="31" TopLine="66"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="101" Column="74" TopLine="67"/> <Caret Line="76" Column="8" TopLine="66"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="81" Column="94" TopLine="65"/> <Caret Line="79" Column="28" TopLine="66"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<Caret Line="83" Column="31" TopLine="66"/> <Caret Line="76" Column="8" TopLine="61"/>
</Position29> </Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="79" Column="38" TopLine="64"/>
</Position30>
</JumpHistory> </JumpHistory>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
<Modes Count="0" ActiveMode=""/> <Modes ActiveMode=""/>
</RunParams> </RunParams>
</ProjectSession> </ProjectSession>
<Debugging>
<Watches>
<Item ClassAutoCast="True">
<Expression Value="parse"/>
<DisplayStyle Value="wdfString"/>
</Item>
</Watches>
</Debugging>
</CONFIG> </CONFIG>

View file

@ -1,38 +1,38 @@
object Form1: TForm1 object Form1: TForm1
Left = 908 Left = 474
Height = 139 Height = 139
Top = 408 Top = 463
Width = 283 Width = 299
Caption = 'Internet Traffic Monitor' Caption = 'Internet Traffic Monitor'
ClientHeight = 139 ClientHeight = 139
ClientWidth = 283 ClientWidth = 299
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.0.12.0' LCLVersion = '2.2.5.0'
object Label1: TLabel object Label1: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 23 Top = 23
Width = 87 Width = 113
Caption = 'Today''s Usage' Caption = 'Today''s Usage'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 120 Left = 136
Height = 1 Height = 1
Top = 23 Top = 24
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Label3: TLabel object Label3: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 48 Top = 48
Width = 148 Width = 189
Caption = 'Computed Monthly Max' Caption = 'Computed Monthly Max'
ParentColor = False ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
Left = 176 Left = 216
Height = 1 Height = 1
Top = 48 Top = 48
Width = 1 Width = 1
@ -40,23 +40,23 @@ object Form1: TForm1
end end
object Label5: TLabel object Label5: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 71 Top = 71
Width = 143 Width = 182
Caption = 'Current Monthly Usage' Caption = 'Current Monthly Usage'
ParentColor = False ParentColor = False
end end
object Label6: TLabel object Label6: TLabel
Left = 176 Left = 208
Height = 1 Height = 1
Top = 71 Top = 72
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Button1: TButton object Button1: TButton
Left = 169 Left = 208
Height = 25 Height = 25
Top = 97 Top = 104
Width = 75 Width = 75
Caption = 'Hide' Caption = 'Hide'
OnClick = Button1Click OnClick = Button1Click
@ -4372,7 +4372,7 @@ object Form1: TForm1
Enabled = False Enabled = False
Interval = 10000 Interval = 10000
OnTimer = Timer1Timer OnTimer = Timer1Timer
Left = 50 Left = 56
Top = 92 Top = 98
end end
end end

View file

@ -72,17 +72,18 @@ end;
procedure TForm1.Timer1Timer(Sender: TObject); procedure TForm1.Timer1Timer(Sender: TObject);
begin begin
try try
webres := TFPCustomHTTPClient.SimpleGet('https://192.168.1.113/bnd.dat'); webres := TFPCustomHTTPClient.SimpleGet('http://192.168.1.168/band/bnd.dat');
parse := splitstring(webres,' '); parse := splitstring(webres,' ');
vnstats.dom := parse[6];
vnstats.cm := parse[8]; vnstats.dom := parse[4];
vnstats.vnhourly := parse[10]; vnstats.cm := concat(parse[6],' GiB');
vnstats.vnmonthly := parse[13]; vnstats.vnhourly := concat(parse[8],parse[9]);
vnstats.vnmonthly := concat(parse[11],parse[12]);
Label2.Caption := vnstats.vnhourly; Label2.Caption := vnstats.vnhourly;
Label6.Caption := vnstats.vnmonthly; Label6.Caption := vnstats.vnmonthly;
Label4.Caption := vnstats.cm; Label4.Caption := vnstats.cm;
Label7.Caption:= parse[11] ; //Label7.Caption:= parse[12] ;
Label8.Caption:= parse[14]; // Label8.Caption:= parse[15];
Button1.Caption := 'Hide'; Button1.Caption := 'Hide';
except except
// Blah // Blah

BIN
fpc/bandy2 Executable file

Binary file not shown.

View file

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="11"/> <Version Value="12"/>
<General> <General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="bandy2"/> <Title Value="bandy2"/>
<Scaled Value="True"/> <Scaled Value="True"/>
<ResourceType Value="res"/> <ResourceType Value="res"/>
@ -14,8 +16,76 @@
</XPManifest> </XPManifest>
<Icon Value="0"/> <Icon Value="0"/>
</General> </General>
<BuildModes Count="1"> <BuildModes Count="3">
<Item1 Name="Default" Default="True"/> <Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="bandy2"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="bandy2"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes> </BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@ -23,7 +93,6 @@
</PublishOptions> </PublishOptions>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <RequiredPackages Count="1">
<Item1> <Item1>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectSession> <ProjectSession>
<Version Value="11"/> <Version Value="12"/>
<BuildModes Active="Default"/> <BuildModes Active="Release"/>
<Units Count="2"> <Units Count="4">
<Unit0> <Unit0>
<Filename Value="bandy2.lpr"/> <Filename Value="bandy2.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -11,7 +11,7 @@
<WindowIndex Value="-1"/> <WindowIndex Value="-1"/>
<TopLine Value="-1"/> <TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/> <CursorPos X="-1" Y="-1"/>
<UsageCount Value="31"/> <UsageCount Value="36"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
@ -21,134 +21,42 @@
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/> <UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<TopLine Value="70"/> <EditorIndex Value="-1"/>
<CursorPos X="28" Y="85"/> <TopLine Value="72"/>
<UsageCount Value="31"/> <CursorPos X="87" Y="101"/>
<Loaded Value="True"/> <UsageCount Value="36"/>
<LoadedDesigner Value="True"/>
</Unit1> </Unit1>
<Unit2>
<Filename Value="../../../../tmp/fpc/lazarus/lcl/include/screen.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="667"/>
<CursorPos Y="696"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="../../../../tmp/fpc/lazarus/lcl/customtimer.pas"/>
<UnitName Value="CustomTimer"/>
<EditorIndex Value="-1"/>
<TopLine Value="163"/>
<CursorPos Y="180"/>
<UsageCount Value="10"/>
</Unit3>
</Units> </Units>
<JumpHistory Count="29" HistoryIndex="28"> <General>
<Position1> <ActiveWindowIndexAtStart Value="-1"/>
<Filename Value="unit1.pas"/> </General>
<Caret Line="37" Column="26"/> <JumpHistory HistoryIndex="-1"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="51" Column="13" TopLine="20"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="53" Column="13" TopLine="22"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="54" Column="13" TopLine="23"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
<Caret Line="55" Column="13" TopLine="24"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
<Caret Line="59" Column="38" TopLine="30"/>
</Position6>
<Position7>
<Filename Value="unit1.pas"/>
<Caret Line="60" Column="38" TopLine="31"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="62" Column="38" TopLine="34"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="63" Column="38" TopLine="35"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
<Caret Line="65" Column="38" TopLine="37"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
<Caret Line="80" Column="14" TopLine="44"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="75" Column="14" TopLine="44"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Column="13"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
<Caret Line="88" Column="21" TopLine="52"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
<Caret Line="81" Column="3" TopLine="55"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
<Caret Line="73" Column="21" TopLine="39"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
<Caret Line="77" Column="3" TopLine="48"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="57" Column="34" TopLine="48"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="88" Column="24" TopLine="52"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="72" TopLine="39"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="79" TopLine="43"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="61" Column="27" TopLine="46"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
<Caret Line="60" Column="27" TopLine="45"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="94" Column="74" TopLine="60"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
<Caret Line="93" Column="74" TopLine="59"/>
</Position25>
<Position26>
<Filename Value="unit1.pas"/>
<Caret Line="94" Column="74" TopLine="60"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="101" Column="74" TopLine="67"/>
</Position27>
<Position28>
<Filename Value="unit1.pas"/>
<Caret Line="81" Column="94" TopLine="65"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="83" Column="31" TopLine="66"/>
</Position29>
</JumpHistory>
<RunParams> <RunParams>
<FormatVersion Value="2"/> <FormatVersion Value="2"/>
<Modes Count="0" ActiveMode=""/> <Modes ActiveMode=""/>
</RunParams> </RunParams>
</ProjectSession> </ProjectSession>
<Debugging>
<Watches>
<Item ClassAutoCast="True">
<Expression Value="parse"/>
<DisplayStyle Value="wdfString"/>
</Item>
</Watches>
</Debugging>
</CONFIG> </CONFIG>

Binary file not shown.

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Compiler Value="/usr/bin/fpc" Date="1614890516"/> <Compiler Value="/usr/bin/fpc" Date="1621168742"/>
<Params Value=" -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fi/home/kake26/Code/FPC/bandy2/lib/x86_64-linux -Fu/usr/lib/lazarus/lcl/units/x86_64-linux/qt5 -Fu/usr/lib/lazarus/lcl/units/x86_64-linux -Fu/usr/lib/lazarus/components/lazutils/lib/x86_64-linux -Fu/usr/lib/lazarus/packager/units/x86_64-linux -Fu/home/kake26/Code/FPC/bandy2/ -FU/home/kake26/Code/FPC/bandy2/lib/x86_64-linux/ -FE/home/kake26/Code/FPC/bandy2/ -o/home/kake26/Code/FPC/bandy2/bandy2 -dLCL -dLCLqt5 bandy2.lpr"/> <Params Value=" -MObjFPC -Scghi -CX -Cg -O3 -XX -l -vewnhibq -Fi/home/kake26/projects/pascal/bandmon/fpc/lib/x86_64-linux -Fu/home/kake26/tmp/fpc/lazarus/lcl/units/x86_64-linux/gtk2 -Fu/home/kake26/tmp/fpc/lazarus/lcl/units/x86_64-linux -Fu/home/kake26/tmp/fpc/lazarus/components/freetype/lib/x86_64-linux -Fu/home/kake26/tmp/fpc/lazarus/components/lazutils/lib/x86_64-linux -Fu/home/kake26/tmp/fpc/lazarus/packager/units/x86_64-linux -Fu/home/kake26/projects/pascal/bandmon/fpc/ -FU/home/kake26/projects/pascal/bandmon/fpc/lib/x86_64-linux/ -FE/home/kake26/projects/pascal/bandmon/fpc/ -o/home/kake26/projects/pascal/bandmon/fpc/bandy2 -dLCL -dLCLgtk2 bandy2.lpr"/>
</CONFIG> </CONFIG>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,38 +1,38 @@
object Form1: TForm1 object Form1: TForm1
Left = 908 Left = 474
Height = 139 Height = 139
Top = 408 Top = 463
Width = 283 Width = 299
Caption = 'Internet Traffic Monitor' Caption = 'Internet Traffic Monitor'
ClientHeight = 139 ClientHeight = 139
ClientWidth = 283 ClientWidth = 299
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.0.12.0' LCLVersion = '2.2.5.0'
object Label1: TLabel object Label1: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 23 Top = 23
Width = 87 Width = 113
Caption = 'Today''s Usage' Caption = 'Today''s Usage'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 120 Left = 136
Height = 1 Height = 1
Top = 23 Top = 24
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Label3: TLabel object Label3: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 48 Top = 48
Width = 148 Width = 189
Caption = 'Computed Monthly Max' Caption = 'Computed Monthly Max'
ParentColor = False ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
Left = 176 Left = 216
Height = 1 Height = 1
Top = 48 Top = 48
Width = 1 Width = 1
@ -40,23 +40,23 @@ object Form1: TForm1
end end
object Label5: TLabel object Label5: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 71 Top = 71
Width = 143 Width = 182
Caption = 'Current Monthly Usage' Caption = 'Current Monthly Usage'
ParentColor = False ParentColor = False
end end
object Label6: TLabel object Label6: TLabel
Left = 176 Left = 208
Height = 1 Height = 1
Top = 71 Top = 72
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Button1: TButton object Button1: TButton
Left = 169 Left = 208
Height = 25 Height = 25
Top = 97 Top = 104
Width = 75 Width = 75
Caption = 'Hide' Caption = 'Hide'
OnClick = Button1Click OnClick = Button1Click
@ -4372,7 +4372,7 @@ object Form1: TForm1
Enabled = False Enabled = False
Interval = 10000 Interval = 10000
OnTimer = Timer1Timer OnTimer = Timer1Timer
Left = 50 Left = 56
Top = 92 Top = 98
end end
end end

Binary file not shown.

Binary file not shown.

View file

@ -1,38 +1,38 @@
object Form1: TForm1 object Form1: TForm1
Left = 908 Left = 474
Height = 139 Height = 139
Top = 408 Top = 463
Width = 283 Width = 299
Caption = 'Internet Traffic Monitor' Caption = 'Internet Traffic Monitor'
ClientHeight = 139 ClientHeight = 139
ClientWidth = 283 ClientWidth = 299
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.0.12.0' LCLVersion = '2.2.5.0'
object Label1: TLabel object Label1: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 23 Top = 23
Width = 87 Width = 113
Caption = 'Today''s Usage' Caption = 'Today''s Usage'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 120 Left = 136
Height = 1 Height = 1
Top = 23 Top = 24
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Label3: TLabel object Label3: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 48 Top = 48
Width = 148 Width = 189
Caption = 'Computed Monthly Max' Caption = 'Computed Monthly Max'
ParentColor = False ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
Left = 176 Left = 216
Height = 1 Height = 1
Top = 48 Top = 48
Width = 1 Width = 1
@ -40,23 +40,23 @@ object Form1: TForm1
end end
object Label5: TLabel object Label5: TLabel
Left = 14 Left = 14
Height = 18 Height = 19
Top = 71 Top = 71
Width = 143 Width = 182
Caption = 'Current Monthly Usage' Caption = 'Current Monthly Usage'
ParentColor = False ParentColor = False
end end
object Label6: TLabel object Label6: TLabel
Left = 176 Left = 208
Height = 1 Height = 1
Top = 71 Top = 72
Width = 1 Width = 1
ParentColor = False ParentColor = False
end end
object Button1: TButton object Button1: TButton
Left = 169 Left = 208
Height = 25 Height = 25
Top = 97 Top = 104
Width = 75 Width = 75
Caption = 'Hide' Caption = 'Hide'
OnClick = Button1Click OnClick = Button1Click
@ -4372,7 +4372,7 @@ object Form1: TForm1
Enabled = False Enabled = False
Interval = 10000 Interval = 10000
OnTimer = Timer1Timer OnTimer = Timer1Timer
Left = 50 Left = 56
Top = 92 Top = 98
end end
end end

View file

@ -72,17 +72,18 @@ end;
procedure TForm1.Timer1Timer(Sender: TObject); procedure TForm1.Timer1Timer(Sender: TObject);
begin begin
try try
webres := TFPCustomHTTPClient.SimpleGet('https://192.168.1.113/bnd.dat'); webres := TFPCustomHTTPClient.SimpleGet('http://192.168.1.168/band/bnd.dat');
parse := splitstring(webres,' '); parse := splitstring(webres,' ');
vnstats.dom := parse[7];
vnstats.cm := parse[9]; vnstats.dom := parse[4];
vnstats.vnhourly := parse[11]; vnstats.cm := concat(parse[6],' GiB');
vnstats.vnmonthly := parse[14]; vnstats.vnhourly := concat(parse[8],' ',parse[9]);
vnstats.vnmonthly := concat(parse[11],' ', parse[12]);
Label2.Caption := vnstats.vnhourly; Label2.Caption := vnstats.vnhourly;
Label6.Caption := vnstats.vnmonthly; Label6.Caption := vnstats.vnmonthly;
Label4.Caption := vnstats.cm; Label4.Caption := vnstats.cm;
Label7.Caption:= parse[12] ; //Label7.Caption:= parse[12] ;
Label8.Caption:= parse[15]; // Label8.Caption:= parse[15];
Button1.Caption := 'Hide'; Button1.Caption := 'Hide';
except except
// Blah // Blah