initial commit

initial commit of all files
This commit is contained in:
Paul M 2021-05-03 22:08:55 -05:00
parent 748012f50a
commit a1bcd8e0a3
23 changed files with 13925 additions and 0 deletions

106
fpc/backup/unit1.pas Normal file
View file

@ -0,0 +1,106 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
fphttpclient, opensslsockets, strutils;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Timer1: TTimer;
TrayIcon1: TTrayIcon;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Label7Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure TrayIcon1Click(Sender: TObject);
private
public
end;
type
vnstat = record
dom: String;
cm: String;
vnhourly: String;
vnmonthly: String;
end;
var
Form1: TForm1;
webres: string;
vnstats: vnstat;
parse: array of string;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Timer1.Enabled:= true;
Button1.Caption:= 'Loading';
end;
procedure TForm1.Label7Click(Sender: TObject);
begin
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
try
webres := TFPCustomHTTPClient.SimpleGet('https://192.168.1.113/bnd.dat');
parse := splitstring(webres,' ');
vnstats.dom := parse[6];
vnstats.cm := parse[8];
vnstats.vnhourly := parse[10];
vnstats.vnmonthly := parse[13];
Label2.Caption := vnstats.vnhourly;
Label6.Caption := vnstats.vnmonthly;
Label4.Caption := vnstats.cm;
Label7.Caption:= parse[11] ;
Label8.Caption:= parse[14];
Button1.Caption := 'Hide';
except
// Blah
end;
end;
procedure TForm1.TrayIcon1Click(Sender: TObject);
begin
Form1.Show;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Hide;
end;
end.