Subversion Repositories delphiutils

Compare Revisions

No changes between revisions

Regard whitespace Rev 74 → Rev 73

/trunk/StatusMon 3.0/StatusMon.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/Main.dfm
0,0 → 1,351
object MainForm: TMainForm
Left = 219
Top = 164
Caption = 'ViaThinkSoft Status Monitor'
ClientHeight = 492
ClientWidth = 730
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Menu = MainMenu
OldCreateOrder = False
Position = poScreenCenter
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object MonitorGrid: TStringGrid
Left = 0
Top = 0
Width = 730
Height = 467
Align = alClient
ColCount = 3
DefaultRowHeight = 18
FixedCols = 0
RowCount = 2
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect]
PopupMenu = MenuPopupMenu
TabOrder = 0
OnDblClick = MonitorGridDblClick
OnMouseDown = MonitorGridMouseDown
ExplicitHeight = 447
ColWidths = (
214
359
149)
end
object LastCheckPanel: TPanel
Left = 0
Top = 467
Width = 730
Height = 25
Align = alBottom
BevelOuter = bvNone
Caption = '...'
TabOrder = 1
ExplicitTop = 447
end
object TrayPopupMenu: TPopupMenu
Left = 8
Top = 48
object Anzeigen1: TMenuItem
Caption = '&Anzeigen'
Default = True
OnClick = Anzeigen1Click
end
object Beenden1: TMenuItem
Caption = '&Beenden'
OnClick = Beenden1Click
end
end
object MenuPopupMenu: TPopupMenu
Left = 40
Top = 48
object Open1: TMenuItem
Caption = #214'&ffnen'
Default = True
OnClick = Open1Click
end
object Ping1: TMenuItem
Caption = '&Ping'
OnClick = Ping1Click
end
object Checknow1: TMenuItem
Caption = 'P&r'#252'fen...'
OnClick = Checknow1Click
end
object N1: TMenuItem
Caption = '-'
end
object Edit1: TMenuItem
Caption = '&Bearbeiten...'
OnClick = Edit1Click
end
object Delete1: TMenuItem
Caption = '&L'#246'schen...'
OnClick = Delete1Click
end
end
object InitTimer: TTimer
OnTimer = InitTimerTimer
Left = 8
Top = 80
end
object LoopTimer: TTimer
Enabled = False
OnTimer = LoopTimerTimer
Left = 40
Top = 80
end
object MainMenu: TMainMenu
Left = 8
Top = 112
object MFile: TMenuItem
Caption = '&Datei'
object MNewEntry: TMenuItem
Caption = '&Neuer Eintrag...'
OnClick = MNewEntryClick
end
object MCheckAll: TMenuItem
Caption = '&Alle pr'#252'fen...'
OnClick = MCheckAllClick
end
object N4: TMenuItem
Caption = '-'
end
object MClose: TMenuItem
Caption = '&Schlie'#223'en'
OnClick = MCloseClick
end
object MCloseAndExit: TMenuItem
Caption = 'Schlie'#223'en und &beenden...'
OnClick = MCloseAndExitClick
end
end
object MEntry: TMenuItem
Caption = '&Eintrag'
object Open2: TMenuItem
Caption = #214'&ffnen'
OnClick = Open2Click
end
object Ping2: TMenuItem
Caption = '&Ping'
OnClick = Ping2Click
end
object Checknow2: TMenuItem
Caption = 'P&r'#252'fen...'
OnClick = Checknow2Click
end
object N3: TMenuItem
Caption = '-'
end
object Edit2: TMenuItem
Caption = '&Bearbeiten...'
OnClick = Edit2Click
end
object Delete2: TMenuItem
Caption = '&L'#246'schen...'
OnClick = Delete2Click
end
end
object MConfig: TMenuItem
Caption = '&Konfiguration'
object MInitTimeOpt: TMenuItem
Caption = '(InitTime)'
OnClick = MInitTimeOptClick
end
object MLoopTimeOpt: TMenuItem
Caption = '(LoopTime)'
OnClick = MLoopTimeOptClick
end
object MConnWarnOpt: TMenuItem
AutoCheck = True
Caption = 'Bei &Internetverbindungsfehler warnen'
OnClick = MConnWarnOptClick
end
object N2: TMenuItem
Caption = '-'
end
object MitWindowsstarten1: TMenuItem
AutoCheck = True
Caption = 'Mit &Windows starten'
OnClick = MitWindowsstarten1Click
end
end
object MHelp: TMenuItem
Caption = '&Hilfe'
object MSpecs: TMenuItem
Caption = '&Spezifikationen'
OnClick = MSpecsClick
end
object N5: TMenuItem
Caption = '-'
end
object MUpdate: TMenuItem
Caption = 'Auf &Updates pr'#252'fen...'
OnClick = MUpdateClick
end
object N6: TMenuItem
Caption = '-'
end
object MAbout: TMenuItem
Caption = '&Info '#252'ber Status Monitor...'
OnClick = MAboutClick
end
end
end
object UpdateTimer: TTimer
OnTimer = UpdateTimerTimer
Left = 72
Top = 80
end
object ImageList1: TImageList
Left = 8
Top = 144
Bitmap = {
494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000FFFF000000000000000000000000000000
0000000000007F7F7F0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000FFFF00000000000000
000000000000000000000000000000FFFF000000000000000000000000000000
00007F7F7F0000FFFF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000FFFF000000
000000000000000000000000000000FFFF000000000000000000000000007F7F
7F0000FFFF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000FF
FF000000000000000000000000000000000000000000000000000000000000FF
FF00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000FFFF0000FFFF0000FFFF0000000000000000000000
00000000000000000000000000000000000000000000FFFFFF00BFBFBF00BFBF
BF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00BFBFBF00FFFFFF00FFFFFF00FFFF
FF00BFBFBF00BFBFBF00FFFFFF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000
00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
FF000000FF00FFFFFF00FFFFFF00FFFFFF00BFBFBF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF007F7F7F00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
FF000000FF000000FF00FFFFFF00FFFFFF00BFBFBF0000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000FFFF0000FFFF0000FFFF000000
000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
000000FFFF0000FFFF0000FFFF000000000000000000FFFFFF00FFFFFF00FFFF
FF000000FF00FFFFFF00FFFFFF00FFFFFF0000000000BFBFBF00BFBFBF00BFBF
BF00BFBFBF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000BFBFBF00BFBFBF00BFBF
BF00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000
0000000000000000000000000000000000007F7F7F0000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000007F7F
7F00000000000000000000FFFF0000FFFF0000FFFF0000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FF00000000000000FF000000FF000000
FF00000000000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000007F7F7F0000FF
FF000000000000000000000000000000000000000000000000000000000000FF
FF00000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000007F7F7F0000FFFF000000
000000000000000000000000000000FFFF000000000000000000000000000000
000000FFFF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000FF0000000000000000000000
00000000FF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000FFFF00000000000000
000000000000000000000000000000FFFF000000000000000000000000000000
00000000000000FFFF0000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000FFFF000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000040000000100000000100010000000000800000000000000000000000
000000000000000000000000FFFFFF00FF7FFFFF00000000DE79FFFF00000000
AE73CFF300000000D6E787E100000000EE2F000000000000FC1F000000000000
F80F00000000000080080001000000001001000300000000F01F000700000000
F83F000F00000000E477FE8B00000000CF6BFFDF000000009E75FF7700000000
BE7BFFDF00000000FEFFFFFF0000000000000000000000000000000000000000
000000000000}
end
end
/trunk/StatusMon 3.0/StatusMon.bdsproj
0,0 → 1,177
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType">VCLApplication</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{D2B09E0C-F720-43E0-B7DD-5131387DE041}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
<Source>
<Source Name="MainSource">StatusMon.dpr</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
</FileVersion>
<Compiler>
<Compiler Name="A">8</Compiler>
<Compiler Name="B">0</Compiler>
<Compiler Name="C">1</Compiler>
<Compiler Name="D">1</Compiler>
<Compiler Name="E">0</Compiler>
<Compiler Name="F">0</Compiler>
<Compiler Name="G">1</Compiler>
<Compiler Name="H">1</Compiler>
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
<Compiler Name="L">1</Compiler>
<Compiler Name="M">0</Compiler>
<Compiler Name="N">1</Compiler>
<Compiler Name="O">1</Compiler>
<Compiler Name="P">1</Compiler>
<Compiler Name="Q">0</Compiler>
<Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
<Compiler Name="V">1</Compiler>
<Compiler Name="W">0</Compiler>
<Compiler Name="X">1</Compiler>
<Compiler Name="Y">1</Compiler>
<Compiler Name="Z">1</Compiler>
<Compiler Name="ShowHints">True</Compiler>
<Compiler Name="ShowWarnings">True</Compiler>
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
<Compiler Name="NamespacePrefix"></Compiler>
<Compiler Name="GenerateDocumentation">False</Compiler>
<Compiler Name="DefaultNamespace"></Compiler>
<Compiler Name="SymbolDeprecated">True</Compiler>
<Compiler Name="SymbolLibrary">True</Compiler>
<Compiler Name="SymbolPlatform">True</Compiler>
<Compiler Name="SymbolExperimental">True</Compiler>
<Compiler Name="UnitLibrary">True</Compiler>
<Compiler Name="UnitPlatform">True</Compiler>
<Compiler Name="UnitDeprecated">True</Compiler>
<Compiler Name="UnitExperimental">True</Compiler>
<Compiler Name="HResultCompat">True</Compiler>
<Compiler Name="HidingMember">True</Compiler>
<Compiler Name="HiddenVirtual">True</Compiler>
<Compiler Name="Garbage">True</Compiler>
<Compiler Name="BoundsError">True</Compiler>
<Compiler Name="ZeroNilCompat">True</Compiler>
<Compiler Name="StringConstTruncated">True</Compiler>
<Compiler Name="ForLoopVarVarPar">True</Compiler>
<Compiler Name="TypedConstVarPar">True</Compiler>
<Compiler Name="AsgToTypedConst">True</Compiler>
<Compiler Name="CaseLabelRange">True</Compiler>
<Compiler Name="ForVariable">True</Compiler>
<Compiler Name="ConstructingAbstract">True</Compiler>
<Compiler Name="ComparisonFalse">True</Compiler>
<Compiler Name="ComparisonTrue">True</Compiler>
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
<Compiler Name="UnsupportedConstruct">True</Compiler>
<Compiler Name="FileOpen">True</Compiler>
<Compiler Name="FileOpenUnitSrc">True</Compiler>
<Compiler Name="BadGlobalSymbol">True</Compiler>
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
<Compiler Name="InvalidDirective">True</Compiler>
<Compiler Name="PackageNoLink">True</Compiler>
<Compiler Name="PackageThreadVar">True</Compiler>
<Compiler Name="ImplicitImport">True</Compiler>
<Compiler Name="HPPEMITIgnored">True</Compiler>
<Compiler Name="NoRetVal">True</Compiler>
<Compiler Name="UseBeforeDef">True</Compiler>
<Compiler Name="ForLoopVarUndef">True</Compiler>
<Compiler Name="UnitNameMismatch">True</Compiler>
<Compiler Name="NoCFGFileFound">True</Compiler>
<Compiler Name="ImplicitVariants">True</Compiler>
<Compiler Name="UnicodeToLocale">True</Compiler>
<Compiler Name="LocaleToUnicode">True</Compiler>
<Compiler Name="ImagebaseMultiple">True</Compiler>
<Compiler Name="SuspiciousTypecast">True</Compiler>
<Compiler Name="PrivatePropAccessor">True</Compiler>
<Compiler Name="UnsafeType">False</Compiler>
<Compiler Name="UnsafeCode">False</Compiler>
<Compiler Name="UnsafeCast">False</Compiler>
<Compiler Name="OptionTruncated">True</Compiler>
<Compiler Name="WideCharReduced">True</Compiler>
<Compiler Name="DuplicatesIgnored">True</Compiler>
<Compiler Name="UnitInitSeq">True</Compiler>
<Compiler Name="LocalPInvoke">True</Compiler>
<Compiler Name="MessageDirective">True</Compiler>
<Compiler Name="CodePage"></Compiler>
</Compiler>
<Linker>
<Linker Name="MapFile">0</Linker>
<Linker Name="OutputObjs">0</Linker>
<Linker Name="GenerateHpps">False</Linker>
<Linker Name="ConsoleApp">1</Linker>
<Linker Name="DebugInfo">False</Linker>
<Linker Name="RemoteSymbols">False</Linker>
<Linker Name="GenerateDRC">False</Linker>
<Linker Name="MinStackSize">16384</Linker>
<Linker Name="MaxStackSize">1048576</Linker>
<Linker Name="ImageBase">4194304</Linker>
<Linker Name="ExeDescription"></Linker>
</Linker>
<Directories>
<Directories Name="OutputDir"></Directories>
<Directories Name="UnitOutputDir"></Directories>
<Directories Name="PackageDLLOutputDir"></Directories>
<Directories Name="PackageDCPOutputDir"></Directories>
<Directories Name="SearchPath"></Directories>
<Directories Name="Packages"></Directories>
<Directories Name="Conditionals"></Directories>
<Directories Name="DebugSourceDirs"></Directories>
<Directories Name="UsePackages">False</Directories>
</Directories>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Language>
<Language Name="ActiveLang"></Language>
<Language Name="ProjectLang">$00000000</Language>
<Language Name="RootDir"></Language>
</Language>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">True</VersionInfo>
<VersionInfo Name="MajorVer">3</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">22</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">ViaThinkSoft</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription">ViaThinkSoft Status Monitor Checker</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">3.0.0.22</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">StatMon3</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">(C) 2010 ViaThinkSoft</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks">Keine</VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename">StatusMon.exe</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">ViaThinkSoft StatusMonitor</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
<VersionInfoKeys Name="Webseite">www.viathinksoft.de</VersionInfoKeys>
<VersionInfoKeys Name="Projektleiter">Daniel Marschall - www.daniel-marschall.de</VersionInfoKeys>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>
/trunk/StatusMon 3.0/Output/setup.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/Main.pas
0,0 → 1,746
unit Main;
 
