Subversion Repositories alarming

Compare Revisions

Regard whitespace Rev 8 → Rev 9

/trunk/Delphi Client/DoorAlarmClient.dproj
6,7 → 6,7
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>DoorAlarmClient.exe</DCC_DependencyCheckOutputName>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>18.5</ProjectVersion>
<ProjectVersion>18.8</ProjectVersion>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
/trunk/Delphi Client/DoorAlarmClient.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Delphi Client/DoorAlarmClientMain.dfm
5538,6 → 5538,10
AutoCheck = True
Caption = 'Ignore motion alert'
end
object Simulatealarm1: TMenuItem
Caption = 'Simulate alarm'
OnClick = Simulatealarm1Click
end
object N1: TMenuItem
Caption = '-'
end
/trunk/Delphi Client/DoorAlarmClientMain.pas
34,6 → 34,7
Ignoredoorbell1: TMenuItem;
Ignoremotionalert1: TMenuItem;
unknownAlarm: TPanel;
Simulatealarm1: TMenuItem;
procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TrayIcon1Click(Sender: TObject);
48,6 → 49,7
procedure Stopalarm1Click(Sender: TObject);
procedure Gotocontrolpanelwebsite1Click(Sender: TObject);
procedure ImageClick(Sender: TObject);
procedure Simulatealarm1Click(Sender: TObject);
private
MJPEGDecoder: TMJPEGDecoder;
LastDingDong: TDateTime;
100,8 → 102,10
lParamList: TStringList;
idhttp: TIdHttp;
begin
//try
try
try
UpdateIPTimerTimer(UpdateIPTimer); // make sure we are registered
 
lParamList := TStringList.Create;
lParamList.Add('action=motion_off'); // 1.3.6.1.4.1.37476.2.4.1.101
 
114,10 → 118,10
finally
FreeAndNil(lParamList);
end;
except
//except
// Nothing
//end;
end;
end;
 
procedure TForm1.StopMusic;
const
179,8 → 183,10
lParamList: TStringList;
idhttp: TIdHttp;
begin
//try
try
try
UpdateIPTimerTimer(UpdateIPTimer); // make sure we are registered
 
lParamList := TStringList.Create;
lParamList.Add('action=motion_on'); // 1.3.6.1.4.1.37476.2.4.1.100
 
193,10 → 199,10
finally
FreeAndNil(lParamList);
end;
except
//except
// Nothing
//end;
end;
end;
 
procedure TForm1.StartStream;
begin
397,6 → 403,33
end;
end;
 
procedure TForm1.Simulatealarm1Click(Sender: TObject);
var
lParamList: TStringList;
idhttp: TIdHttp;
begin
//try
try
lParamList := TStringList.Create;
lParamList.Add('action=server_alert'); // 1.3.6.1.4.1.37476.2.4.1.2
lParamList.Add('targets=1.3.6.1.4.1.37476.2.4.2.0'); // Any
lParamList.Add('targets=1.3.6.1.4.1.37476.2.4.2.1002'); // Motion, camera
lParamList.Add('targets=1.3.6.1.4.1.37476.2.4.2.2001'); // Sound, doorbell
 
idhttp := TIdHTTP.Create(nil);
try
idhttp.Post(ControlServerUrl, lParamList);
finally
FreeAndNil(idhttp);
end;
finally
FreeAndNil(lParamList);
end;
//except
// Nothing
//end;
end;
 
procedure TForm1.TrayIcon1Click(Sender: TObject);
begin
// TODO: when clicked, the icon-selection won't close