(*
 
# download einer primer-tabelle?
 
bug: wenn man einen eintrag ändert oder hinzufügt, werden alle "status" auf unknown zurückgesetzt
td: aktualisierenbutton/f5 erlauben
del-button...
icon: gray(internetdown),red,green
reg-write fehler erkennen
 
statustext einführen (format 2.0)
 
rote listeneinträge bei fehlern
 
f5 möglichkeit geben?
 
nur 1 instanz zulassen
 
spaltenindizes 0,1,2 in constanten packen
 
Future
------
 
- Rote Einträge bei Fehlern? (VCL Problem)
- XP Bubble verwenden?
- Toolbar / ApplicationEvents
 
*)
 
interface
 
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ShellAPI, Menus, Registry, Grids, StdCtrls, ExtCtrls, ImgList;
 
const
WM_TASKABAREVENT = WM_USER+1; //Taskbar message
 
type
TMainForm = class(TForm)
TrayPopupMenu: TPopupMenu;
Anzeigen1: TMenuItem;
Beenden1: TMenuItem;
MonitorGrid: TStringGrid;
MenuPopupMenu: TPopupMenu;
Edit1: TMenuItem;
Open1: TMenuItem;
N1: TMenuItem;
Delete1: TMenuItem;
Ping1: TMenuItem;
InitTimer: TTimer;
LoopTimer: TTimer;
Checknow1: TMenuItem;
MainMenu: TMainMenu;
MEntry: TMenuItem;
MHelp: TMenuItem;
MAbout: TMenuItem;
MFile: TMenuItem;
MClose: TMenuItem;
MCloseAndExit: TMenuItem;
MNewEntry: TMenuItem;
N4: TMenuItem;
MCheckAll: TMenuItem;
MConfig: TMenuItem;
MConnWarnOpt: TMenuItem;
MInitTimeOpt: TMenuItem;
MitWindowsstarten1: TMenuItem;
N2: TMenuItem;
MLoopTimeOpt: TMenuItem;
MSpecs: TMenuItem;
Open2: TMenuItem;
Ping2: TMenuItem;
Checknow2: TMenuItem;
N3: TMenuItem;
Edit2: TMenuItem;
Delete2: TMenuItem;
LastCheckPanel: TPanel;
MUpdate: TMenuItem;
UpdateTimer: TTimer;
N5: TMenuItem;
N6: TMenuItem;
ImageList1: TImageList;
procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Anzeigen1Click(Sender: TObject);
procedure Beenden1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure MonitorGridDblClick(Sender: TObject);
procedure Open1Click(Sender: TObject);
procedure MonitorGridMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Edit1Click(Sender: TObject);
procedure Delete1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure InitTimerTimer(Sender: TObject);
procedure LoopTimerTimer(Sender: TObject);
procedure Checknow1Click(Sender: TObject);
procedure Ping1Click(Sender: TObject);
procedure MCheckAllClick(Sender: TObject);
procedure MAboutClick(Sender: TObject);
procedure MLoopTimeOptClick(Sender: TObject);
procedure MNewEntryClick(Sender: TObject);
procedure MConnWarnOptClick(Sender: TObject);
procedure MInitTimeOptClick(Sender: TObject);
procedure MCloseClick(Sender: TObject);
procedure MCloseAndExitClick(Sender: TObject);
procedure MitWindowsstarten1Click(Sender: TObject);
procedure MSpecsClick(Sender: TObject);
procedure Open2Click(Sender: TObject);
procedure Ping2Click(Sender: TObject);
procedure Checknow2Click(Sender: TObject);
procedure Edit2Click(Sender: TObject);
procedure Delete2Click(Sender: TObject);
procedure MUpdateClick(Sender: TObject);
procedure UpdateTimerTimer(Sender: TObject);
private
RealClose: boolean;
WarnAtConnectivityFailure: boolean;
StatCache: TStringList;
procedure TaskbarEvent(var Msg: TMessage);
Message WM_TASKABAREVENT;
procedure OnQueryEndSession(var Msg: TWMQueryEndSession);
message WM_QUERYENDSESSION;
procedure OnWmQuit(var Msg: TWMQuit);
message WM_QUIT;
procedure NotifyIconChange(dwMessage: Cardinal);
procedure LoadConfig;
procedure ProcessStatMon(i: integer; ShowSuccess: boolean);
procedure ProcessAll(ShowSuccess: boolean);
function GetCurrentMonitorName: string;
function GetCurrentMonitorURL: string;
procedure Vordergrund;
procedure LoadList;
function Status: boolean;
// procedure RightAlignHelpMenuItem;
end;
 
var
MainForm: TMainForm;
 
implementation
 
{$R StatusMonManifest.res}
 
{$R *.dfm}
 
uses
Functions, ServiceEdit, StatusMonFuncs, About, Common;
 
type
TExtended = packed record
Val: Extended;
Err: boolean;
end;
 
function StrToExtended(str: String): TExtended;
begin
result.Err := false;
result.Val := 0;
try
result.Val := StrToFloat(str);
except
result.Err := true;
end;
end;
 
// Ref: http://www.delphi-fundgrube.de/faq01.htm
 
procedure TMainForm.TaskbarEvent(var Msg: TMessage);
var
Point: TPoint;
begin
{ Die WM_TaskbarEvent-Message "Msg" gibt in Msg.LParam
das genaue Ereignis an. Msg.LParam kann folgende Werte für
Mausereignisse annehmen:
 
WM_MouseMove
WM_LButtonDown
WM_LButtonUp
WM_LButtonDblClk
WM_RButtonDown
WM_RButtonUp
WM_RButtonDblClk }
 
case Msg.LParam of
WM_LButtonDblClk:
begin
Vordergrund;
end;
WM_RButtonUp:
begin
// Rechtsklick
// Diese Zeile ist wichtig, damit das PopupMenu korrekt
// wieder geschlossen wird:
SetForegroundWindow(Handle);
GetCursorPos(Point);
TrayPopupMenu.Popup(Point.x, Point.y);
end;
end;
end;
 
procedure TMainForm.UpdateTimerTimer(Sender: TObject);
begin
UpdateTimer.Interval := 6*60*60*1000; // Alle 6 Stunden gucken wir mal
VTSUpdateCheck('statusmon', '3.0', false, false);
end;
 
procedure TMainForm.MUpdateClick(Sender: TObject);
begin
VTSUpdateCheck('statusmon', '3.0', true, true);
end;
 
procedure TMainForm.MNewEntryClick(Sender: TObject);
begin
if EditForm.ShowDialog('') then LoadList;
end;
 
procedure TMainForm.MSpecsClick(Sender: TObject);
begin
// ToDo
end;
 
procedure TMainForm.NotifyIconChange(dwMessage: Cardinal);
var
NotifyIconData: TNotifyIconData;
ico: TIcon;
begin
Fillchar(NotifyIconData,Sizeof(NotifyIconData), 0);
NotifyIconData.cbSize := Sizeof(NotifyIconData);
NotifyIconData.Wnd := Handle;
NotifyIconData.uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
NotifyIconData.uCallbackMessage := WM_TASKABAREVENT;
 
ico := TIcon.Create;
if Status then
ImageList1.GetIcon(0, ico)
else
ImageList1.GetIcon(1, ico);
NotifyIconData.hIcon := ico.Handle;
 
NotifyIconData.szTip := 'ViaThinkSoft Status Monitor 3.0';
Shell_NotifyIcon(dwMessage, @NotifyIconData);
end;
 
procedure TMainForm.FormDestroy(Sender: TObject);
begin
StatCache.Free;
NotifyIconChange(NIM_DELETE);
end;
 
procedure TMainForm.FormCreate(Sender: TObject);
begin
LastCheckPanel.Caption := Format(LNG_LAST_CHECK, [LNG_LAST_CHECK_UNKNOWN]);
 
// RightAlignHelpMenuItem;
 
StatCache := TStringList.Create;
 
// Kommt sicherlich nicht in irgendeiner URL vor!
// #0 funktioniert nicht
StatCache.NameValueSeparator := #1;
 
NotifyIconChange(NIM_ADD);
 
MonitorGrid.Rows[0].Add(LNG_COLUMN_NAME);
MonitorGrid.Rows[0].Add(LNG_COLUMN_URL);
MonitorGrid.Rows[0].Add(LNG_COLUMN_STATUS);
 
// Default-Werte
WarnAtConnectivityFailure := false;
LoopTimer.Interval := 1*60*60*1000;
InitTimer.Interval := 5*60*1000;
UpdateTimer.Interval := 5*60*1000;
 
LoadConfig;
end;
 
procedure TMainForm.Vordergrund;
begin
Show;
ShowWindow(Handle, SW_RESTORE);
ForceForegroundWindow(Handle);
end;
 
procedure TMainForm.MLoopTimeOptClick(Sender: TObject);
var
reg: TRegistry;
x: string;
e: TExtended;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKey(REG_KEY_SETTINGS, true) then
begin
x := InputBox(LNG_LOOP_TIME, LNG_INPUT_MINUTE_INTERVAL, IntToStr(round(LoopTimer.Interval/60/1000)));
e := StrToExtended(x);
if not e.Err and (e.Val > 0) then
begin
LoopTimer.Interval := Round(e.Val*60*1000);
reg.WriteInteger(REG_VAL_LOOP_TIMER_INTERVAL, LoopTimer.Interval);
MLoopTimeOpt.Caption := Format(LNG_LOOP_TIME_OPTION, [round(e.Val)]);
end
else
begin
MessageBox(Handle, PChar(LNG_ERROR), PChar(LNG_NO_POSITIVE_NUMBER_WITHOUT_ZERO), MB_ICONERROR or MB_OK);
end;
end;
finally
reg.Free;
end;
end;
 
procedure TMainForm.MCheckAllClick(Sender: TObject);
begin
ProcessAll(false);
MessageBox(Handle, PChar(LNG_CHECKALL_FINISHED_TEXT), PChar(LNG_CHECKALL_FINISHED_CAPTION), MB_ICONINFORMATION or MB_OK);
end;
 
procedure TMainForm.Anzeigen1Click(Sender: TObject);
begin
Vordergrund;
end;
 
procedure TMainForm.Beenden1Click(Sender: TObject);
begin
MCloseAndExit.Click;
end;
 
procedure TMainForm.MAboutClick(Sender: TObject);
begin
AboutForm.PopupParent := Screen.ActiveForm; // Workaround
AboutForm.ShowModal;
end;
 
procedure TMainForm.LoadConfig;
var
reg: TRegistry;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKeyReadOnly(REG_KEY_SETTINGS) then
begin
if reg.ValueExists(REG_VAL_INIT_TIMER_INTERVAL) then
InitTimer.Interval := reg.ReadInteger(REG_VAL_INIT_TIMER_INTERVAL);
 
if reg.ValueExists(REG_VAL_LOOP_TIMER_INTERVAL) then
LoopTimer.Interval := reg.ReadInteger(REG_VAL_LOOP_TIMER_INTERVAL);
 
if reg.ValueExists(REG_VAL_WARN_AT_CONNFAILURE) then
WarnAtConnectivityFailure := reg.ReadBool(REG_VAL_WARN_AT_CONNFAILURE);
 
reg.CloseKey;
end;
finally
reg.Free;
end;
 
MInitTimeOpt.Caption := Format(LNG_INIT_TIME_OPTION, [round(InitTimer.Interval/1000/60)]);
MLoopTimeOpt.Caption := Format(LNG_LOOP_TIME_OPTION, [round(LoopTimer.Interval/1000/60)]);
MConnWarnOpt.Checked := WarnAtConnectivityFailure;
end;
 
procedure TMainForm.LoadList;
var
reg: TRegistry;
st: TStringList;
i: Integer;
MonitorUrl, CachedStat: String;
begin
reg := TRegistry.Create;
st := TStringList.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKeyReadOnly(REG_KEY_SERVICES) then
begin
reg.GetKeyNames(st);
MonitorGrid.RowCount := st.Count + 1;
for i := 0 to st.Count - 1 do
begin
if reg.OpenKeyReadOnly(Format(REG_KEY_SERVICE, [st.Strings[i]])) then
begin
MonitorGrid.Rows[i+1].Clear;
MonitorGrid.Rows[i+1].Add(st.Strings[i]);
MonitorUrl := reg.ReadString(REG_VAL_URL);
MonitorGrid.Rows[i+1].Add(MonitorUrl);
CachedStat := StatCache.Values[MonitorUrl];
If CachedStat = '' then CachedStat := LNG_STAT_UNKNOWN;
MonitorGrid.Rows[i+1].Add(CachedStat);
end;
end;
reg.CloseKey;
end;
finally
st.Free;
reg.Free;
end;
end;
 
procedure TMainForm.LoopTimerTimer(Sender: TObject);
begin
ProcessAll(false);
end;
 
procedure TMainForm.MitWindowsstarten1Click(Sender: TObject);
begin
ShowMessage('ToDo'); // ToDo
end;
 
procedure TMainForm.FormShow(Sender: TObject);
begin
LoadList;
end;
 
procedure TMainForm.MInitTimeOptClick(Sender: TObject);
var
reg: TRegistry;
x: string;
e: TExtended;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKey(REG_KEY_SETTINGS, true) then
begin
x := InputBox(LNG_INIT_TIME, LNG_INPUT_MINUTE_INTERVAL, IntToStr(round(InitTimer.Interval/60/1000)));
e := StrToExtended(x);
if not e.Err and (e.Val > 0) then
begin
InitTimer.Interval := Round(e.Val*60*1000);
reg.WriteInteger(REG_VAL_INIT_TIMER_INTERVAL, InitTimer.Interval);
MInitTimeOpt.Caption := Format(LNG_INIT_TIME_OPTION, [round(e.Val)]);
end
else
begin
MessageBox(Handle, PChar(LNG_ERROR), PChar(LNG_NO_POSITIVE_NUMBER_WITHOUT_ZERO), MB_ICONERROR or MB_OK);
end;
end;
finally
reg.Free;
end;
end;
 
procedure TMainForm.InitTimerTimer(Sender: TObject);
begin
InitTimer.Enabled := false;
LoopTimer.Enabled := true;
end;
 
procedure TMainForm.MCloseClick(Sender: TObject);
begin
Close;
end;
 
procedure TMainForm.MCloseAndExitClick(Sender: TObject);
begin
if MessageBox(Handle, PChar(LNG_EXIT_TEXT), PChar(LNG_EXIT_CAPTION), MB_ICONQUESTION or MB_YESNOCANCEL) = IDYES then
begin
RealClose := true;
Close;
end;
end;
 
procedure TMainForm.MonitorGridDblClick(Sender: TObject);
begin
Open1.Click;
end;
 
function TMainForm.GetCurrentMonitorName: string;
begin
// result := MonitorGrid.Rows[MonitorGrid.Row].Strings[0];
result := MonitorGrid.Cells[0, MonitorGrid.Row];
end;
 
function TMainForm.GetCurrentMonitorURL: string;
begin
// result := MonitorGrid.Rows[MonitorGrid.Row].Strings[1];
result := MonitorGrid.Cells[1, MonitorGrid.Row];
end;
 
procedure TMainForm.Open1Click(Sender: TObject);
begin
Open2.Click;
end;
 
procedure TMainForm.Open2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', PChar(GetCurrentMonitorURL), '', '', SW_SHOW)
end;
 
procedure TMainForm.Ping1Click(Sender: TObject);
begin
Ping2.Click;
end;
 
procedure TMainForm.Ping2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'ping', PChar(GetDomainNameByURL(GetCurrentMonitorURL)+' -t'), '', SW_NORMAL);
end;
 
procedure TMainForm.ProcessAll(ShowSuccess: boolean);
var
i: integer;
begin
for i := 1 to MonitorGrid.RowCount - 1 do
begin
MonitorGrid.Cells[2, i] := LNG_STAT_QUEUE;
end;
for i := 1 to MonitorGrid.RowCount - 1 do
begin
ProcessStatMon(i, ShowSuccess);
end;
LastCheckPanel.Caption := Format(LNG_LAST_CHECK, [DateTimeToStr(Now)]);
end;
 
procedure TMainForm.ProcessStatMon(i: integer; ShowSuccess: boolean);
var
x: TMonitorState;
MonitorUrl, ServerName: string;
begin
ServerName := MonitorGrid.Rows[i].Strings[0];
MonitorUrl := MonitorGrid.Rows[i].Strings[1];
 
if MonitorUrl = '' then Exit; // Passiert, wenn Create() aufgehalten wird (z.B. mit ShowMessage)
 
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_CHECKING;
Application.ProcessMessages;
 
x := DeterminateMonitorState(MonitorUrl);
 
if x = msOK then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_OK;
StatCache.Values[MonitorUrl] := LNG_STAT_OK;
NotifyIconChange(NIM_MODIFY);
if ShowSuccess then
begin
MessageBox(Handle, PChar(Format(LNG_ALERT_STATUS_OK, [ServerName, MonitorUrl])), PChar(LNG_CHECKALL_FINISHED_CAPTION), MB_ICONINFORMATION or MB_OK);
end;
end
else if x = msStatusWarning then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_WARNING;
StatCache.Values[MonitorUrl] := LNG_STAT_WARNING;
NotifyIconChange(NIM_MODIFY);
if MessageBox(Handle, PChar(Format(LNG_ALERT_STATUS_WARNING, [ServerName, MonitorUrl])), PChar(LNG_ALERT_CAPTION), MB_ICONWARNING or MB_YESNOCANCEL) = IDYES then
begin
ShellExecute(Handle, 'open', PChar(MonitorUrl), '', '', SW_NORMAL);
end;
end
else if x = msMonitorParseError then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_PARSEERROR;
StatCache.Values[MonitorUrl] := LNG_STAT_PARSEERROR;
NotifyIconChange(NIM_MODIFY);
if MessageBox(Handle, PChar(Format(LNG_ALERT_MONITOR_FAILURE, [ServerName, MonitorUrl])), PChar(LNG_ALERT_CAPTION), MB_ICONWARNING or MB_YESNOCANCEL) = IDYES then
begin
ShellExecute(Handle, 'open', PChar(MonitorUrl), '', '', SW_NORMAL);
end;
end
else if x = msMonitorGeneralError then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_GENERALERROR;
StatCache.Values[MonitorUrl] := LNG_STAT_GENERALERROR;
NotifyIconChange(NIM_MODIFY);
if MessageBox(Handle, PChar(Format(LNG_ALERT_MONITOR_FAILURE, [ServerName, MonitorUrl])), PChar(LNG_ALERT_CAPTION), MB_ICONWARNING or MB_YESNOCANCEL) = IDYES then
begin
ShellExecute(Handle, 'open', PChar(MonitorUrl), '', '', SW_NORMAL);
end;
end
else if x = msServerDown then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_SERVERDOWN;
StatCache.Values[MonitorUrl] := LNG_STAT_SERVERDOWN;
NotifyIconChange(NIM_MODIFY);
// Es besteht eine Internetverbindung, daher ist wohl was mit dem
// Server nicht in Ordnung
 
if MessageBox(Handle, PChar(Format(LNG_ALERT_SERVER_DOWN, [ServerName, MonitorUrl])), PChar(LNG_ALERT_CAPTION), MB_ICONWARNING or MB_YESNOCANCEL) = IDYES then
begin
Ping1.Click;
end;
end
else if x = msInternetBroken then
begin
MonitorGrid.Rows[i].Strings[2] := LNG_STAT_INTERNETBROKEN;
StatCache.Values[MonitorUrl] := LNG_STAT_INTERNETBROKEN;
NotifyIconChange(NIM_MODIFY);
if not WarnAtConnectivityFailure then
begin
if MessageBox(Handle, PChar(Format(LNG_ALERT_CONNECTIVITY_FAILURE, [ServerName, MonitorUrl])), PChar(LNG_ALERT_CAPTION), MB_ICONWARNING or MB_YESNOCANCEL) = IDYES then
begin
Ping1.Click;
end;
end;
end;
end;
 
function TMainForm.Status: boolean;
var
i: integer;
s: string;
begin
for i := 1 to MonitorGrid.RowCount - 1 do
begin
s := MonitorGrid.Cells[2, i];
if (s <> LNG_STAT_OK) and (s <> LNG_STAT_UNKNOWN) and
(s <> LNG_STAT_QUEUE) and (s <> LNG_STAT_CHECKING) and
(s <> '') then
begin
result := false;
exit;
end;
end;
result := true;
end;
 
// Ref: http://delphi.about.com/od/adptips2006/qt/rightalignmenu.htm
(* procedure TMainForm.RightAlignHelpMenuItem;
var
mii: TMenuItemInfo;
hMainMenu: hMenu;
Buffer: array[0..79] of Char;
begin
hMainMenu := Self.Menu.Handle;
 
//GET Help Menu Item Info
mii.cbSize := SizeOf(mii) ;
mii.fMask := MIIM_TYPE;
mii.dwTypeData := Buffer;
mii.cch := SizeOf(Buffer) ;
GetMenuItemInfo(hMainMenu, MHelp.Command, false, mii) ;
 
//SET Help Menu Item Info
mii.fType := mii.fType or MFT_RIGHTJUSTIFY;
SetMenuItemInfo(hMainMenu, MHelp.Command, false, mii) ;
end; *)
 
procedure TMainForm.MonitorGridMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
col, row: integer;
begin
if Button = mbRight then
begin
MonitorGrid.MouseToCell(X, Y, col, row);
if row >= MonitorGrid.FixedRows then
MonitorGrid.Row := row;
 
if col >= MonitorGrid.FixedCols then
MonitorGrid.Col := col;
 
if (row >= MonitorGrid.FixedRows) and
(col >= MonitorGrid.FixedCols) then
begin
MonitorGrid.PopupMenu := MenuPopupMenu;
end
else
begin
MonitorGrid.PopupMenu := nil;
end;
end;
end;
 
procedure TMainForm.Edit1Click(Sender: TObject);
begin
Edit2.Click;
end;
 
procedure TMainForm.Edit2Click(Sender: TObject);
begin
if EditForm.ShowDialog(GetCurrentMonitorName) then LoadList;
end;
 
procedure TMainForm.Delete2Click(Sender: TObject);
var
reg: TRegistry;
begin
if MessageBox(Handle, PChar(Format(LNG_DELETE_TEXT, [GetCurrentMonitorName])), PChar(LNG_DELETE_CAPTION), MB_ICONQUESTION or MB_YESNOCANCEL) = IDYES then
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.DeleteKey(Format(REG_KEY_SERVICE, [GetCurrentMonitorName])) then LoadList;
finally
reg.Free;
end;
end;
end;
 
procedure TMainForm.Delete1Click(Sender: TObject);
begin
Delete2.Click;
end;
 
procedure TMainForm.Checknow1Click(Sender: TObject);
begin
Checknow2.Click;
end;
 
procedure TMainForm.Checknow2Click(Sender: TObject);
begin
ProcessStatMon(MonitorGrid.Row, true);
end;
 
procedure TMainForm.MConnWarnOptClick(Sender: TObject);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKey(REG_KEY_SETTINGS, true) then
begin
WarnAtConnectivityFailure := MConnWarnOpt.Checked;
reg.WriteBool(REG_VAL_WARN_AT_CONNFAILURE, WarnAtConnectivityFailure);
end;
finally
reg.Free;
end;
end;
 
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
Hide;
CanClose := RealClose;
end;
 
procedure TMainForm.OnQueryEndSession(var Msg: TWMQueryEndSession);
begin
RealClose := true;
Close;
Msg.Result := 1;
end;
 
procedure TMainForm.OnWmQuit(var Msg: TWMQuit);
begin
RealClose := true;
Close;
Msg.Result := 1;
end;
 
end.
/trunk/StatusMon 3.0/StatusMon.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/StatusMon.iss
0,0 → 1,78
; StatusMon Setup Script for InnoSetup
; by Daniel Marschall
 
; http://www.daniel-marschall.de/
 
; ToDo:
; - For all users or only for me
 
[Setup]
AppName=StatusMon
AppVerName=StatusMon 3.0
AppVersion=3.0
AppCopyright=© Copyright 2010 ViaThinkSoft.
AppPublisher=ViaThinkSoft
AppPublisherURL=http://www.viathinksoft.de/
AppSupportURL=http://www.daniel-marschall.de/
AppUpdatesURL=http://www.viathinksoft.de/
DefaultDirName={pf}\ViaThinkSoft Status Monitor
DefaultGroupName=Status Monitor
VersionInfoCompany=ViaThinkSoft
VersionInfoCopyright=© Copyright 2010 ViaThinkSoft.
VersionInfoDescription=ViaThinkSoft Status Monitor Setup
VersionInfoTextVersion=1.0.0.0
VersionInfoVersion=3.0
Compression=zip/9
 
[Languages]
Name: de; MessagesFile: "compiler:Languages\German.isl"
 
[LangOptions]
LanguageName=Deutsch
LanguageID=$0407
 
[Tasks]
Name: "autostart"; Description: "Starte automatisch mit &Windows"; GroupDescription: "Programmverknüpfungen:"
 
[Files]
Source: "StatusMon.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "examples\*.*"; DestDir: "{app}\examples"
Source: "examples\joomla_version\*.*"; DestDir: "{app}\examples\joomla_version"
Source: "examples\phpbb3_version\*.*"; DestDir: "{app}\examples\phpbb3_version"
Source: "examples\verteiler\*.*"; DestDir: "{app}\examples\verteiler"
Source: "examples\positive_responder\*.*"; DestDir: "{app}\examples\positive_responder"
 
[Icons]
Name: "{group}\Webseiten\ViaThinkSoft"; Filename: "http://www.viathinksoft.de/"
Name: "{group}\Status Monitor"; Filename: "{app}\StatusMon.exe"
Name: "{group}\Status Monitor deinstallieren"; Filename: "{uninstallexe}"
Name: "{userstartup}\ViaThinkSoft Status Monitor"; Filename: "{app}\StatusMon.exe"; Tasks: autostart
 
[Run]
Filename: "{app}\StatusMon.exe"; Description: "Status Monitor starten"; Flags: nowait postinstall skipifsilent
 
[Code]
Const WM_QUIT = $0012;
 
function InitializeSetup(): Boolean;
var
WinID: HWND;
begin
// Doppelte Setup-Instant verhindern
if CheckForMutexes('StatusMonSetup') then
begin
Result := False;
Exit;
end;
Result := True;
CreateMutex('StatusMonSetup');
 
// Laufendes Programm beenden
WinID := FindWindowByWindowName('ViaThinkSoft Status Monitor');
if (WinID <> 0) then
begin
// Wir benötigen WM_QUIT, da WM_CLOSE in diesem Fall nur zum minimieren führt
SendMessage(WinID, WM_QUIT, 0, 0);
end
end;
 
/trunk/StatusMon 3.0/private/FIRSTAID.BMP
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Heart.psd
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Warning.psd
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Heart.psd.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Heart.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Warning.psd.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/alternativ/Warning.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/private/DAY.BMP
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/StatusMonFuncs.pas
0,0 → 1,89
unit StatusMonFuncs;
 
interface
 
uses
SysUtils, IdHTTP;
 
type
TMonitorState = (msOK, msStatusWarning, msMonitorParseError,
msMonitorGeneralError, msServerDown, msInternetBroken);
 
function DeterminateMonitorState(MonitorUrl: String): TMonitorState;
 
implementation
 
function InternetConnectivity(): boolean;
resourcestring
INTERNET_CHECK_URL = 'http://www.google.de/';
var
http: TIdHTTP;
begin
result := true;
try
http := TIdHTTP.Create;
try
http.Get(INTERNET_CHECK_URL);
finally
http.Free;
end;
except
result := false;
end;
end;
 
function DeterminateMonitorState(MonitorUrl: String): TMonitorState;
var
http: TIdHTTP;
s: string;
resourcestring
OK_COMMENT = '<!-- STATUS: OK -->';
WARNING_COMMENT = '<!-- STATUS: WARNING -->';
begin
http := TIdHTTP.Create;
try
try
http.HandleRedirects := true;
s := http.Get(MonitorUrl);
if (AnsiPos(OK_COMMENT, s) > 0) and
(AnsiPos(WARNING_COMMENT, s) > 0) then
begin
result := msMonitorParseError;
end
else if AnsiPos(OK_COMMENT, s) > 0 then
begin
result := msOk;
end
else if AnsiPos(WARNING_COMMENT, s) > 0 then
begin
result := msStatusWarning;
end
else
begin
result := msMonitorParseError;
end;
except
if http.Response.ResponseCode <> -1 then
begin
result := msMonitorGeneralError;
end
else
begin
if InternetConnectivity() then
begin
result := msServerDown;
end
else
begin
result := msInternetBroken;
end;
end;
 
// raise;
end;
finally
http.Free;
end;
end;
 
end.
/trunk/StatusMon 3.0/examples/StatusMonitor Anforderungen.txt
0,0 → 1,28
Anforderungen an einen "Statusmonitor"
 
Ein Statusmonitor hat die Aufgabe, den Status eines Dienstes
zu indizieren. Es kann nur der Zustand "OK" oder "Warnung"
angenommen werden.
 
Die Anforderungen hierfür sind:
 
1. Der Service MUSS stets erreichbar sein.
Ist der Host "down", entsteht eine Warnung.
2. Als Protokoll SOLLTE "http" verwendet werden.
"https" Verbindungen werden aufgrund der Kompatibilität
nicht empfohlen.
3. Der Statusmonitor MUSS erreichbar sein ohne jegliche
erforderliche POST oder Authentifikationsdaten (Passwort).
4. Es MUSS einer der folgenden Kommentare sich in der Ausgabe
befinden:
<!-- STATUS: OK -->
<!-- STATUS: WARNING -->
5. Es MUSS die Groß- und Kleinschreibung und alle Leerzeichen
beachtet werden.
6. "OK" und "WARNING" DÜRFEN NICHT gemeinsam auftreten.
7. Es SOLLTE zusätzlich eine der folgenden Kopfzeilen in der
HTTP-Response gesendet werden:
X-Status: OK
X-Status: Warning
 
Stand: 12.11.2010 Daniel Marschall ViaThinkSoft
/trunk/StatusMon 3.0/examples/verteiler/index.php
0,0 → 1,101
<?php
 
// Version: 2010-11-19 05:42
 
set_time_limit(0);
 
ob_start();
 
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
 
<?php
 
error_reporting(E_ALL | E_NOTICE);
 
$monitors = array();
 
require 'config.inc.php';
 
?><html>
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Statusmonitor Verteilerknoten</title>
</head>
 
<body>
<h1>Statusmonitor Verteilerknoten</h1>
 
<table border="1">
<tr>
<td><b>URL</b></td>
<td><b>Status</b></td>
</tr>
 
<?php
 
define('S_OK', '<!-- STATUS: OK -->');
define('S_WA', '<!-- STATUS: WARNING -->');
 
if (count($monitors) == 0) {
echo '<tr>';
echo '<td colspan="2">No servers in list.</td>';
echo '</tr>';
}
 
$c = S_OK;
 
foreach ($monitors as $mon) {
$contents = @file_get_contents($mon);
 
echo '<tr>';
echo '<td><a href="'.$mon.'" target="_blank">'.$mon.'</a></td>';
 
$has_ok = strpos($contents, S_OK) !== false;
$has_wa = strpos($contents, S_WA) !== false;
 
if (($has_ok) && (!$has_wa)) {
$s = '<font color="green">Good</font>';
} else {
$c = S_WA;
if ((!$has_ok) && ($has_wa)) {
$s = '<font color="red">Bad</font>';
} else if ($contents === false) {
$s = '<font color="red">Down / General error</font>';
} else {
$s = '<font color="red">Parse-Error</font>';
}
}
 
echo '<td>'.$s.'</td>';
echo '</tr>';
}
 
?>
</table>
 
<p>Allgemeiner Status: <?php
 
if ($c == S_OK) {
echo '<font color="green">Good</font>';
header('X-Status: OK');
} else {
echo '<font color="red">Bad</font>';
header('X-Status: Warning');
}
 
?>.</p>
 
<?php echo $c; ?>
 
</body>
 
</html><?php
 
$r = ob_get_contents();
ob_end_clean();
 
echo $r;
 
?>
/trunk/StatusMon 3.0/examples/verteiler/config.inc.php
0,0 → 1,6
<?php
 
$monitors[] = 'http://www.example.com/monitor/monitor_a/';
$monitors[] = 'http://www.example.com/monitor/monitor_b/';
 
?>
/trunk/StatusMon 3.0/examples/phpbb3_version/config.inc.php
0,0 → 1,5
<?php
 
$phpbb_dirs[] = '/home/www/.../html/phpbb/';
 
?>
/trunk/StatusMon 3.0/examples/phpbb3_version/index.php
0,0 → 1,74
<?php
 
// Version: 2010-11-16 19:35
 
error_reporting(E_ALL | E_NOTICE);
 
require 'config.inc.php';
 
ob_start();
 
echo '<h1>phpBB-Version-Monitor</h1>';
 
$good = false;
 
foreach ($phpbb_dirs as $phpbb_dir) {
check_phpbb($phpbb_dir);
}
 
function check_phpbb($phpbb_dir) {
global $good;
 
echo '<h2>System: '.$phpbb_dir.'</h2>';
 
define('IN_PHPBB', '');
$table_prefix = '';
include($phpbb_dir.'includes/constants.php');
$version = PHPBB_VERSION;
 
$latest_ver = get_latest_ver(false);
 
echo '<p>phpBB-Version: ';
if ($version == $latest_ver) {
$good = true;
echo '<font color="green">Aktuell</font>';
} else {
echo '<font color="red">Veraltet</font>';
}
echo ' ('.$version.' vs. '.$latest_ver.')</p>';
}
 
// Overal status
 
$c = ob_get_contents();
ob_end_clean();
 
if ($good) {
header('X-Status: OK');
echo $c;
echo '<!-- STATUS: OK -->';
} else {
header('X-Status: Warning');
echo $c;
echo '<!-- STATUS: WARNING -->';
}
 
// Functions
 
function get_latest_ver($qa = false) {
if ($qa) {
$url = 'http://www.phpbb.com/updatecheck/30x_qa.txt';
} else {
$url = 'http://www.phpbb.com/updatecheck/30x.txt';
}
 
$content = @file_get_contents($url);
 
$ary = explode("\n", $content);
 
$version = $ary[0];
 
return $version;
}
 
?>
/trunk/StatusMon 3.0/examples/positive_responder/index.php
0,0 → 1,17
<?php
 
// Version: 2010-11-16 19:35
 
error_reporting(E_ALL | E_NOTICE);
 
$good = true;
 
if ($good) {
header('X-Status: OK');
echo '<!-- STATUS: OK -->';
} else {
header('X-Status: Warning');
echo '<!-- STATUS: WARNING -->';
}
 
?>
/trunk/StatusMon 3.0/examples/joomla_version/config.inc.php
0,0 → 1,5
<?php
 
$cms_dirs[] = '/home/www/.../html/cms/';
 
?>
/trunk/StatusMon 3.0/examples/joomla_version/index.php
0,0 → 1,109
<?php
 
// Version: 2010-11-16 19:35
 
error_reporting(E_ALL | E_NOTICE);
 
$cms_dirs = array();
 
require 'config.inc.php';
 
ob_start();
 
echo '<h1>Joomla-Version-Monitor</h1>';
 
$good = false;
 
foreach ($cms_dirs as $cms_dir) {
check_cms($cms_dir);
}
 
function check_cms($cms_dir) {
global $good;
 
echo '<h2>CMS: '.$cms_dir.'</h2>';
 
define('MD5_OLD', 'f371370fe72af1db2b939d2c3ed8bbab');
define('MD5_NEW', '0f2f9ac773a64af2f75a7fee9c30df47');
 
// 1. Joomla Core
 
define('JPATH_BASE', '');
include ($cms_dir . 'libraries/joomla/version.php');
$v = new JVersion;
$version = $v->getShortVersion();
$url = 'http://versioncheck.jgerman.de/core/'.$version.'/middle';
$xxx = file_get_contents($url);
$md5 = md5($xxx);
echo '<p>Joomla-Core: ';
if ($md5 == MD5_NEW) {
$good = true;
echo '<font color="green">Aktuell</font>';
} else {
if ($md5 == MD5_OLD) {
echo '<font color="red">Veraltet</font>';
} else {
echo '<font color="red">Pr&uuml;fsumme <a href="'.$url.'" target="_blank">'.$md5.'</a> unbekannt.</font>';
}
}
echo ' ('.$version.')</p>';
 
// 2. Backend
 
$content = file_get_contents($cms_dir . 'administrator/language/de-DE/de-DE.xml');
preg_match ('@<version>(.+?)</version>@is', $content, $matches);
$version = $matches[1];
$url = 'http://versioncheck.jgerman.de/lang/'.$version.'/middle';
$xxx = file_get_contents($url);
$md5 = md5($xxx);
echo '<p>Backend: ';
if ($md5 == MD5_NEW) {
$good = true;
echo '<font color="green">Aktuell</font>';
} else {
if ($md5 == MD5_OLD) {
echo '<font color="red">Veraltet</font>';
} else {
echo '<font color="red">Pr&uuml;fsumme <a href="'.$url.'" target="_blank">'.$md5.'</a> unbekannt.</font>';
}
}
echo ' ('.$version.')</p>';
 
// 3. Frontend
 
$content = file_get_contents($cms_dir . 'language/de-DE/de-DE.xml');
preg_match ('@<version>(.+?)</version>@is', $content, $matches);
$version = $matches[1];
$url = 'http://versioncheck.jgerman.de/lang/'.$version.'/middle';
$xxx = file_get_contents($url);
$md5 = md5($xxx);
echo '<p>Frontend: ';
if ($md5 == MD5_NEW) {
$good = true;
echo '<font color="green">Aktuell</font>';
} else {
if ($md5 == MD5_OLD) {
echo '<font color="red">Veraltet</font>';
} else {
echo '<font color="red">Pr&uuml;fsumme <a href="'.$url.'" target="_blank">'.$md5.'</a> unbekannt.</font>';
}
}
echo ' ('.$version.')</p>';
}
 
// Overal status
 
$c = ob_get_contents();
ob_end_clean();
 
if ($good) {
header('X-Status: OK');
echo $c;
echo '<!-- STATUS: OK -->';
} else {
header('X-Status: Warning');
echo $c;
echo '<!-- STATUS: WARNING -->';
}
 
?>
/trunk/StatusMon 3.0/About.dfm
0,0 → 1,54
object AboutForm: TAboutForm
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'ViaThinkSoft Status Monitor'
ClientHeight = 157
ClientWidth = 341
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 8
Width = 59
Height = 13
Caption = 'ViaThinkSoft'
end
object Label2: TLabel
Left = 8
Top = 24
Width = 170
Height = 25
Caption = 'Status Monitor 3.0'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 8
Top = 136
Width = 154
Height = 13
Caption = '(C) Copyright 2010 ViaThinkSoft'
end
object Button1: TButton
Left = 256
Top = 120
Width = 75
Height = 25
Caption = 'OK'
TabOrder = 0
OnClick = Button1Click
end
end
/trunk/StatusMon 3.0/StatusMon.dpr
0,0 → 1,22
program StatusMon;
 
uses
Forms,
NoDoubleStart in 'NoDoubleStart.pas',
StatusMonFuncs in 'StatusMonFuncs.pas',
Common in 'Common.pas',
Main in 'Main.pas' {MainForm},
Functions in 'Functions.pas',
ServiceEdit in 'ServiceEdit.pas' {EditForm},
About in 'About.pas' {AboutForm};
 
{$R *.res}
 
begin
Application.Initialize;
Application.ShowMainForm := false;
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TEditForm, EditForm);
Application.CreateForm(TAboutForm, AboutForm);
Application.Run;
end.
/trunk/StatusMon 3.0/ServiceEdit.pas
0,0 → 1,100
unit ServiceEdit;
 
interface
 
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Registry;
 
type
TEditForm = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
OriginalValue: String;
public
function ShowDialog(AServiceName: string): boolean;
end;
 
var
EditForm: TEditForm;
 
implementation
 
{$R *.dfm}
 
uses
Common;
 
procedure TEditForm.Button1Click(Sender: TObject);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKey(REG_KEY_SERVICES, true) then
begin
if OriginalValue <> '' then
begin
reg.DeleteKey(OriginalValue);
end;
if reg.OpenKey(Edit1.Text, true) then
begin
reg.WriteString(REG_VAL_URL, Edit2.Text);
end;
reg.CloseKey;
end;
finally
reg.Free;
end;
 
ModalResult := mrOk;
end;
 
procedure TEditForm.Button2Click(Sender: TObject);
begin
ModalResult := mrCancel;
end;
 
function TEditForm.ShowDialog(AServiceName: string): boolean;
var
reg: TRegistry;
begin
Edit1.Text := AServiceName;
OriginalValue := AServiceName;
 
if AServiceName = '' then
Caption := LNG_MONITOR_NEW
else
Caption := LNG_MONITOR_EDIT;
 
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
if reg.OpenKeyReadOnly(REG_KEY_SERVICES) then
begin
if reg.OpenKeyReadOnly(AServiceName) then
begin
Edit2.Text := reg.ReadString(REG_VAL_URL);
end;
reg.CloseKey;
end;
finally
reg.Free;
end;
 
Show;
Edit1.SetFocus;
Hide;
 
Result := ShowModal() = mrOk;
end;
 
end.
/trunk/StatusMon 3.0/Functions.pas
0,0 → 1,161
unit Functions;
 
interface
 
uses
SysUtils, Windows, Messages, idHTTP, ShellAPI;
 
function GetDomainNameByURL(URL: string): string;
function ForceForegroundWindow(hwnd: THandle): Boolean;
 
procedure VTSUpdateCheck(abbreviation, thisversion: string;
showNoNewUpdatesMsg, showErrorMsg: boolean);
 
implementation
 
function GetDomainNameByURL(URL: string): string;
var
i: integer;
j: integer;
c: String;
const
Delim = '/';
begin
j := 0;
for i := 1 to Length(URL) do
begin
c := Copy(URL, i, 1);
 
if (j = 2) and (c <> Delim) then
begin
result := result + c;
end
else if j > 2 then break;
 
if c = Delim then
begin
inc(j);
end;
end;
end;
 
// Ref: http://www.swissdelphicenter.ch/de/showcode.php?id=261
 
function ForceForegroundWindow(hwnd: THandle): Boolean;
const
SPI_GETFOREGROUNDLOCKTIMEOUT = $2000;
SPI_SETFOREGROUNDLOCKTIMEOUT = $2001;
var
ForegroundThreadID: DWORD;
ThisThreadID: DWORD;
timeout: DWORD;
begin
if IsIconic(hwnd) then ShowWindow(hwnd, SW_RESTORE);
 
if GetForegroundWindow = hwnd then Result := True
else
begin
// Windows 98/2000 doesn't want to foreground a window when some other
// window has keyboard focus
 
if ((Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion > 4)) or
((Win32Platform = VER_PLATFORM_WIN32_WINDOWS) and
((Win32MajorVersion > 4) or ((Win32MajorVersion = 4) and
(Win32MinorVersion > 0)))) then
begin
// Code from Karl E. Peterson, www.mvps.org/vb/sample.htm
// Converted to Delphi by Ray Lischner
// Published in The Delphi Magazine 55, page 16
 
Result := False;
ForegroundThreadID := GetWindowThreadProcessID(GetForegroundWindow, nil);
ThisThreadID := GetWindowThreadPRocessId(hwnd, nil);
if AttachThreadInput(ThisThreadID, ForegroundThreadID, True) then
begin
BringWindowToTop(hwnd); // IE 5.5 related hack
SetForegroundWindow(hwnd);
AttachThreadInput(ThisThreadID, ForegroundThreadID, False);
Result := (GetForegroundWindow = hwnd);
end;
if not Result then
begin
// Code by Daniel P. Stasinski
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, @timeout, 0);
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, TObject(0),
SPIF_SENDCHANGE);
BringWindowToTop(hwnd); // IE 5.5 related hack
SetForegroundWindow(hWnd);
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, TObject(timeout), SPIF_SENDCHANGE);
end;
end
else
begin
BringWindowToTop(hwnd); // IE 5.5 related hack
SetForegroundWindow(hwnd);
end;
 
Result := (GetForegroundWindow = hwnd);
end;
end;
 
const
Handle = 0; // Da wir außerhalb eines Forms sind...
 
procedure VTSUpdateCheck(abbreviation, thisversion: string;
showNoNewUpdatesMsg, showErrorMsg: boolean);
resourcestring
lng_no_new_version = 'Es ist keine neue Programmversion vorhanden.';
lng_update_error = 'Ein Fehler ist aufgetreten. Wahrscheinlich ist keine Internetverbindung aufgebaut, oder der der ViaThinkSoft-Server temporär offline.';
lng_caption_error = 'Fehler';
lng_caption_information = 'Information';
lng_update_new_version = 'Eine neue Programmversion (%s) ist vorhanden. Möchten Sie diese jetzt herunterladen?';
const
url_comparison = 'http://www.viathinksoft.de/update/?id=%s&expect_version=%s';
url_version = 'http://www.viathinksoft.de/update/?id=%s';
url_download = 'http://www.viathinksoft.de/update/?id=@%s';
res_nothing = 'NO_UPDATES';
res_updates = 'UPDATE_AVAILABLE';
var
temp: string;
http: TIdHTTP;
begin
temp := '';
http := TIdHTTP.Create;
try
temp := http.Get(Format(url_comparison, [abbreviation, thisversion]));
finally
http.Free;
end;
 
if temp = res_nothing then
begin
if showNoNewUpdatesMsg then
begin
MessageBox(Handle, PChar(lng_no_new_version), PChar(lng_caption_information), MB_OK + MB_ICONASTERISK);
end;
end
else if temp = res_updates then
begin
temp := '';
http := TIdHTTP.Create;
try
temp := http.Get(Format(url_version, [abbreviation]));
finally
http.Free;
end;
 
if MessageBox(Handle, PChar(Format(lng_update_new_version, [temp])), PChar(lng_caption_information), MB_YESNO + MB_ICONASTERISK) = ID_YES then
begin
ShellExecute(Handle, 'open', pchar(Format(url_download, [abbreviation])), '', '', sw_normal);
end;
end
else
begin
if showErrorMsg then
begin
MessageBox(Handle, PChar(lng_update_error), PChar(lng_caption_error), MB_OK + MB_ICONERROR)
end;
end;
end;
 
end.
/trunk/StatusMon 3.0/About.pas
0,0 → 1,34
unit About;
 
interface
 
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
 
type
TAboutForm = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
 
var
AboutForm: TAboutForm;
 
implementation
 
{$R *.dfm}
 
procedure TAboutForm.Button1Click(Sender: TObject);
begin
ModalResult := mrOk;
end;
 
end.
/trunk/StatusMon 3.0/Common.pas
0,0 → 1,54
unit Common;
 
interface
 
resourcestring
LNG_INIT_TIME_OPTION = 'Wartezeit bei Programm&start: %d Min.';
LNG_INIT_TIME = 'Wartezeit bei Programmstart';
LNG_LOOP_TIME_OPTION = 'Wartezeit zwischen Prüf&zyklen: %d Min.';
LNG_LOOP_TIME = 'Wartezeit zwischen Prüfzyklen';
LNG_ERROR = 'Fehler';
LNG_NO_POSITIVE_NUMBER_WITHOUT_ZERO = 'Der Wert "%s" ist keine positive Zahl (außer 0).';
LNG_INPUT_MINUTE_INTERVAL = 'Bitte geben Sie einen neuen Wert in Minuten an.';
LNG_COLUMN_NAME = 'Name';
LNG_COLUMN_URL = 'URL';
LNG_COLUMN_STATUS = 'Status';
LNG_CHECKALL_FINISHED_CAPTION = 'Tests abgeschlossen';
LNG_CHECKALL_FINISHED_TEXT = 'Alle Tests wurden abgeschlossen.';
LNG_EXIT_TEXT = 'Möchten Sie den Status Monitor wirklich beenden und keine Warnungen mehr erhalten?';
LNG_EXIT_CAPTION = 'Beenden?';
LNG_DELETE_TEXT = 'Statusmonitor "%s" wirklich löschen?';
LNG_DELETE_CAPTION = 'Lösch-Bestätigung';
LNG_STAT_QUEUE = 'In queue...';
LNG_STAT_CHECKING = 'Checking...';
LNG_STAT_OK = 'OK';
LNG_STAT_WARNING = 'Warning';
LNG_STAT_PARSEERROR = 'Parse error';
LNG_STAT_GENERALERROR = 'General error';
LNG_STAT_SERVERDOWN = 'Server down';
LNG_STAT_INTERNETBROKEN = 'Unknown (Internet broken)';
LNG_STAT_UNKNOWN = 'Unknown (Not checked)';
LNG_ALERT_CAPTION = 'Status Monitor Alert';
LNG_ALERT_CAPTION_OK = 'Status Monitor Check';
LNG_ALERT_STATUS_WARNING = 'Der Status-Monitor "%s" meldet ein Problem! Status-Monitor jetzt öffnen?' + #13#10#13#10 + 'Monitor-URL: %s';
LNG_ALERT_STATUS_OK = 'Es existieren keine Probleme mit Status-Monitor "%s"' + #13#10#13#10 + 'Monitor-URL: %s';
LNG_ALERT_MONITOR_FAILURE = 'Die Ausgabe des Status-Monitors "%s" kann nicht interpretiert werden! Status-Monitor jetzt öffnen?' + #13#10#13#10 + 'Monitor-URL: %s';
LNG_ALERT_CONNECTIVITY_FAILURE = 'Der Status von "%s" konnte nicht überprüft werden, da keine Internetverbindung besteht! Ping-Fenster öffnen?' + #13#10#13#10 + 'Monitor-URL: %s';
LNG_ALERT_SERVER_DOWN = 'Es konnte keine Verbindung zum Status-Monitor "%s" hergestellt werden, OBWOHL eine Internetverbindung besteht! Ping-Fenster öffnen?' + #13#10#13#10 + 'Monitor-URL: %s';
LNG_MONITOR_NEW = 'New status monitor';
LNG_MONITOR_EDIT = 'Edit status monitor';
LNG_LAST_CHECK = 'Last check: %s';
LNG_LAST_CHECK_UNKNOWN = 'Unknown';
 
const
REG_VAL_LOOP_TIMER_INTERVAL = 'LoopTimerInterval';
REG_VAL_INIT_TIMER_INTERVAL = 'InitTimerInterval';
REG_VAL_WARN_AT_CONNFAILURE = 'WarnAtConnectivityFailure';
REG_VAL_URL = 'URL';
REG_KEY_SETTINGS = '\Software\ViaThinkSoft\StatusMon\3.0\Settings\';
REG_KEY_SERVICE = '\Software\ViaThinkSoft\StatusMon\3.0\Services\%s\';
REG_KEY_SERVICES = '\Software\ViaThinkSoft\StatusMon\3.0\Services\';
 
implementation
 
end.
/trunk/StatusMon 3.0/StatusMonManifest.RES
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/Main.ddp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/StatusMon 3.0/StatusMon.cfg
0,0 → 1,38
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"C:\Dokumente und Einstellungen\Solar del Sol\Eigene Dateien\Borland Studio-Projekte\Bpl"
-LN"C:\Dokumente und Einstellungen\Solar del Sol\Eigene Dateien\Borland Studio-Projekte\Bpl"
-w-UNSAFE_TYPE
-w-UNSAFE_CODE
-w-UNSAFE_CAST
/trunk/StatusMon 3.0/StatusMon.dof
0,0 → 1,87
[FileVersion]
Version=6.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1031
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
/trunk/StatusMon 3.0/NoDoubleStart.pas
0,0 → 1,25
unit NoDoubleStart;
 
interface
 
implementation
 
uses
Windows, SysUtils, Forms;
 
var
mHandle: THandle;
 
Initialization
mHandle := CreateMutex(nil, True, 'ViaThinkSoft-StatusMon');
if GetLastError = ERROR_ALREADY_EXISTS then
begin
Halt;
end;
 
finalization
if mHandle <> 0 then
begin
CloseHandle(mHandle)
end;
end.
/trunk/StatusMon 3.0/ServiceEdit.dfm
0,0 → 1,65
object EditForm: TEditForm
Left = 347
Top = 240
BorderStyle = bsDialog
ClientHeight = 161
ClientWidth = 342
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 16
Width = 98
Height = 13
Caption = 'Statusmonitor-Name:'
end
object Label2: TLabel
Left = 16
Top = 64
Width = 92
Height = 13
Caption = 'Statusmonitor-URL:'
end
object Edit1: TEdit
Left = 16
Top = 32
Width = 305
Height = 21
TabOrder = 0
end
object Edit2: TEdit
Left = 16
Top = 80
Width = 305
Height = 21
TabOrder = 1
end
object Button1: TButton
Left = 216
Top = 120
Width = 105
Height = 25
Caption = 'OK'
Default = True
TabOrder = 2
OnClick = Button1Click
end
object Button2: TButton
Left = 16
Top = 120
Width = 105
Height = 25
Cancel = True
Caption = 'Cancel'
TabOrder = 3
OnClick = Button2Click
end
end