/trunk/main.dfm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/name.pas |
---|
File deleted |
/trunk/texteditor.dfm |
---|
File deleted |
/trunk/StackMan.dof |
---|
File deleted |
/trunk/texteditor.pas |
---|
File deleted |
/trunk/StackMan.dpr |
---|
File deleted |
/trunk/StackMan.iss |
---|
File deleted |
/trunk/StackMan.bdsproj |
---|
File deleted |
/trunk/name.dfm |
---|
File deleted |
/trunk/about.PAS |
---|
File deleted |
/trunk/clean.bat |
---|
File deleted |
/trunk/global.pas |
---|
File deleted |
/trunk/Res/External.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/root.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/text.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/Rename.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/exit.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/gr_delphi_tholos_600.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/journal.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/folder.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/remove.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/Refresh.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/appender.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/unknown.BMP |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/Res/Open.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/about.dfm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/categories.dfm |
---|
File deleted |
/trunk/journal.PAS |
---|
File deleted |
/trunk/categories.pas |
---|
File deleted |
/trunk/main.PAS |
---|
File deleted |
/trunk/Output/setup.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/publish.bat |
---|
File deleted |
/trunk/appender.pas |
---|
File deleted |
/trunk/appender.dfm |
---|
File deleted |
/trunk/StackMan.res |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/StackMan.cfg |
---|
File deleted |
/trunk/journal.dfm |
---|
File deleted |
/trunk/Delphi/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/Delphi/Res/External.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/Delphi/Res/Open.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/Delphi/Res/Refresh.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/Delphi/Res/Rename.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/Delphi/Res/appender.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/Delphi/Res/exit.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/Delphi/Res/folder.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/Delphi/Res/gr_delphi_tholos_600.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/Delphi/Res/journal.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/Delphi/Res/remove.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/Delphi/Res/root.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/Delphi/Res/text.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/Delphi/Res/unknown.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/Delphi/StackMan.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">{7D27C417-84DB-4252-8E7A-9DEA11BDDB02}</Option> |
</Option> |
</PersonalityInfo> |
<Delphi.Personality> |
<Source> |
<Source Name="MainSource">StackMan.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">False</VersionInfo> |
<VersionInfo Name="MajorVer">5</VersionInfo> |
<VersionInfo Name="MinorVer">0</VersionInfo> |
<VersionInfo Name="Release">0</VersionInfo> |
<VersionInfo Name="Build">0</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">Textfile appender and stroker</VersionInfoKeys> |
<VersionInfoKeys Name="FileVersion">5.0.0.0</VersionInfoKeys> |
<VersionInfoKeys Name="InternalName">STACKMAN</VersionInfoKeys> |
<VersionInfoKeys Name="LegalCopyright">© Copyright 2009 ViaThinkSoft</VersionInfoKeys> |
<VersionInfoKeys Name="LegalTrademarks">Keine</VersionInfoKeys> |
<VersionInfoKeys Name="OriginalFilename">StackMan.exe</VersionInfoKeys> |
<VersionInfoKeys Name="ProductName">ViaThinkSoft Stack Manager</VersionInfoKeys> |
<VersionInfoKeys Name="ProductVersion">5.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/Delphi/StackMan.cfg |
---|
0,0 → 1,35 |
-$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:\programme\borland\delphi6\Projects\Bpl" |
-LN"c:\programme\borland\delphi6\Projects\Bpl" |
/trunk/Delphi/StackMan.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=vcl;rtl;vclx;VclSmp;vclshlctrls |
Conditionals= |
DebugSourceDirs= |
UsePackages=0 |
[Parameters] |
RunParams= |
HostApplication= |
Launcher= |
UseLauncher=0 |
DebugCWD= |
[Version Info] |
IncludeVerInfo=1 |
AutoIncBuild=0 |
MajorVer=5 |
MinorVer=1 |
Release=0 |
Build=0 |
Debug=0 |
PreRelease=0 |
Special=0 |
Private=0 |
DLL=0 |
Locale=1031 |
CodePage=1252 |
[Version Info Keys] |
CompanyName=ViaThinkSoft |
FileDescription=Textfile appender and stroker |
FileVersion=5.1.0.0 |
InternalName=STACKMAN |
LegalCopyright=© Copyright 2009 - 2010 ViaThinkSoft |
LegalTrademarks=Keine |
OriginalFilename=StackMan.exe |
ProductName=ViaThinkSoft Stack Manager |
ProductVersion=5.1.0.0 |
Webseite=www.viathinksoft.de |
Projektleiter=Daniel Marschall - www.daniel-marschall.de |
[HistoryLists\hlUnitAliases] |
Count=1 |
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
/trunk/Delphi/StackMan.dpr |
---|
0,0 → 1,23 |
program StackMan; |
uses |
Forms, |
main in 'MAIN.PAS' {MainForm}, |
appender in 'appender.pas' {MDIAppender}, |
texteditor in 'texteditor.pas' {MDITexteditor}, |
about in 'ABOUT.PAS' {AboutBox}, |
categories in 'categories.pas' {MDICategories}, |
name in 'NAME.PAS' {NameDlg}, |
global in 'global.pas', |
journal in 'JOURNAL.PAS' {MDIJournalForm}; |
{$R *.RES} |
begin |
Application.Initialize; |
Application.Title := 'ViaThinkSoft Stack Manager'; |
Application.CreateForm(TMainForm, MainForm); |
Application.CreateForm(TAboutBox, AboutBox); |
Application.CreateForm(TNameDlg, NameDlg); |
Application.Run; |
end. |
/trunk/Delphi/StackMan.iss |
---|
0,0 → 1,63 |
; StackMan Setup Script for InnoSetup |
; by Daniel Marschall |
; http://www.daniel-marschall.de/ |
; ToDo: |
; - For all users or only for me |
; - Entry in quick launch |
[Setup] |
AppName=StackManager |
AppVerName=StackManager 5.1 |
AppVersion=5.1 |
AppCopyright=© Copyright 2009 - 2010 ViaThinkSoft. |
AppPublisher=ViaThinkSoft |
AppPublisherURL=http://www.viathinksoft.de/ |
AppSupportURL=http://www.daniel-marschall.de/ |
AppUpdatesURL=http://www.viathinksoft.de/ |
DefaultDirName={pf}\Stack Manager |
DefaultGroupName=Stack Manager |
VersionInfoCompany=ViaThinkSoft |
VersionInfoCopyright=© Copyright 2009 - 2010 ViaThinkSoft. |
VersionInfoDescription=Stack Manager Setup |
VersionInfoTextVersion=1.0.0.0 |
VersionInfoVersion=5.1 |
Compression=zip/9 |
[Languages] |
Name: de; MessagesFile: "compiler:Languages\German.isl" |
[LangOptions] |
LanguageName=Deutsch |
LanguageID=$0407 |
[Tasks] |
Name: "desktopicon"; Description: "Erstelle eine Verknüpfung auf dem &Desktop"; GroupDescription: "Programmverknüpfungen:"; MinVersion: 4,4 |
[Files] |
Source: "StackMan.exe"; DestDir: "{app}"; Flags: ignoreversion |
[Icons] |
Name: "{group}\Webseiten\ViaThinkSoft"; Filename: "http://www.viathinksoft.de/" |
Name: "{group}\Stack Manager"; Filename: "{app}\StackMan.exe" |
Name: "{group}\Stack Manager deinstallieren"; Filename: "{uninstallexe}" |
Name: "{userdesktop}\Stack Manager"; Filename: "{app}\StackMan.exe"; MinVersion: 4,4; Tasks: desktopicon |
[Run] |
Filename: "{app}\StackMan.exe"; Description: "Stack Manager starten"; Flags: nowait postinstall skipifsilent |
[Code] |
function InitializeSetup(): Boolean; |
begin |
if CheckForMutexes('StackManSetup')=false then |
begin |
Createmutex('StackManSetup'); |
Result := true; |
end |
else |
begin |
Result := False; |
end; |
end; |
/trunk/Delphi/StackMan.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/Delphi/about.PAS |
---|
0,0 → 1,38 |
unit about; |
interface |
uses |
Windows, Classes, Graphics, Forms, Controls, StdCtrls, Buttons, ExtCtrls, |
jpeg; |
type |
TAboutBox = class(TForm) |
Panel1: TPanel; |
OKButton: TButton; |
ProgramIcon: TImage; |
ProductName: TLabel; |
Version: TLabel; |
Copyright: TLabel; |
Comments: TLabel; |
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); |
end; |
var |
AboutBox: TAboutBox; |
implementation |
{$R *.dfm} |
procedure TAboutBox.FormKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
begin |
if Key = VK_ESCAPE then |
begin |
Close; |
end; |
end; |
end. |
/trunk/Delphi/about.dfm |
---|
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/Delphi/appender.dfm |
---|
0,0 → 1,133 |
object MDIAppender: TMDIAppender |
Left = 215 |
Top = 137 |
Width = 361 |
Height = 199 |
Color = clBtnFace |
ParentFont = True |
FormStyle = fsMDIChild |
Menu = MainMenu |
OldCreateOrder = False |
Position = poDefault |
Visible = True |
OnClose = FormClose |
OnCloseQuery = FormCloseQuery |
OnCreate = FormCreate |
OnShow = FormShow |
PixelsPerInch = 96 |
TextHeight = 13 |
object VSplitter: TSplitter |
Left = 0 |
Top = 94 |
Width = 353 |
Height = 2 |
Cursor = crVSplit |
Align = alBottom |
end |
object topPanel: TPanel |
Left = 0 |
Top = 0 |
Width = 353 |
Height = 94 |
Align = alClient |
BevelOuter = bvNone |
TabOrder = 0 |
object CheckListBox1: TCheckListBox |
Left = 0 |
Top = 0 |
Width = 353 |
Height = 94 |
Align = alClient |
ItemHeight = 13 |
TabOrder = 0 |
OnClick = CheckListBox1Click |
OnDrawItem = CheckListBox1DrawItem |
OnKeyPress = CheckListBox1KeyPress |
OnMeasureItem = CheckListBox1MeasureItem |
end |
end |
object bottomPanel: TPanel |
Left = 0 |
Top = 96 |
Width = 353 |
Height = 57 |
Align = alBottom |
BevelOuter = bvNone |
TabOrder = 1 |
object newLineEdt: TMemo |
Left = 0 |
Top = 0 |
Width = 353 |
Height = 57 |
Align = alClient |
ScrollBars = ssVertical |
TabOrder = 0 |
WantReturns = False |
WantTabs = True |
OnChange = newLineEdtChange |
OnKeyDown = newLineEdtKeyDown |
end |
end |
object MainMenu: TMainMenu |
Images = MainForm.ImageList2 |
Left = 8 |
Top = 8 |
object Document1: TMenuItem |
Caption = '&Datensatz' |
GroupIndex = 5 |
object Stroke: TMenuItem |
Caption = 'Gew'#228'hlte Eintr'#228'ge &ausstreichen...' |
GroupIndex = 1 |
ImageIndex = 23 |
ShortCut = 46 |
OnClick = StrokeClick |
end |
object Neuladen1: TMenuItem |
Caption = 'Streichliste &neu laden' |
GroupIndex = 1 |
ImageIndex = 19 |
ShortCut = 116 |
OnClick = Neuladen1Click |
end |
object N2: TMenuItem |
Caption = '-' |
GroupIndex = 1 |
end |
object Save: TMenuItem |
Caption = 'Eintragung &ablegen' |
GroupIndex = 1 |
ImageIndex = 8 |
OnClick = SaveClick |
end |
object N3: TMenuItem |
Caption = '-' |
GroupIndex = 1 |
end |
object ExternalOpen: TMenuItem |
Caption = 'Mit &externem Programm '#246'ffnen' |
GroupIndex = 1 |
ImageIndex = 22 |
ShortCut = 121 |
OnClick = ExternalOpenClick |
end |
object Delete: TMenuItem |
Caption = 'Datensatz &l'#246'schen...' |
GroupIndex = 1 |
ImageIndex = 5 |
ShortCut = 16392 |
OnClick = DeleteClick |
end |
object N4: TMenuItem |
Caption = '-' |
GroupIndex = 1 |
end |
object DocumentClose1: TMenuItem |
Caption = '&Schlie'#223'en' |
GroupIndex = 1 |
ImageIndex = 20 |
ShortCut = 27 |
OnClick = DocumentClose1Click |
end |
end |
end |
end |
/trunk/Delphi/appender.pas |
---|
0,0 → 1,434 |
unit appender; |
interface |
uses |
SysUtils, Windows, Classes, Graphics, Forms, Controls, StdCtrls, ExtCtrls, |
Dialogs, Menus, ImgList, ShellAPI, CheckLst; |
type |
TMDIAppender = class(TForm) |
newLineEdt: TMemo; |
MainMenu: TMainMenu; |
Document1: TMenuItem; |
Save: TMenuItem; |
ExternalOpen: TMenuItem; |
DocumentClose1: TMenuItem; |
N2: TMenuItem; |
Delete: TMenuItem; |
N3: TMenuItem; |
bottomPanel: TPanel; |
topPanel: TPanel; |
CheckListBox1: TCheckListBox; |
Neuladen1: TMenuItem; |
Stroke: TMenuItem; |
N4: TMenuItem; |
VSplitter: TSplitter; |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure FormShow(Sender: TObject); |
procedure ExternalOpenClick(Sender: TObject); |
procedure DocumentClose1Click(Sender: TObject); |
procedure SaveClick(Sender: TObject); |
procedure newLineEdtKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
procedure DeleteClick(Sender: TObject); |
procedure FormCreate(Sender: TObject); |
procedure CheckListBox1DrawItem(Control: TWinControl; |
Index: Integer; Rect: TRect; State: TOwnerDrawState); |
procedure CheckListBox1MeasureItem(Control: TWinControl; |
Index: Integer; var Height: Integer); |
procedure StrokeClick(Sender: TObject); |
procedure Neuladen1Click(Sender: TObject); |
procedure CheckListBox1Click(Sender: TObject); |
procedure newLineEdtChange(Sender: TObject); |
procedure CheckListBox1KeyPress(Sender: TObject; var Key: Char); |
protected |
function DoAppend: boolean; |
function DoStroke: boolean; |
procedure RefreshList; |
private |
fcat: string; |
fprefix: string; |
procedure ExtendedUpdateCaption; |
function StrokeCount: integer; |
public |
property folder: string read fprefix; |
property cat: string read fcat; |
constructor Create(AOwner: TComponent; Folder, Category: string); reintroduce; |
end; |
implementation |
{$R *.dfm} |
uses |
main, categories, global; |
constructor TMDIAppender.Create(AOwner: TComponent; Folder, Category: string); |
begin |
inherited Create(AOwner); |
fcat := category; |
fprefix := MyAddTrailingPathDelimiter(folder); |
end; |
procedure TMDIAppender.FormClose(Sender: TObject; var Action: TCloseAction); |
begin |
Action := caFree; |
end; |
function TMDIAppender.DoStroke: boolean; |
var |
i: integer; |
begin |
AddToJournal(Format(lng_jnl_stroke_from, [folder + cat])); |
result := true; |
// TODO: Downto für den Benutzer nicht ganz nachvollziehbar. Aber wichtig für das Löschen. |
for i := CheckListBox1.Items.Count - 1 downto 0 do |
begin |
if CheckListBox1.Checked[i] then |
begin |
try |
AddToJournal(Format('- %s', [CheckListBox1.Items.Strings[i]])); |
StrokeFromFile(getAppenderFileName(folder, cat), i, CheckListBox1.Items.Strings[i]); |
CheckListBox1.Items.Delete(i); |
except |
on E : EStrokeMismatch do |
begin |
result := false; |
ShowMessage(lng_stroke_mismatch); |
CheckListBox1.ItemIndex := i; |
break; exit; |
end; |
(* on E : EStrokeUnknown do |
begin |
result := false; |
ShowMessage(lng_stroke_error); |
CheckListBox1.ItemIndex := i; |
break; exit; |
end; *) |
else |
begin |
result := false; |
ShowMessage(lng_stroke_error); |
CheckListBox1.ItemIndex := i; |
break; exit; |
end; |
end; |
end; |
end; |
Stroke.Enabled := false; |
ExtendedUpdateCaption; |
end; |
function TMDIAppender.DoAppend: boolean; |
var |
f: TextFile; |
i: integer; |
begin |
AddToJournal(Format(lng_jnl_add_to, [folder + cat])); |
result := true; |
try |
AssignFile(f, getAppenderFileName(folder, cat)); |
try |
Append(f); |
if (newLineEdt.Lines.Count = 0) and (CfgAppenderAllowEmptyLines) then |
begin |
CheckListBox1.Items.Add(newLineEdt.Text{ = ''}); |
AddToJournal(Format('+ %s', [newLineEdt.Lines.Text])); |
WriteLn(f, newLineEdt.Lines.Text); |
end |
else |
begin |
for i := 0 to newLineEdt.Lines.Count - 1 do |
begin |
if ((newLineEdt.Lines.Strings[i] = '') and CfgAppenderAllowEmptyLines) or |
(newLineEdt.Lines.Strings[i] <> '') then |
begin |
CheckListBox1.Items.Add(newLineEdt.Lines.Strings[i]); |
AddToJournal(Format('+ %s', [newLineEdt.Lines.Strings[i]])); |
WriteLn(f, newLineEdt.Lines.Strings[i]); |
end; |
end; |
end; |
finally |
CloseFile(f); |
end; |
except |
result := false; |
ShowMessage(lng_error); |
end; |
CheckListBox1.TopIndex := CheckListBox1.Items.Count - 1; // Nach unten scrollen |
end; |
procedure TMDIAppender.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
var |
userResponse: integer; |
begin |
if strokecount > 0 then |
begin |
userResponse := MessageDlg(Format(lng_strokefirst, [strokecount, cat]), |
mtConfirmation, mbYesNoCancel, 0); |
case userResponse of |
idYes: CanClose := DoStroke; |
idNo: CanClose := true; |
idCancel: begin |
CanClose := false; |
exit; |
end; |
end; |
end; |
if newLineEdt.Text = '' then |
begin |
CanClose := true; |
exit; |
end |
else |
begin |
BringToFront; |
WindowState := wsNormal; |
userResponse := MessageDlg(Format(lng_appendfirst, [folder + cat]), |
mtConfirmation, mbYesNoCancel, 0); |
case userResponse of |
idYes: CanClose := DoAppend; |
idNo: CanClose := true; |
idCancel: begin |
CanClose := false; |
exit; |
end; |
end; |
end; |
end; |
procedure TMDIAppender.FormShow(Sender: TObject); |
begin |
Caption := Format(lng_editor_title, [folder + cat]); |
newLineEdt.Clear; |
RefreshList; |
Save.Enabled := false; |
ExtendedUpdateCaption; |
newLineEdt.SetFocus; |
end; |
procedure TMDIAppender.ExternalOpenClick(Sender: TObject); |
var |
fn: string; |
begin |
fn := getAppenderFileName(folder, cat); |
commonExternalOpen(fn); |
end; |
procedure TMDIAppender.DocumentClose1Click(Sender: TObject); |
begin |
Close; |
end; |
procedure TMDIAppender.SaveClick(Sender: TObject); |
begin |
if DoAppend then |
begin |
newLineEdt.Clear; |
Save.Enabled := false; |
ExtendedUpdateCaption; |
end; |
end; |
procedure TMDIAppender.newLineEdtKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
begin |
if (Key = VK_RETURN) then |
begin |
Key := 0; |
if CfgAppenderAllowEmptyLines and (newLineEdt.Text = '') then |
begin |
Save.Enabled := true; |
end; |
Save.Click; |
end; |
end; |
procedure TMDIAppender.DeleteClick(Sender: TObject); |
var |
fn: string; |
i: integer; |
begin |
fn := getAppenderFileName(folder, cat); |
if commonDelete(fn) then |
begin |
Close; |
// TODO: Eigentlich sollte das innerhalb von commonDelete() stattfinden |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
TMDICategories(Screen.Forms[i]).DeleteNode(folder, cat); |
end |
end; |
end; |
end; |
procedure TMDIAppender.FormCreate(Sender: TObject); |
begin |
CheckListBox1.Style := lbOwnerDrawVariable; |
CheckListBox1.Clear; |
Stroke.Enabled := false; |
ExtendedUpdateCaption; |
newLineEdt.Clear; |
end; |
procedure TMDIAppender.RefreshList; |
begin |
CheckListBox1.Items.Clear; |
CheckListBox1.Items.LoadFromFile(getAppenderFileName(folder, cat)); |
CheckListBox1.TopIndex := CheckListBox1.Items.Count-1; // Nach unten scrollen |
end; |
function TransformDrawingText(s: string): string; |
begin |
result := StringReplace(s, #9, ' ', [rfReplaceAll]); // TODO: gilt nicht für w95... |
end; |
// http://www.delphipraxis.net/post1068742.html#1068742 |
// Bugfix: Invalidate |
// Bugfix: Leere Zeilen |
procedure TMDIAppender.CheckListBox1DrawItem(Control: TWinControl; |
Index: Integer; Rect: TRect; State: TOwnerDrawState); |
begin |
with CheckListbox1.Canvas do |
begin |
FillRect(Rect); |
DrawText(Handle, PChar(TransformDrawingText(CheckListBox1.Items[Index])), -1, Rect, DT_LEFT or DT_TOP or DT_WORDBREAK); |
Invalidate; |
end; |
end; |
procedure TMDIAppender.CheckListBox1KeyPress(Sender: TObject; var Key: Char); |
begin |
CheckListBox1Click(self); // z.B. wenn man die Leertaste drückt |
end; |
procedure TMDIAppender.CheckListBox1MeasureItem(Control: TWinControl; |
Index: Integer; var Height: Integer); |
var |
tempCanvas: TCanvas; |
notUsed: HWND; |
destRect: TRect; |
txt: PChar; |
begin |
tempCanvas := TCanvas.Create; |
try |
tempCanvas.Handle := GetDeviceContext(notUsed); |
destRect := CheckListBox1.ClientRect; |
if CheckListBox1.Items[Index] = '' then |
txt := ' ' |
else |
txt := PChar(TransformDrawingText(CheckListBox1.Items[Index])); |
Height := DrawText(tempCanvas.Handle, txt, -1, destRect, DT_WORDBREAK); |
finally |
tempCanvas.Free; |
end; |
end; |
procedure TMDIAppender.StrokeClick(Sender: TObject); |
var |
userResponse: integer; |
begin |
userResponse := MessageDlg(Format(lng_stroker_really, [StrokeCount]), mtConfirmation, mbYesNoCancel, 0); |
if userResponse = idYes then |
begin |
DoStroke; |
end; |
end; |
function TMDIAppender.StrokeCount: integer; |
var |
i: integer; |
begin |
result := 0; |
for i := 0 to CheckListBox1.Count - 1 do |
begin |
if CheckListBox1.Checked[i] then |
begin |
inc(result); |
end; |
end; |
end; |
procedure TMDIAppender.Neuladen1Click(Sender: TObject); |
var |
userResponse: integer; |
begin |
userResponse := 0; |
if stroke.Enabled then |
begin |
userResponse := MessageDlg(Format(lng_refresh_strokes_loss, [StrokeCount]), mtWarning, mbYesNoCancel, 0); |
end; |
if (not stroke.Enabled) or (userResponse = idYes) then |
begin |
CheckListBox1.Visible := false; |
RefreshList; |
CheckListBox1.Visible := true; |
end; |
end; |
procedure TMDIAppender.CheckListBox1Click(Sender: TObject); |
var |
i: integer; |
begin |
Stroke.Enabled := false; |
for i := 0 to CheckListBox1.Count - 1 do |
begin |
if CheckListBox1.Checked[i] then |
begin |
Stroke.Enabled := true; |
break; |
end; |
end; |
ExtendedUpdateCaption; |
end; |
procedure TMDIAppender.newLineEdtChange(Sender: TObject); |
begin |
Save.Enabled := newLineEdt.Text <> ''; |
ExtendedUpdateCaption; |
end; |
procedure TMDIAppender.ExtendedUpdateCaption; |
var |
changed: boolean; |
capname: string; |
begin |
changed := Save.Enabled or Stroke.Enabled; |
capname := Format(lng_editor_title, [folder + cat]); |
if changed then capname := capname + ' *'; |
if Caption <> capname then Caption := capname; // Kein Aufblitzen |
end; |
end. |
/trunk/Delphi/categories.dfm |
---|
0,0 → 1,537 |
object MDICategories: TMDICategories |
Left = 546 |
Top = 219 |
Width = 290 |
Height = 259 |
Caption = 'Datens'#228'tze' |
Color = clBtnFace |
ParentFont = True |
FormStyle = fsMDIChild |
Menu = MainMenu1 |
OldCreateOrder = False |
Position = poDefault |
Visible = True |
OnClose = FormClose |
OnShow = FormShow |
PixelsPerInch = 96 |
TextHeight = 13 |
object TreeView1: TTreeView |
Left = 0 |
Top = 0 |
Width = 282 |
Height = 213 |
Align = alClient |
Images = ImageList1 |
Indent = 22 |
PopupMenu = PopupMenu1 |
ReadOnly = True |
RightClickSelect = True |
SortType = stBoth |
TabOrder = 0 |
OnChange = TreeView1Change |
OnDblClick = TreeView1DblClick |
OnKeyDown = TreeView1KeyDown |
OnKeyPress = TreeView1KeyPress |
end |
object ImageList1: TImageList |
Left = 8 |
Top = 8 |
Bitmap = { |
494C010105000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 |
0000000000003600000028000000400000003000000001002000000000000030 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000FFFF0000FFFF00000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000FFFF0000FFFF00000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000FFFF0000FFFF0000FF |
FF00000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000FFFF0000FFFF000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
000000000000FF000000FF000000FF000000FF000000FF000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF0000000000FF000000FF000000FF000000FF00 |
0000FF000000FF000000BFBFBF0000000000BFBFBF00FF000000FF000000FF00 |
0000FF000000FF000000FF000000000000000000000000000000000000000000 |
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00000000000000000000000000000000000000000000000000000000000000 |
000000000000FFFFFF0000000000FFFFFF000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000BFBFBF00BFBF |
BF00BFBFBF00BFBFBF00000000007F7F7F0000000000BFBFBF00BFBFBF00BFBF |
BF00BFBFBF000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF |
FF0000000000000000000000000000000000000000000000000000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF00000000007F7F |
7F007F7F7F0000000000FFFFFF007F7F7F00FFFFFF00000000007F7F7F007F7F |
7F0000000000FFFFFF0000000000000000000000000000000000000000000000 |
0000000000000000000000000000FFFFFF000000000000000000FFFFFF000000 |
00000000000000000000FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF000000000000000000000000000000 |
00000000000000000000FFFFFF00000000007F7F7F0000000000FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF007F7F7F00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00000000007F7F7F00000000000000000000000000000000000000 |
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF00000000000000000000000000000000000000000000000000FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF00000000007F7F7F0000000000FFFFFF00FFFF |
FF00FFFFFF0000FFFF000000FF000000FF00FFFFFF0000FFFF00FFFFFF00FFFF |
FF00FFFFFF00000000007F7F7F00000000000000000000000000000000000000 |
FF00000000000000000000000000FFFFFF0000000000BFBFBF00000000000000 |
0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF000000000000000000000000000000 |
00000000000000000000FFFFFF00000000000000000000000000FFFFFF00FFFF |
FF0000FFFF00FFFFFF000000FF000000FF0000FFFF00FFFFFF0000FFFF00FFFF |
FF00FFFFFF000000000000000000000000000000000000000000000000000000 |
FF000000FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 |
0000FFFFFF00000000000000000000000000000000000000000000000000FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00FFFFFF00FFFFFF00FFFFFF0000000000000000007F7F7F000000000000FF |
FF00FFFFFF0000FFFF00FFFFFF007F7F7F00FFFFFF0000FFFF00FFFFFF0000FF |
FF00000000007F7F7F000000000000000000000000000000FF000000FF000000 |
FF000000FF000000FF0000000000FFFFFF000000000000000000FFFFFF000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00000000000000000000000000FFFF |
FF00FFFFFF00FFFFFF00FFFFFF0000000000000000007F7F7F0000000000FFFF |
FF0000FFFF00FFFFFF000000FF00BFBFBF0000FFFF00FFFFFF0000FFFF00FFFF |
FF00000000007F7F7F000000000000000000000000000000FF000000FF000000 |
FF000000FF000000FF000000FF0000000000FFFFFF00FFFFFF00FFFFFF000000 |
0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 |
0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF |
FF000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00000000000000000000000000000000000000000000FFFF000000000000FF |
FF00FFFFFF0000FFFF000000FF000000FF000000000000FFFF00FFFFFF0000FF |
FF0000000000000000000000000000000000000000000000FF000000FF000000 |
FF000000FF000000FF000000FF000000FF0000000000BFBFBF00FFFFFF000000 |
0000FFFFFF000000000000000000000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 |
00000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFFFF00FFFF |
FF0000000000FFFFFF00000000000000000000000000FFFFFF0000FFFF000000 |
0000000000000000000000FFFF000000FF000000FF0000000000000000000000 |
000000FFFF00000000000000000000000000000000000000FF000000FF000000 |
FF000000FF000000FF000000FF0000000000FFFFFF00FFFFFF00FFFFFF000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFFFF000000 |
00000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF |
FF00000000000000000000000000000000000000000000FFFF00FFFFFF0000FF |
FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000FF000000FF00FFFFFF0000FF |
FF00FFFFFF00000000000000000000000000000000000000FF000000FF000000 |
FF000000FF000000FF0000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 |
00000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF0000000000FFFFFF0000000000000000000000000000000000000000000000 |
00000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF |
FF000000FF000000FF0000FFFF00FFFFFF000000FF000000FF0000FFFF00FFFF |
FF0000FFFF000000000000000000000000000000000000000000000000000000 |
FF000000FF000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000000000000000000000000000000000FFFFFF0000000000FFFF |
FF00000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000FFFFFF0000FF |
FF000000FF000000FF00FFFFFF0000FFFF000000FF000000FF00FFFFFF0000FF |
FF00000000000000000000000000000000000000000000000000000000000000 |
FF00000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000000000000000000000000000000000FFFFFF00000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
000000000000000000000000000000000000000000000000000000000000FFFF |
FF0000FFFF000000FF000000FF000000FF000000FF00FFFFFF0000FFFF000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000 |
000000000000000000000000000000000000424D3E000000000000003E000000 |
2800000040000000300000000100010000000000800100000000000000000000 |
000000000000000000000000FFFFFF0000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
0000000000000000000000000000000000000000000000000000000000000000 |
00000000000000000000000000000000BFFF000000000000BFFF000000000000 |
B049000000000000807F000000000000B07F000000000000B9FF000000000000 |
BFFF000000000000B049000000000000807F000000000000B07F000000000000 |
B9FF000000000000BFFF000000000000048F00000000000007FF000000000000 |
07FF0000000000009FFF000000000000FFFFFFFFFC00F83FFC00E007F0000001 |
FC00E007C0000001FC00E00700000001FC00E00700000001EC00E00700000001 |
E400E00700008003E000E007000080030000E007000080030001E00700008007 |
0003E007000180070007E00F00038007000FE01F00078007E3FFE03F001FC00F |
E7FFFFFF007FE01FEFFFFFFF01FFF03F00000000000000000000000000000000 |
000000000000} |
end |
object MainMenu1: TMainMenu |
Images = MainForm.ImageList2 |
Left = 40 |
Top = 8 |
object Kategorie1: TMenuItem |
Caption = '&Kategorie' |
GroupIndex = 5 |
object EditorOpen: TMenuItem |
Caption = '&'#214'ffnen' |
Enabled = False |
ImageIndex = 21 |
OnClick = EditorOpenClick |
end |
object ExternalOpen: TMenuItem |
Caption = 'Mit &externem Programm '#246'ffnen' |
Enabled = False |
ImageIndex = 22 |
ShortCut = 121 |
OnClick = ExternalOpenClick |
end |
object N2: TMenuItem |
Caption = '-' |
end |
object KategorieUmbenennen1: TMenuItem |
Caption = '&Umbenennen...' |
Enabled = False |
ImageIndex = 18 |
ShortCut = 16469 |
OnClick = KategorieUmbenennen1Click |
end |
object KategorieDelete1: TMenuItem |
Caption = '&L'#246'schen...' |
Enabled = False |
ImageIndex = 5 |
ShortCut = 46 |
OnClick = KategorieDelete1Click |
end |
object N4: TMenuItem |
Caption = '-' |
end |
object KategorieRefresh1: TMenuItem |
Caption = 'Liste neu laden' |
ImageIndex = 19 |
ShortCut = 116 |
OnClick = KategorieRefresh1Click |
end |
object KategorieClose1: TMenuItem |
Caption = '&Schlie'#223'en' |
ImageIndex = 20 |
ShortCut = 27 |
OnClick = KategorieClose1Click |
end |
end |
end |
object PopupMenu1: TPopupMenu |
OnPopup = PopupMenu1Popup |
Left = 72 |
Top = 8 |
object PNeu: TMenuItem |
Caption = '&Neu...' |
Enabled = False |
OnClick = PNeuClick |
end |
object N1: TMenuItem |
Caption = '-' |
end |
object PEditor: TMenuItem |
Caption = '&'#214'ffnen' |
Default = True |
Enabled = False |
ImageIndex = 10 |
OnClick = EditorOpenClick |
end |
object PExternal: TMenuItem |
Caption = 'Mit &externem Programm '#246'ffnen' |
Enabled = False |
ImageIndex = 9 |
OnClick = ExternalOpenClick |
end |
object N5: TMenuItem |
Caption = '-' |
end |
object PUmbenennen: TMenuItem |
Caption = '&Umbenennen...' |
Enabled = False |
OnClick = KategorieUmbenennen1Click |
end |
object PDelete: TMenuItem |
Caption = '&L'#246'schen...' |
Enabled = False |
ImageIndex = 5 |
OnClick = KategorieDelete1Click |
end |
end |
end |
/trunk/Delphi/categories.pas |
---|
0,0 → 1,518 |
unit categories; |
interface |
uses |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
Dialogs, StdCtrls, ComCtrls, ImgList, Menus, ShellAPI, global; |
type |
TMDICategories = class(TForm) |
ImageList1: TImageList; |
MainMenu1: TMainMenu; |
Kategorie1: TMenuItem; |
KategorieDelete1: TMenuItem; |
EditorOpen: TMenuItem; |
N2: TMenuItem; |
KategorieRefresh1: TMenuItem; |
KategorieClose1: TMenuItem; |
PopupMenu1: TPopupMenu; |
PEditor: TMenuItem; |
PDelete: TMenuItem; |
PExternal: TMenuItem; |
N4: TMenuItem; |
ExternalOpen: TMenuItem; |
N5: TMenuItem; |
PUmbenennen: TMenuItem; |
KategorieUmbenennen1: TMenuItem; |
TreeView1: TTreeView; |
PNeu: TMenuItem; |
N1: TMenuItem; |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure FormShow(Sender: TObject); |
procedure TreeView1DblClick(Sender: TObject); |
procedure TreeView1KeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
procedure KategorieDelete1Click(Sender: TObject); |
procedure EditorOpenClick(Sender: TObject); |
procedure KategorieClose1Click(Sender: TObject); |
procedure KategorieRefresh1Click(Sender: TObject); |
procedure ExternalOpenClick(Sender: TObject); |
procedure PopupMenu1Popup(Sender: TObject); |
procedure KategorieUmbenennen1Click(Sender: TObject); |
procedure TreeView1Change(Sender: TObject; Node: TTreeNode); |
procedure PNeuClick(Sender: TObject); |
procedure TreeView1KeyPress(Sender: TObject; var Key: Char); |
private |
procedure recursiveItemListing(folder: string; parentnode: TTreeNode); |
public |
procedure DeleteNode(folder, cat: string); |
procedure InsertNode(folder, cat: string; em: TAMode); |
procedure RefreshList; |
procedure DoNew; |
end; |
var |
MDICategories: TMDICategories; |
implementation |
{$R *.dfm} |
uses |
main; |
procedure TMDICategories.FormClose(Sender: TObject; var Action: TCloseAction); |
begin |
Action := caFree; |
end; |
procedure TMDICategories.FormShow(Sender: TObject); |
begin |
RefreshList; |
TreeView1.SetFocus; |
end; |
procedure TMDICategories.TreeView1Change(Sender: TObject; Node: TTreeNode); |
begin |
// if Change = ctState then |
// begin |
PNeu.Visible := true; |
N1.Visible := true; |
PEditor.Visible := true; |
PExternal.Visible := true; |
N2.Visible := true; |
PDelete.Visible := true; |
PNeu.Default := false; |
PEditor.Default := true; |
//PNeu.Enabled := (TreeView1.SelectionCount = 1) and |
// ((IsFolderNode(TreeView1.Selected)) or |
// (IsRootNode(TreeView1.Selected))); |
PNeu.Enabled := true; |
EditorOpen.Enabled := (TreeView1.SelectionCount = 1) and |
((IsAppenderNode(TreeView1.Selected)) or |
(IsForeignNode(TreeView1.Selected)) or |
(IsTextNode(TreeView1.Selected))); |
ExternalOpen.Enabled := (TreeView1.SelectionCount = 1) and |
((IsAppenderNode(TreeView1.Selected)) or |
(IsRootNode(TreeView1.Selected)) or |
(IsFolderNode(TreeView1.Selected)) or |
(IsForeignNode(TreeView1.Selected)) or |
(IsTextNode(TreeView1.Selected))); |
KategorieDelete1.Enabled := (TreeView1.SelectionCount = 1) and |
((IsAppenderNode(TreeView1.Selected)) or |
(IsFolderNode(TreeView1.Selected)) or |
(IsForeignNode(TreeView1.Selected)) or |
(IsTextNode(TreeView1.Selected))); |
KategorieUmbenennen1.Enabled := (TreeView1.SelectionCount = 1) and |
((IsAppenderNode(TreeView1.Selected)) or |
(IsFolderNode(TreeView1.Selected)) or |
(IsForeignNode(TreeView1.Selected)) or |
(IsTextNode(TreeView1.Selected))); |
PEditor.Enabled := EditorOpen.Enabled; |
PExternal.Enabled := ExternalOpen.Enabled; |
PDelete.Enabled := KategorieDelete1.Enabled; |
PUmbenennen.Enabled := KategorieUmbenennen1.Enabled; |
// end; |
end; |
procedure TMDICategories.TreeView1DblClick(Sender: TObject); |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
EditorOpen.Click; |
end; |
end; |
procedure TMDICategories.TreeView1KeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
begin |
if Key = VK_RETURN then |
begin |
Key := 0; |
if TreeView1.SelectionCount = 1 then |
begin |
if TreeView1.Selected.HasChildren then |
begin |
if TreeView1.Selected.Expanded then |
TreeView1.Selected.Collapse(false) |
else |
TreeView1.Selected.Expand(false); |
end |
else |
begin |
EditorOpen.Click; |
end; |
end; |
end; |
end; |
procedure TMDICategories.RefreshList; |
var |
root: TTreeNode; |
begin |
TreeView1.Visible := false; |
TreeView1.Items.Clear; |
TreeView1.Visible := true; |
root := TreeView1.Items.Add(nil, lng_root); |
root.ImageIndex := II_ROOT; |
root.SelectedIndex := II_ROOT; |
recursiveItemListing('', root); |
root.Expand(false); |
end; |
procedure TMDICategories.KategorieDelete1Click(Sender: TObject); |
var |
fn: string; |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
fn := GetFileNameFromNode(TreeView1.Selected); |
if commonDelete(fn) then |
begin |
// TODO: Eigentlich sollte das innerhalb von commonDelete() stattfinden |
TreeView1.Selected.Delete; |
end; |
end; |
end; |
procedure TMDICategories.DeleteNode(folder, cat: string); |
procedure Rec(folder, cat: string; t: TTreeNode); |
var |
i: integer; |
begin |
if (folder = GetFolderFromNode(t)) and |
(cat = GetCatFromNode(t)) then |
begin |
t.Delete; |
exit; |
end; |
for i := t.Count - 1 downto 0 do |
begin |
Rec(folder, cat, t.Item[i]); |
end; |
end; |
begin |
Rec(folder, cat, treeview1.Items.Item[0]); |
end; |
procedure TMDICategories.InsertNode(folder, cat: string; em: TAMode); |
procedure Rec(folder, cat: string; em: TAMode; t: TTreeNode); |
var |
i: integer; |
n: TTreeNode; |
begin |
if (folder = GetFolderFromNode(t)) and |
(IsFolderNode(t) or IsRootNode(t)) then |
begin |
n := treeview1.Items.AddChild(t, cat); |
t.Expand(false); // Ordner aufklappen |
with n do |
begin |
if em = emFolder then |
begin |
ImageIndex := II_FOLDER; |
SelectedIndex := II_FOLDER; |
recursiveItemListing(folder + cat, n); |
end |
else |
begin |
if em = emText then |
begin |
ImageIndex := II_TEXT; |
SelectedIndex := II_TEXT; |
end |
else if em = emAppender then |
begin |
ImageIndex := II_APPENDER; |
SelectedIndex := II_APPENDER; |
end |
else if em = emForeign then |
begin |
ImageIndex := II_FOREIGN; |
SelectedIndex := II_FOREIGN; |
end; |
end; |
end; |
exit; |
end; |
for i := t.Count - 1 downto 0 do |
begin |
Rec(folder, cat, em, t.Item[i]); |
end; |
end; |
procedure NodeForceDir(folder: string); |
function CreateIfExists(foldername: string; node: TTreeNode): TTreeNode; |
var |
i: integer; |
somethingfound: boolean; |
begin |
result := nil; |
somethingfound := false; |
for i := 0 to node.Count - 1 do |
begin |
if (node.Item[i].Text = foldername) and |
(IsFolderNode(node.Item[i]) or IsRootNode(node.Item[i])) then |
begin |
somethingfound := true; |
result := node.Item[i]; |
break; |
end; |
end; |
if not somethingfound then |
begin |
result := treeview1.Items.AddChild(node, foldername); |
node.Expand(false); |
with result do |
begin |
ImageIndex := II_FOLDER; |
SelectedIndex := II_FOLDER; |
end; |
end; |
end; |
var |
x: tstringlist; |
i: Integer; |
node: TTreeNode; |
begin |
x := TStringList.Create; |
try |
Explode(PathDelim, folder, x); |
node := treeview1.Items.Item[0]; |
for i := 0 to x.count - 1 do |
begin |
if x.Strings[i] <> '' then |
begin |
node := CreateIfExists(x.Strings[i], node); |
end; |
end; |
finally |
x.Free; |
end; |
end; |
var |
sl: TStringList; |
i: integer; |
begin |
if (em = emFolder) and (cat = '') then |
begin |
sl := TStringList.Create; |
try |
explode(PathDelim, folder, sl); |
cat := sl.Strings[sl.Count-2]; |
folder := ''; |
for i := 0 to sl.Count - 3 do |
begin |
folder := folder + sl.Strings[i] + PathDelim; |
end; |
finally |
sl.Free; |
end; |
end; |
NodeForceDir(folder); |
Rec(folder, cat, em, treeview1.Items.Item[0]); |
end; |
procedure TMDICategories.DoNew; |
var |
folder: string; |
pnode: TTreeNode; |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
if IsFolderNode(TreeView1.Selected) or |
IsRootNode(TreeView1.Selected) then |
begin |
pnode := TreeView1.Selected; |
end |
else |
begin |
pnode := TreeView1.Selected.Parent; |
end; |
folder := GetFolderFromNode(pnode); |
newDialog(folder); |
end |
else |
begin |
newDialog(''); // In der Wurzel erstellen |
TreeView1.Items.Item[0]; |
end; |
end; |
procedure TMDICategories.EditorOpenClick(Sender: TObject); |
var |
cat, folder: string; |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
cat := TreeView1.Selected.Text; |
folder := GetFolderFromNode(TreeView1.Selected); |
if (IsForeignNode(TreeView1.Selected)) then |
begin |
ExternalOpen.Click; |
end |
else if (IsAppenderNode(TreeView1.Selected)) or |
(IsTextNode(TreeView1.Selected)) then |
begin |
if not FileExists(GetFileNameFromNode(TreeView1.Selected)) then |
begin |
ShowMessage(lng_filenotfound); |
Exit; |
end; |
if IsAppenderNode(TreeView1.Selected) then |
begin |
OpenAppenderEditor(folder, cat); |
end |
else |
begin |
OpenTextEditor(folder, cat); |
end; |
end; |
end; |
end; |
procedure TMDICategories.KategorieClose1Click(Sender: TObject); |
begin |
Close; |
end; |
procedure TMDICategories.KategorieRefresh1Click(Sender: TObject); |
begin |
RefreshList; |
TreeView1.SetFocus; |
end; |
procedure TMDICategories.KategorieUmbenennen1Click(Sender: TObject); |
begin |
renameDialog(TreeView1.Selected); |
end; |
procedure TMDICategories.PNeuClick(Sender: TObject); |
begin |
DoNew(); |
end; |
procedure TMDICategories.ExternalOpenClick(Sender: TObject); |
var |
fn: string; |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
fn := GetFileNameFromNode(TreeView1.Selected); |
commonExternalOpen(fn); |
end; |
end; |
procedure TMDICategories.PopupMenu1Popup(Sender: TObject); |
begin |
if TreeView1.SelectionCount = 1 then |
begin |
PNeu.Visible := isFolderNode(TreeView1.Selected) or IsRootNode(TreeView1.Selected); |
N1.Visible := isFolderNode(TreeView1.Selected) or IsRootNode(TreeView1.Selected); |
PEditor.Visible := true; |
PExternal.Visible := true; |
N2.Visible := true; |
PDelete.Visible := true; |
PUmbenennen.Visible := true; |
PNeu.Default := false; |
PEditor.Default := true; |
end |
else |
begin |
PNeu.Visible := true; |
N1.Visible := false; |
PEditor.Visible := false; |
PExternal.Visible := false; |
N2.Visible := false; |
PDelete.Visible := false; |
PUmbenennen.Visible := false; |
PNeu.Default := true; |
PEditor.Default := false; |
end; |
end; |
procedure TMDICategories.recursiveItemListing(folder: string; |
parentnode: TTreeNode); |
var |
tmp_sr: TSearchRec; |
i_folder: TTreeNode; |
begin |
folder := MyAddTrailingPathDelimiter(folder); |
if FindFirst(allFiles(folder), faAnyFile, tmp_sr) = 0 then |
begin |
repeat |
if (tmp_sr.Name <> '.') and (tmp_sr.Name <> '..') then |
begin |
if directoryExists(getFolderName(folder, tmp_sr.Name)) then |
begin |
i_folder := TreeView1.Items.AddChild(parentnode, tmp_sr.Name); |
if CfgExpandNodesAtBeginning then parentnode.Expand(false); |
i_folder.ImageIndex := II_FOLDER; |
i_folder.SelectedIndex := II_FOLDER; |
recursiveItemListing(folder + tmp_sr.Name, i_folder); |
end |
else if (folder + tmp_sr.Name) = GetRelativeFileName(getAppenderFileName(folder, FilenameToCatname(tmp_sr.Name))) then |
begin |
with TreeView1.Items.AddChild(parentnode, FilenameToCatname(tmp_sr.Name)) do |
begin |
ImageIndex := II_APPENDER; |
SelectedIndex := II_APPENDER; |
end; |
if CfgExpandNodesAtBeginning then parentnode.Expand(false); |
end |
else if (folder + tmp_sr.Name) = GetRelativeFileName(getTextFileName(folder, FilenameToCatname(tmp_sr.Name))) then |
begin |
with TreeView1.Items.AddChild(parentnode, FilenameToCatname(tmp_sr.Name)) do |
begin |
ImageIndex := II_TEXT; |
SelectedIndex := II_TEXT; |
end; |
if CfgExpandNodesAtBeginning then parentnode.Expand(false); |
end |
else if getFolderName(folder, tmp_sr.Name) <> getJournalFileName() then |
begin |
with TreeView1.Items.AddChild(parentnode, tmp_sr.Name) do |
begin |
ImageIndex := II_FOREIGN; |
SelectedIndex := II_FOREIGN; |
end; |
if CfgExpandNodesAtBeginning then parentnode.Expand(false); |
end; |
end; |
until FindNext(tmp_sr) <> 0; |
FindClose(tmp_sr); |
end; |
end; |
procedure TMDICategories.TreeView1KeyPress(Sender: TObject; var Key: Char); |
begin |
// Verhindert einen Windows-Sound beim Drücken von Enter |
if key = #13 then key := #0; |
if key = #10 then key := #0; |
end; |
end. |
/trunk/Delphi/clean.bat |
---|
0,0 → 1,6 |
@echo off |
rd /s /q __history |
del *.~* |
del *.identcache |
del *.local |
del *.dcu |
/trunk/Delphi/global.pas |
---|
0,0 → 1,960 |
unit global; |
interface |
uses |
SysUtils, Classes, Dialogs, Forms, Windows, ShellAPI, Controls, |
ComCtrls, WinInet; |
type |
TAMode = (emUnknown, emFolder, emText, emAppender, emForeign); |
// TODO: So viel wie möglich in den implementation Teil schieben |
function allFiles(folder: string): string; |
function FilenameToCatname(fil: string): string; |
procedure StrokeFromFile(filename: string; index: integer; expected_text: string); |
procedure AddToJournal(text: string); |
function RemoveForbiddenChars(fn: string; dir: boolean): string; |
procedure JournalDeleteEntry(fn: string); |
function commonDelete(fn: string): boolean; |
procedure commonExternalOpen(fn: string); |
function GetUserFriendlyElementName(fn: string): string; |
procedure openCategoriesWindow(); |
procedure newDialog(folder: string); |
procedure OpenTextEditor(folder, cat: string); |
procedure OpenAppenderEditor(folder, cat: string); |
procedure renameDialog(Node: TTreeNode); |
function DelTree(DirName : string): Boolean; |
function MyAddTrailingPathDelimiter(folder: string): string; |
function getDataPath(): string; |
function getJournalFileName(): string; |
function getAppenderFileName(Folder, Name: string): string; |
function getTextFileName(Folder, Name: string): string; |
function getFolderName(Folder, Name: string): string; |
function GetRelativeNameFromNode(Node: TTreeNode): string; |
function GetRelativeFileName(Filename: string): string; |
function GetFileNameFromNode(Node: TTreeNode): string; |
function GetFolderFromNode(Node: TTreeNode): string; |
function IsTextNode(Node: TTreeNode): boolean; |
function IsFolderNode(Node: TTreeNode): boolean; |
function IsAppenderNode(Node: TTreeNode): boolean; |
function IsForeignNode(Node: TTreeNode): boolean; |
function IsRootNode(Node: TTreeNode): boolean; |
// function GetPersonalFolder(Default: string): string; overload; |
function GetPersonalFolder(): string; overload; |
function GetCatFromNode(Node: TTreeNode): string; |
Function GetHTML(AUrl: string): string; |
procedure explode(delim: char; s: string; sl: TStringList); |
type |
EStrokeUnknown = class(Exception); |
EStrokeMismatch = class(Exception); |
ENodeError = class(Exception); |
EInternalError = class(Exception); |
resourcestring |
lng_cap_new = 'Neue Datei anlegen'; |
lng_cap_rename = 'Umbennen'; |
lng_jnl_renamed = 'Umbenannt: "%s" zu "%s".'; |
lng_already_exists = 'Fehler! Die Datei "%s" existiert bereits.'; |
lng_move_error = 'Fehler! Konnte nicht von "%s" nach "%s" verschieben.'; |
lng_jnl_delete = 'LÖSCHE %s'; |
lng_content_was = 'Der Inhalt war:'; |
lng_no_content = 'Die Datei war leer.'; |
lng_jnl_open_external = 'Öffne mit externem Programm: %s'; |
lng_jnl_created = 'Erstellt: %s'; |
lng_jnl_stroke_from = 'Streiche von %s:'; |
lng_jnl_add_to = 'Füge hinzu: %s'; |
lng_jnl_textchange = 'Textinhalt geändert: %s'; |
lng_filenotfound = 'Datei wurde nicht gefunden.'; |
lng_editor_title = '%s - Streichlisteneditor'; |
lng_texteditor_title = '%s - AUTOSAVE Texteditor'; |
lng_stroker_really = 'Möchten Sie diese %d Zeilen wirklich streichen?'; |
lng_refresh_strokes_loss = 'Warnung: Beim Neu-Laden werden alle Streich-Vormerkungen (%d) entfernt. Wirklich neu laden?'; |
lng_appendfirst = 'Neue Zeile vor dem Schließen in "%s" ablegen?'; |
lng_savefirst = 'Die Änderungen an "%s" abspeichern?'; |
lng_strokefirst = '%d markierte Zeilen in "%s" vor dem Schließen streichen?'; |
lng_notdeleted = 'Fehler: Datei konnte nicht gelöscht werden!'; |
lng_error = 'Ein Fehler ist aufgetreten.'; |
lng_journal_error = 'Es konnte nicht in das Journal geschrieben werden!'; |
lng_deletethis = 'Datensatz "%s" wirklich löschen?'; |
lng_notcreated = 'Fehler: Datei konnte nicht erstellt werden!'; |
lng_alreadyexists_open = 'Die Datei existiert bereits. Sie wird nun geöffnet.'; |
lng_stroke_mismatch = 'Die zu streichende Zeile stimmt nicht mit der angezeigten Fassung überein.'; |
lng_stroke_error = 'Unbekannter Fehler beim Streichen.'; |
lng_root = 'Datensätze'; |
lng_text = 'Text'; |
lng_appender = 'Streichliste'; |
const |
app_pfx = 'app_'; |
txt_pfx = 'tex_'; |
c_length_of_pfx = Length(app_pfx); // = Length(txt_pfx) |
II_APPENDER = 0; |
II_TEXT = 1; |
II_FOLDER = 2; |
II_FOREIGN = 3; |
II_ROOT = 4; |
FOLDER_VIEWER = 'Explorer'; |
// Konfiguration |
const |
CfgExpandNodesAtBeginning = false; |
CfgOpenCatWhenEverythingClosed = false; |
CfgAppenderAllowEmptyLines = true; |
implementation |
uses |
categories, journal, name, appender, texteditor; |
resourcestring |
lng_internal_prefix_length_error = 'Entwicklungstechnischer Fehler! Präfixe dürfen nicht unterschiedlich lang sein!'; |
lng_internal_unknown_node_type_error = 'Programminterner Fehler! Node-Typ unbekannt!'; |
function GetModeFromNode(ANode: TTreeNode): TAMode; forward; |
function getFileName(mode: TAMode; folder, name: string): string; forward; |
function ExtractFileNameWithoutExt(fil: string): string; forward; |
function getRawFileName(folder, name: string): string; forward; |
function Quote(arg: string): string; forward; |
function allFiles(folder: string): string; |
begin |
result := getRawFilename(folder, '*'); |
end; |
function ExtractFileNameWithoutExt(fil: string): string; |
begin |
result := Copy(ExtractFileName(fil), 1, Length(ExtractFileName(fil))-Length(ExtractFileExt(fil))); |
end; |
function FilenameToCatname(fil: string): string; |
begin |
result := ExtractFileNameWithoutExt(fil); |
result := Copy(result, 1+c_length_of_pfx, length(result)-c_length_of_pfx); |
result := ExtractFilePath(fil) + result; |
end; |
procedure StrokeFromFile(filename: string; index: integer; expected_text: string); |
var |
str: TStrings; |
begin |
str := TStringList.Create; |
try |
try |
str.LoadFromFile(filename); |
if str.Strings[index] = expected_text then |
str.Delete(index) |
else |
raise EStrokeMismatch.Create(lng_stroke_mismatch); |
str.SaveToFile(filename); |
except |
on E: EStrokeMismatch do |
raise |
else |
raise EStrokeUnknown.Create(lng_stroke_error); |
end; |
finally |
str.Free; |
end; |
end; |
procedure AddToJournal(text: string); |
var |
f: TextFile; |
l: string; |
i: integer; |
begin |
l := Format('[%s] %s', [DateTimeToStr(Now()), text]); |
try |
AssignFile(f, getJournalFileName()); |
try |
if FileExists(getJournalFileName()) then |
Append(f) |
else |
ReWrite(f); |
WriteLn(f, l); |
finally |
CloseFile(f); |
end; |
except |
ShowMessage(lng_journal_error); |
end; |
// Andere Forms benachrichtigen |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDIJournalForm then |
begin |
TMDIJournalForm(Screen.Forms[i]).DoRefresh; |
break; |
end |
end; |
end; |
function RemoveForbiddenChars(fn: string; dir: boolean): string; |
begin |
result := fn; |
fn := StringReplace(fn, '<', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '>', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '|', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '"', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '?', '_', [rfReplaceAll]); |
fn := StringReplace(fn, ':', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '/', '_', [rfReplaceAll]); |
if not dir then fn := StringReplace(fn, '\', '_', [rfReplaceAll]); |
fn := StringReplace(fn, '*', '_', [rfReplaceAll]); |
end; |
procedure JournalDeleteEntry(fn: string); |
var |
dump: TStringList; |
i: integer; |
begin |
if not fileexists(fn) then exit; |
AddToJournal(Format(lng_jnl_delete, [GetUserFriendlyElementName(fn)])); |
dump := TStringList.Create; |
try |
dump.LoadFromFile(fn); |
if dump.Count > 0 then |
begin |
AddToJournal(lng_content_was); |
for i := 0 to dump.Count - 1 do |
begin |
AddToJournal('- ' + dump.Strings[i]); |
end; |
end |
else |
begin |
AddToJournal(lng_no_content); |
end; |
finally |
dump.Free; |
end; |
end; |
function commonDelete(fn: string): boolean; |
var |
userResponse: integer; |
begin |
result := false; |
userResponse := MessageDlg(Format(lng_deletethis, [GetRelativeFileName(fn)]), |
mtConfirmation, mbYesNoCancel, 0); |
if userResponse = idYes then |
begin |
JournalDeleteEntry(fn); |
if fileexists(fn) then |
begin |
DeleteFile(PChar(fn)); |
end |
else if directoryexists(fn) then |
begin |
DelTree(fn); |
end; |
if FileExists(fn) or DirectoryExists(fn) then |
begin |
ShowMessage(lng_notdeleted); |
Exit; |
end; |
result := true; |
end; |
end; |
function GetUserFriendlyElementName(fn: string): string; |
begin |
result := GetRelativeFileName(fn); // TODO: Benutzer soll was anderes sehen als die Dateinamenserweiterungen |
end; |
procedure commonExternalOpen(fn: string); |
begin |
AddToJournal(Format(lng_jnl_open_external, [GetUserFriendlyElementName(fn)])); |
if FileExists(fn) then |
begin |
ShellExecute(Application.Handle, 'open', PChar(fn), '', |
PChar(Quote(fn)), SW_NORMAL); |
end |
else if DirectoryExists(fn) then |
begin |
ShellExecute(Application.Handle, 'open', FOLDER_VIEWER, |
PChar(Quote(fn)), '', SW_NORMAL); |
end |
else |
begin |
ShowMessage(lng_filenotfound); |
end; |
end; |
procedure openCategoriesWindow(); |
var |
i: integer; |
somethingfound: boolean; |
begin |
somethingfound := false; |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
TMDICategories(Screen.Forms[i]).RefreshList; |
Screen.Forms[i].BringToFront; |
Screen.Forms[i].WindowState := wsNormal; |
somethingfound := true; |
break; |
end |
end; |
if not somethingfound then |
begin |
TMDICategories.Create(Application); |
end; |
end; |
procedure newDialog(folder: string); |
var |
f: TextFile; |
realfolder, new_folder, new_cat: string; |
i: integer; |
new_fn: string; |
em: TAMode; |
beschreibung: string; |
begin |
NameDlg.Caption := lng_cap_new; |
NameDlg.NameEdt.Text := ''; |
NameDlg.Textmode.Checked := false; |
NameDlg.Textmode.Enabled := true; |
if NameDlg.ShowModal = mrOk then |
begin |
new_cat := ExtractFileName(namedlg.NameEdt.Text); |
new_cat := RemoveForbiddenChars(new_cat, false); |
folder := MyAddTrailingPathDelimiter(folder); |
new_folder := ExtractFilePath(namedlg.NameEdt.Text); |
new_folder := RemoveForbiddenChars(folder + new_folder, true); |
if NameDlg.Textmode.Checked then |
begin |
new_fn := getTextFileName(new_folder, new_cat); |
em := emText; |
beschreibung := lng_text; |
end |
else |
begin |
new_fn := getAppenderFileName(new_folder, new_cat); |
em := emAppender; |
beschreibung := lng_appender; |
end; |
new_fn := RemoveForbiddenChars(new_fn, false); |
realfolder := ExtractFilePath(new_fn); |
ForceDirectories(realfolder); |
if FileExists(new_fn) then |
begin |
ShowMessage(lng_alreadyexists_open); |
if em = emText then |
OpenTextEditor(new_folder, new_cat) |
else |
OpenAppenderEditor(new_folder, new_cat); |
Exit; |
end; |
AssignFile(f, new_fn); |
ReWrite(f); |
CloseFile(f); |
if not FileExists(new_fn) then |
begin |
ShowMessage(lng_notcreated); |
Exit; |
end; |
AddToJournal(Format(lng_jnl_created, [GetUserFriendlyElementName(new_fn)])); |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
// TMDICategories(Screen.Forms[i]).RefreshList; |
TMDICategories(Screen.Forms[i]).InsertNode(new_folder, new_cat, em); |
end |
end; |
if em = emText then |
OpenTextEditor(new_folder, new_cat) |
else |
OpenAppenderEditor(new_folder, new_cat); |
end; |
end; |
procedure OpenTextEditor(folder, cat: string); |
var |
somethingfound: boolean; |
i: integer; |
begin |
somethingfound := false; |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDITextEditor then |
begin |
if (TMDITextEditor(Screen.Forms[i]).cat = cat) and |
(TMDITextEditor(Screen.Forms[i]).folder = folder) then |
begin |
Screen.Forms[i].BringToFront; |
Screen.Forms[i].WindowState := wsNormal; |
somethingfound := true; |
break; |
end; |
end |
end; |
if not somethingfound then |
begin |
TMDITextEditor.Create(Application, folder, cat); |
end; |
end; |
procedure OpenAppenderEditor(folder, cat: string); |
var |
somethingfound: boolean; |
i: integer; |
begin |
somethingfound := false; |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDIAppender then |
begin |
if (TMDIAppender(Screen.Forms[i]).cat = cat) and |
(TMDIAppender(Screen.Forms[i]).folder = folder) then |
begin |
Screen.Forms[i].BringToFront; |
Screen.Forms[i].WindowState := wsNormal; |
somethingfound := true; |
break; |
end; |
end |
end; |
if not somethingfound then |
begin |
TMDIAppender.Create(Application, folder, cat); |
end; |
end; |
function GetModeFromNode(ANode: TTreeNode): TAMode; |
begin |
result := emUnknown; |
if IsAppenderNode(ANode) then |
begin |
result := emAppender; |
end |
else if IsTextNode(ANode) then |
begin |
result := emText; |
end |
else if IsFolderNode(ANode) then |
begin |
result := emFolder; |
end else if IsForeignNode(ANode) then |
begin |
result := emForeign; |
end; |
if result = emUnknown then |
begin |
raise ENodeError.Create(lng_internal_unknown_node_type_error); |
end; |
end; |
function getFileName(mode: TAMode; folder, name: string): string; |
begin |
if (mode = emFolder) or (mode = emForeign) then |
begin |
result := getFolderName(folder, name); |
result := RemoveForbiddenChars(result, true); |
end |
else if mode = emText then |
begin |
result := getTextFileName(folder, name); |
result := RemoveForbiddenChars(result, false); |
end |
else if mode = emAppender then |
begin |
result := getAppenderFileName(folder, name); |
result := RemoveForbiddenChars(result, false); |
end |
else |
begin |
raise ENodeError.Create(lng_internal_unknown_node_type_error); |
end; |
end; |
procedure renameDialog(Node: TTreeNode); |
var |
realfolder, new_cat, new_folder: string; |
i: integer; |
tofile, fromfile: string; |
old_folder, old_cat: string; |
old_em, new_em: TAMode; |
const |
folder = ''; // Wir gehen beim Umbenennen von der Wurzel aus |
begin |
old_em := GetModeFromNode(Node); |
old_folder := GetFolderFromNode(Node); |
old_cat := GetCatFromNode(Node); |
NameDlg.Caption := lng_cap_rename; |
NameDlg.NameEdt.Text := old_folder + old_cat; |
NameDlg.Textmode.Checked := IsTextNode(Node); |
NameDlg.Textmode.Enabled := not IsFolderNode(Node) and not IsForeignNode(Node); |
if NameDlg.ShowModal = mrOk then |
begin |
if IsFolderNode(Node) or IsForeignNode(Node) then |
begin |
new_em := old_em; |
end |
else |
begin |
if NameDlg.Textmode.Checked then |
new_em := emText |
else |
new_em := emAppender; |
end; |
new_cat := ExtractFileName(namedlg.NameEdt.Text); |
new_cat := RemoveForbiddenChars(new_cat, false); |
// folder := MyAddTrailingPathDelimiter(folder); |
new_folder := ExtractFilePath(namedlg.NameEdt.Text); |
new_folder := RemoveForbiddenChars(folder + new_folder, true); |
realfolder := ExtractFilePath(getFileName(old_em, new_folder, new_cat)); |
if not IsFolderNode(Node) then ForceDirectories(realfolder); |
// Enthält RemoveForbiddenChars() |
fromfile := getFileName(old_em, old_folder, old_cat); |
tofile := getFileName(new_em, new_folder, new_cat); |
if fromfile = tofile then exit; |
if fileExists(tofile) then |
begin |
ShowMessageFmt(lng_already_exists, [GetUserFriendlyElementName(tofile)]); |
Exit; |
end; |
if not moveFile(pchar(fromfile), pchar(tofile)) then |
begin |
ShowMessageFmt(lng_move_error, [GetUserFriendlyElementName(fromfile), GetUserFriendlyElementName(tofile)]); |
Exit; |
end; |
AddToJournal(Format(lng_jnl_renamed, [GetUserFriendlyElementName(fromfile), GetUserFriendlyElementName(tofile)])); |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
// TMDICategories(Screen.Forms[i]).RefreshList; |
TMDICategories(Screen.Forms[i]).DeleteNode(old_folder, old_cat); |
TMDICategories(Screen.Forms[i]).InsertNode(new_folder, new_cat, new_em); |
end |
end; |
Node.Selected := true; |
end; |
end; |
// http://delphi.about.com/cs/adptips1999/a/bltip1199_2.htm |
// Modifiziert |
Function DelTree(DirName : string): Boolean; |
var |
SHFileOpStruct : TSHFileOpStruct; |
DirBuf : array [0..MAX_PATH] of char; |
begin |
// Backslash am Ende entfernen |
if Copy(DirName, length(DirName), 1) = PathDelim then |
DirName := Copy(DirName, 1, Length(DirName)-1); |
try |
Fillchar(SHFileOpStruct, SizeOf(SHFileOpStruct), 0); |
FillChar(DirBuf, SizeOf(DirBuf), 0); |
StrPCopy(DirBuf, DirName); |
with SHFileOpStruct do |
begin |
Wnd := 0; |
pFrom := @DirBuf; |
wFunc := FO_DELETE; |
fFlags := FOF_ALLOWUNDO; |
fFlags := fFlags or FOF_NOCONFIRMATION; |
fFlags := fFlags or FOF_SILENT; |
end; |
Result := (SHFileOperation(SHFileOpStruct) = 0); |
except |
Result := False; |
end; |
end; |
function MyAddTrailingPathDelimiter(folder: string): string; |
begin |
result := folder; |
if folder = '' then exit; |
result := IncludeTrailingPathDelimiter(folder); |
//if Copy(folder, length(folder), 1) <> PathDelim then |
// result := result + PathDelim; |
end; |
function getDataPath(): string; |
const |
DataDirName = 'StackMan-Data'; |
begin |
if directoryExists(DataDirName) then |
result := DataDirName + PathDelim |
else |
result := GetPersonalFolder() + DataDirName + PathDelim; |
end; |
function getJournalFileName(): string; |
const |
JournalFile = 'Journal.txt'; |
begin |
result := getDataPath() + JournalFile; |
end; |
function getRawFileName(folder, name: string): string; |
begin |
Folder := MyAddTrailingPathDelimiter(folder); |
result := getDataPath() + Folder + name; |
end; |
function getAppenderFileName(Folder, Name: string): string; |
begin |
result := getRawFileName(folder, app_pfx + Name + '.txt'); |
end; |
function getTextFileName(Folder, Name: string): string; |
begin |
result := getRawFileName(folder, txt_pfx + Name + '.txt'); |
end; |
function getFolderName(Folder, Name: string): string; |
begin |
result := getRawFileName(folder, Name); |
end; |
function GetRelativeFileName(Filename: string): string; |
var |
datadir: string; |
begin |
result := filename; |
datadir := getDataPath(); |
if LowerCase(copy(result, 1, length(datadir))) = LowerCase(datadir) then |
begin |
result := copy(result, 1+length(datadir), length(result)-length(datadir)); |
end; |
end; |
function GetRelativeNameFromNode(Node: TTreeNode): string; |
begin |
result := getFilenameFromNode(Node); |
result := GetRelativeFileName(result); |
// result := FilenameToCatname(result); |
end; |
function IsTextNode(Node: TTreeNode): boolean; |
begin |
result := Node.ImageIndex = II_TEXT; |
end; |
function IsFolderNode(Node: TTreeNode): boolean; |
begin |
result := Node.ImageIndex = II_FOLDER; |
end; |
function IsAppenderNode(Node: TTreeNode): boolean; |
begin |
result := Node.ImageIndex = II_APPENDER; |
end; |
function IsForeignNode(Node: TTreeNode): boolean; |
begin |
result := Node.ImageIndex = II_FOREIGN; |
end; |
function IsRootNode(Node: TTreeNode): boolean; |
begin |
result := Node.ImageIndex = II_ROOT; |
end; |
function GetFileNameFromNode(Node: TTreeNode): string; |
var |
folder: string; |
begin |
folder := GetFolderFromNode(Node); |
if IsTextNode(Node) then |
begin |
result := GetTextFileName(folder, GetCatFromNode(Node)); |
end |
else if IsAppenderNode(Node) then |
begin |
result := GetAppenderFileName(folder, GetCatFromNode(Node)); |
end |
else if IsForeignNode(Node) then |
begin |
result := GetRawFileName(folder, GetCatFromNode(Node)); |
end |
else if isRootNode(Node) then |
begin |
result := getDataPath(); |
end |
else if IsFolderNode(Node) then |
begin |
result := GetRawFileName(folder, ''); |
end |
else |
begin |
raise ENodeError.Create(lng_internal_unknown_node_type_error); |
end; |
end; |
function GetFolderFromNode(Node: TTreeNode): string; |
var |
par: TTreeNode; |
begin |
if isRootNode(node) then exit; |
if isFolderNode(node) then |
par := node |
else |
par := node.Parent; |
while not isRootNode(par) do |
begin |
result := par.Text + PathDelim + result; |
par := par.Parent; |
end; |
end; |
function Quote(arg: string): string; |
begin |
result := '"' + arg + '"'; |
end; |
(* function GetPersonalFolder: string; |
var |
path : array [0..MAX_PATH] of char; |
begin |
SHGetSpecialFolderPath(0, @path, CSIDL_PERSONAL, false); |
if path = '' then |
result := ExtractFilePath(Application.ExeName) |
else |
result := IncludeTrailingPathDelimiter(path); |
end; *) |
function GetPersonalFolder(DefaultPath: string): string; overload; |
// This function replaces SHGetSpecialFolderPath from ShlObj.pas . |
// It dynamically loads the DLL, so that also Windows 95 without |
// Internet Explorer 4 Extension can work with it. |
type |
TSHGetSpecialFolderPath = function(hwndOwner: HWND; lpszPath: PChar; |
nFolder: Integer; fCreate: BOOL): BOOL; stdcall; |
procedure Fail; |
begin |
if DefaultPath = '' then |
result := ExtractFilePath(ParamStr(0)) |
else |
result := IncludeTrailingPathDelimiter(DefaultPath); |
end; |
const |
{$IFDEF MSWINDOWS} |
shell32 = 'shell32.dll'; |
{$ENDIF} |
{$IFDEF LINUX} |
shell32 = 'libshell32.borland.so'; |
{$ENDIF} |
CSIDL_PERSONAL = $0005; |
var |
SpecialFolder: TSHGetSpecialFolderPath; |
Handle: THandle; |
path: array [0..MAX_PATH] of char; |
begin |
result := ''; |
Handle := LoadLibrary(shell32); |
if Handle <> 0 then |
begin |
{$IFDEF UNICODE} |
@SpecialFolder := GetProcAddress(Handle, 'SHGetSpecialFolderPathW'); |
{$ELSE} |
@SpecialFolder := GetProcAddress(Handle, 'SHGetSpecialFolderPathA'); |
{$ENDIF} |
if @SpecialFolder <> nil then |
begin |
FillChar(path, sizeof(path), 0); |
if SpecialFolder(0, @path, CSIDL_PERSONAL, false) and (path <> '') then |
begin |
result := IncludeTrailingPathDelimiter(path) |
end |
else |
begin |
Fail; |
end; |
end |
else |
begin |
Fail; |
end; |
FreeLibrary(Handle); |
end |
else |
begin |
Fail; |
end; |
end; |
function GetPersonalFolder(): string; |
begin |
result := GetPersonalFolder('C:\'); |
end; |
function GetCatFromNode(Node: TTreeNode): string; |
begin |
if IsFolderNode(Node) then |
result := '' |
else |
result := Node.Text; |
end; |
// http://www.delphipraxis.net/post43515.html |
Function GetHTML(AUrl: string): string; |
var |
databuffer : array[0..4095] of char; |
ResStr : string; |
hSession, hfile: hInternet; |
dwindex,dwcodelen,dwread,dwNumber: cardinal; |
dwcode : array[1..20] of char; |
res : pchar; |
Str : pchar; |
begin |
ResStr:=''; |
if system.pos('http://',lowercase(AUrl))=0 then |
AUrl:='http://'+AUrl; |
// Hinzugefügt |
application.ProcessMessages; |
hSession:=InternetOpen('InetURL:/1.0', |
INTERNET_OPEN_TYPE_PRECONFIG, |
nil, |
nil, |
0); |
if assigned(hsession) then |
begin |
// Hinzugefügt |
application.ProcessMessages; |
hfile:=InternetOpenUrl( |
hsession, |
pchar(AUrl), |
nil, |
0, |
INTERNET_FLAG_RELOAD, |
0); |
dwIndex := 0; |
dwCodeLen := 10; |
// Hinzugefügt |
application.ProcessMessages; |
HttpQueryInfo(hfile, |
HTTP_QUERY_STATUS_CODE, |
@dwcode, |
dwcodeLen, |
dwIndex); |
res := pchar(@dwcode); |
dwNumber := sizeof(databuffer)-1; |
if (res ='200') or (res ='302') then |
begin |
while (InternetReadfile(hfile, |
@databuffer, |
dwNumber, |
DwRead)) do |
begin |
// Hinzugefügt |
application.ProcessMessages; |
if dwRead =0 then |
break; |
databuffer[dwread]:=#0; |
Str := pchar(@databuffer); |
resStr := resStr + Str; |
end; |
end |
else |
ResStr := 'Status:'+res; |
if assigned(hfile) then |
InternetCloseHandle(hfile); |
end; |
// Hinzugefügt |
application.ProcessMessages; |
InternetCloseHandle(hsession); |
Result := resStr; |
end; |
procedure explode(delim: char; s: string; sl: TStringList); |
var |
i: integer; |
tmp: string; |
begin |
tmp := ''; |
for i := 1 to length(s) do |
begin |
if s[i] = delim then |
begin |
sl.Add(tmp); |
tmp := ''; |
end |
else |
tmp := tmp + s[i]; |
end; |
sl.Add(tmp); |
end; |
begin |
if Length(app_pfx) <> Length(txt_pfx) then |
begin |
raise EInternalError.Create(lng_internal_prefix_length_error); |
Halt; |
end; |
end. |
/trunk/Delphi/journal.PAS |
---|
0,0 → 1,56 |
unit journal; |
interface |
uses |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
Dialogs, StdCtrls, Menus, ImgList; |
type |
TMDIJournalForm = class(TForm) |
Memo1: TMemo; |
MainMenu1: TMainMenu; |
Journal1: TMenuItem; |
Close1: TMenuItem; |
procedure FormShow(Sender: TObject); |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure Close1Click(Sender: TObject); |
public |
procedure DoRefresh; |
end; |
var |
MDIJournalForm: TMDIJournalForm; |
implementation |
{$R *.dfm} |
uses |
main, global; |
procedure TMDIJournalForm.Close1Click(Sender: TObject); |
begin |
Close; |
end; |
procedure TMDIJournalForm.DoRefresh; |
begin |
if FileExists(getJournalFileName()) then |
begin |
Memo1.Lines.LoadFromFile(getJournalFileName()); |
end; |
SendMessage(Memo1.Handle, WM_VSCROLL, SB_BOTTOM, 0); // TODO: geht nicht in w95 |
end; |
procedure TMDIJournalForm.FormClose(Sender: TObject; var Action: TCloseAction); |
begin |
Action := caFree; |
end; |
procedure TMDIJournalForm.FormShow(Sender: TObject); |
begin |
DoRefresh; |
end; |
end. |
/trunk/Delphi/journal.dfm |
---|
0,0 → 1,48 |
object MDIJournalForm: TMDIJournalForm |
Left = 288 |
Top = 156 |
Width = 347 |
Height = 180 |
Caption = 'Journal' |
Color = clBtnFace |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'MS Sans Serif' |
Font.Style = [] |
FormStyle = fsMDIChild |
Menu = MainMenu1 |
OldCreateOrder = False |
Position = poDefault |
Visible = True |
OnClose = FormClose |
OnShow = FormShow |
PixelsPerInch = 96 |
TextHeight = 13 |
object Memo1: TMemo |
Left = 0 |
Top = 0 |
Width = 339 |
Height = 134 |
Align = alClient |
Color = clBtnFace |
ReadOnly = True |
ScrollBars = ssVertical |
TabOrder = 0 |
end |
object MainMenu1: TMainMenu |
Images = MainForm.ImageList2 |
Left = 8 |
Top = 8 |
object Journal1: TMenuItem |
Caption = '&Journal' |
GroupIndex = 5 |
object Close1: TMenuItem |
Caption = '&Schlie'#223'en' |
ImageIndex = 20 |
ShortCut = 27 |
OnClick = Close1Click |
end |
end |
end |
end |
/trunk/Delphi/main.PAS |
---|
0,0 → 1,223 |
unit main; |
interface |
uses |
Windows, SysUtils, Classes, Graphics, Forms, Controls, Menus, |
StdCtrls, Dialogs, Buttons, Messages, ExtCtrls, ComCtrls, StdActns, |
ActnList, ToolWin, ImgList, ShellAPI; |
type |
TMainForm = class(TForm) |
MainMenu1: TMainMenu; |
Window1: TMenuItem; |
Help1: TMenuItem; |
WindowCascadeItem: TMenuItem; |
WindowTileItem: TMenuItem; |
WindowArrangeItem: TMenuItem; |
HelpAboutItem: TMenuItem; |
WindowMinimizeItem: TMenuItem; |
StatusBar: TStatusBar; |
ActionList1: TActionList; |
FileKategorien1: TAction; |
FileExit1: TAction; |
WindowCascade1: TWindowCascade; |
WindowTileHorizontal1: TWindowTileHorizontal; |
WindowArrangeAll1: TWindowArrange; |
WindowMinimizeAll1: TWindowMinimizeAll; |
HelpAbout1: TAction; |
WindowTileVertical1: TWindowTileVertical; |
WindowTileItem2: TMenuItem; |
ToolBar2: TToolBar; |
ToolButton3: TToolButton; |
ToolButton9: TToolButton; |
ToolButton8: TToolButton; |
ToolButton10: TToolButton; |
ToolButton11: TToolButton; |
N1: TMenuItem; |
Beenden1: TMenuItem; |
Kategorie1: TMenuItem; |
N2: TMenuItem; |
JournalOpen: TMenuItem; |
Timer1: TTimer; |
Timer2: TTimer; |
Neu1: TMenuItem; |
AufUpdatesprfen1: TMenuItem; |
FileNeu1: TAction; |
FileJournal1: TAction; |
ToolButton1: TToolButton; |
ToolButton2: TToolButton; |
HelpUpdates1: TAction; |
ImageList2: TImageList; |
procedure FileKategorien1Execute(Sender: TObject); |
procedure HelpAbout1Execute(Sender: TObject); |
procedure FileExit1Execute(Sender: TObject); |
procedure FormCreate(Sender: TObject); |
procedure JournalOpenClick(Sender: TObject); |
procedure Timer1Timer(Sender: TObject); |
procedure Timer2Timer(Sender: TObject); |
procedure FormResize(Sender: TObject); |
procedure Neu1Click(Sender: TObject); |
procedure AufUpdates1Click(Sender: TObject); |
private |
CloseTimerInitialized: boolean; |
CloseTimerMin: Integer; |
end; |
var |
MainForm: TMainForm; |
implementation |
{$R *.dfm} |
uses |
about, categories, global, journal; |
procedure TMainForm.FileKategorien1Execute(Sender: TObject); |
begin |
openCategoriesWindow(); |
end; |
procedure TMainForm.HelpAbout1Execute(Sender: TObject); |
begin |
AboutBox.ShowModal; |
end; |
procedure TMainForm.JournalOpenClick(Sender: TObject); |
var |
i: integer; |
somethingfound: boolean; |
begin |
somethingfound := false; |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDIJournalForm then |
begin |
Screen.Forms[i].BringToFront; |
Screen.Forms[i].WindowState := wsNormal; |
somethingfound := true; |
break; |
end |
end; |
if not somethingfound then |
begin |
TMDIJournalForm.Create(Application); |
end; |
end; |
procedure TMainForm.Neu1Click(Sender: TObject); |
var |
i: integer; |
somethingfound: boolean; |
begin |
somethingfound := false; |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
TMDICategories(Screen.Forms[i]).DoNew; |
somethingfound := true; |
break; |
end |
end; |
if not somethingfound then |
begin |
newDialog(''); // Aus der Wurzel erstellen |
end; |
end; |
procedure TMainForm.Timer1Timer(Sender: TObject); |
begin |
// timer1.Enabled := false; |
if not CloseTimerInitialized then |
begin |
CloseTimerMin := Screen.FormCount; |
end; |
if Screen.FormCount <= CloseTimerMin then |
begin |
if not CloseTimerInitialized then |
begin |
Kategorie1.Click; // Im OnShow ist das Ergebnis anders (Fenster zu klein, schwarze Ränder an abgerundeten Fensterkanten) |
end |
else |
begin |
if CfgOpenCatWhenEverythingClosed then Kategorie1.Click; // Das Fenster soll immer geöffnet werden, wenn alles andere geschlossen ist |
end; |
end; |
if not CloseTimerInitialized then |
begin |
CloseTimerInitialized := true; |
end; |
end; |
procedure TMainForm.Timer2Timer(Sender: TObject); |
begin |
StatusBar.Panels.Items[1].Text := DateTimeToStr(Now()); |
end; |
procedure TMainForm.AufUpdates1Click(Sender: TObject); |
const |
abbreviation = 'stackman'; |
thisversion = '5.1'; |
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; |
begin |
temp := GetHTML(Format(url_comparison, [abbreviation, thisversion])); |
if temp = res_nothing then |
begin |
Application.MessageBox(PChar(lng_no_new_version), PChar(lng_caption_information), MB_OK + MB_ICONASTERISK); |
end |
else if temp = res_updates then |
begin |
temp := GetHTML(Format(url_version, [abbreviation])); |
if Application.MessageBox(PChar(Format(lng_update_new_version, [temp])), PChar(lng_caption_information), MB_YESNO + MB_ICONASTERISK) = ID_YES then |
begin |
ShellExecute(application.handle, 'open', pchar(Format(url_download, [abbreviation])), '', '', sw_normal); |
end; |
end |
else |
begin |
Application.MessageBox(PChar(lng_update_error), PChar(lng_caption_error), MB_OK + MB_ICONERROR) |
end; |
end; |
procedure TMainForm.FileExit1Execute(Sender: TObject); |
begin |
Close; |
end; |
procedure TMainForm.FormCreate(Sender: TObject); |
begin |
if not DirectoryExists(getDataPath()) then |
begin |
ForceDirectories(getDataPath()); |
end; |
end; |
procedure TMainForm.FormResize(Sender: TObject); |
begin |
StatusBar.Panels.Items[0].Width := StatusBar.Width - StatusBar.Panels.Items[1].Width; |
end; |
end. |
/trunk/Delphi/main.dfm |
---|
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/Delphi/name.dfm |
---|
0,0 → 1,62 |
object NameDlg: TNameDlg |
Left = 245 |
Top = 108 |
BorderIcons = [biSystemMenu] |
BorderStyle = bsDialog |
ClientHeight = 113 |
ClientWidth = 233 |
Color = clBtnFace |
ParentFont = True |
OldCreateOrder = True |
Position = poScreenCenter |
OnKeyDown = FormKeyDown |
OnShow = FormShow |
PixelsPerInch = 96 |
TextHeight = 13 |
object Label1: TLabel |
Left = 8 |
Top = 9 |
Width = 32 |
Height = 13 |
Caption = 'Name?' |
end |
object NameEdt: TEdit |
Left = 8 |
Top = 27 |
Width = 217 |
Height = 21 |
TabOrder = 0 |
OnChange = NameEdtChange |
end |
object OKBtn: TButton |
Left = 70 |
Top = 77 |
Width = 75 |
Height = 25 |
Caption = 'OK' |
Default = True |
ModalResult = 1 |
TabOrder = 2 |
OnClick = OKBtnClick |
end |
object CancelBtn: TButton |
Left = 151 |
Top = 78 |
Width = 75 |
Height = 25 |
Cancel = True |
Caption = 'Abbrechen' |
ModalResult = 2 |
TabOrder = 3 |
OnClick = CancelBtnClick |
end |
object Textmode: TCheckBox |
Left = 8 |
Top = 54 |
Width = 97 |
Height = 17 |
Caption = 'Textmodus' |
TabOrder = 1 |
OnClick = NameEdtChange |
end |
end |
/trunk/Delphi/name.pas |
---|
0,0 → 1,65 |
unit name; |
interface |
uses |
Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, |
Buttons; |
type |
TNameDlg = class(TForm) |
Label1: TLabel; |
NameEdt: TEdit; |
OKBtn: TButton; |
CancelBtn: TButton; |
Textmode: TCheckBox; |
procedure CancelBtnClick(Sender: TObject); |
procedure OKBtnClick(Sender: TObject); |
procedure FormShow(Sender: TObject); |
procedure NameEdtChange(Sender: TObject); |
procedure FormKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
end; |
var |
NameDlg: TNameDlg; |
implementation |
{$R *.dfm} |
procedure TNameDlg.CancelBtnClick(Sender: TObject); |
begin |
ModalResult := mrAbort; |
end; |
procedure TNameDlg.FormShow(Sender: TObject); |
begin |
OkBtn.Enabled := false; |
NameEdt.SetFocus; |
end; |
procedure TNameDlg.NameEdtChange(Sender: TObject); |
begin |
OKBtn.Enabled := NameEdt.Text <> ''; |
end; |
procedure TNameDlg.OKBtnClick(Sender: TObject); |
begin |
if NameEdt.Text <> '' then |
begin |
ModalResult := mrOk; |
end; |
end; |
procedure TNameDlg.FormKeyDown(Sender: TObject; var Key: Word; |
Shift: TShiftState); |
begin |
if (Key = VK_ESCAPE) then |
begin |
close; |
end; |
end; |
end. |
/trunk/Delphi/publish.bat |
---|
0,0 → 1,27 |
@echo off |
REM (Keine Delphi Compilierung) |
SET NAME=ViaThinkSoft Stack Manager 5.1 |
SET URL=http://www.viathinksoft.de/ |
SET EXE=StackMan.exe |
echo Unterzeichne %EXE%... |
signtool sign -d "%NAME%" -du "%URL%" -a -t "http://timestamp.verisign.com/scripts/timstamp.dll" -r "ViaThinkSoft Root Certificate Signing Authority" -i "ViaThinkSoft Intermediate Code Signing Certificate Authority" "%EXE%" |
echo Compiliere Setup... |
"C:\Programme\Inno Setup 5\iscc.exe" /Q "StackMan.iss" |
echo Unterzeichne Setup... |
SET EXE=Output\setup.exe |
signtool sign -d "%NAME%" -du "%URL%" -a -t "http://timestamp.verisign.com/scripts/timstamp.dll" -r "ViaThinkSoft Root Certificate Signing Authority" -i "ViaThinkSoft Intermediate Code Signing Certificate Authority" "%EXE%" |
echo Fertig! |
pause. |
cls |
exit |
/trunk/Delphi/texteditor.dfm |
---|
0,0 → 1,90 |
object MDITextEditor: TMDITextEditor |
Left = 255 |
Top = 367 |
Width = 347 |
Height = 180 |
Caption = 'Text-Editor' |
Color = clBtnFace |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'Tahoma' |
Font.Style = [] |
FormStyle = fsMDIChild |
Menu = MainMenu1 |
OldCreateOrder = False |
Position = poDefault |
Visible = True |
OnClose = FormClose |
OnCloseQuery = FormCloseQuery |
OnShow = FormShow |
PixelsPerInch = 96 |
TextHeight = 13 |
object Memo1: TMemo |
Left = 0 |
Top = 0 |
Width = 339 |
Height = 134 |
Align = alClient |
Font.Charset = DEFAULT_CHARSET |
Font.Color = clWindowText |
Font.Height = -11 |
Font.Name = 'MS Sans Serif' |
Font.Style = [] |
ParentFont = False |
ScrollBars = ssVertical |
TabOrder = 0 |
OnChange = Memo1Change |
end |
object MainMenu1: TMainMenu |
Images = MainForm.ImageList2 |
Left = 8 |
Top = 8 |
object Document1: TMenuItem |
Caption = '&Datensatz' |
GroupIndex = 5 |
object Save: TMenuItem |
Caption = 'Text abspeichern' |
GroupIndex = 1 |
ImageIndex = 8 |
ShortCut = 16467 |
OnClick = SaveClick |
end |
object N2: TMenuItem |
Caption = '-' |
GroupIndex = 1 |
end |
object ExternalOpen: TMenuItem |
Caption = 'Mit &externem Programm '#246'ffnen' |
GroupIndex = 1 |
ImageIndex = 22 |
ShortCut = 121 |
OnClick = ExternalOpenClick |
end |
object Delete: TMenuItem |
Caption = 'Datensatz &l'#246'schen...' |
GroupIndex = 1 |
ImageIndex = 5 |
ShortCut = 16392 |
OnClick = DeleteClick |
end |
object N4: TMenuItem |
Caption = '-' |
GroupIndex = 1 |
end |
object DocumentClose1: TMenuItem |
Caption = '&Schlie'#223'en' |
GroupIndex = 1 |
ImageIndex = 20 |
ShortCut = 27 |
OnClick = DocumentClose1Click |
end |
end |
end |
object AutoSaveTimer: TTimer |
Interval = 10000 |
OnTimer = AutoSaveTimerTimer |
Left = 40 |
Top = 8 |
end |
end |
/trunk/Delphi/texteditor.pas |
---|
0,0 → 1,192 |
unit texteditor; |
interface |
uses |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
Dialogs, StdCtrls, Menus, ShellAPI, ExtCtrls; |
type |
TMDITextEditor = class(TForm) |
MainMenu1: TMainMenu; |
Document1: TMenuItem; |
Save: TMenuItem; |
N2: TMenuItem; |
ExternalOpen: TMenuItem; |
Delete: TMenuItem; |
N4: TMenuItem; |
DocumentClose1: TMenuItem; |
Memo1: TMemo; |
AutoSaveTimer: TTimer; |
procedure DocumentClose1Click(Sender: TObject); |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure FormShow(Sender: TObject); |
procedure SaveClick(Sender: TObject); |
procedure DeleteClick(Sender: TObject); |
procedure ExternalOpenClick(Sender: TObject); |
procedure Memo1Change(Sender: TObject); |
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure AutoSaveTimerTimer(Sender: TObject); |
private |
fcat: string; |
fprefix: string; |
fautosave: boolean; |
changed: boolean; |
function DoSave: boolean; |
procedure UpdateCaption; |
public |
property folder: string read fprefix; |
property cat: string read fcat; |
property autosave: boolean read fautosave; |
constructor Create(AOwner: TComponent; Folder, Category: string); reintroduce; |
end; |
var |
MDITextEditor: TMDITextEditor; |
implementation |
{$R *.dfm} |
uses |
main, categories, global; |
constructor TMDITextEditor.Create(AOwner: TComponent; Folder, Category: string); |
begin |
inherited Create(AOwner); |
fautosave := true; |
fcat := category; |
fprefix := MyAddTrailingPathDelimiter(folder); |
end; |
procedure TMDITextEditor.DeleteClick(Sender: TObject); |
var |
fn: string; |
i: integer; |
begin |
fn := getTextFileName(folder, cat); |
if commonDelete(fn) then |
begin |
Close; |
// TODO: Eigentlich sollte das innerhalb von commonDelete() stattfinden |
for i := Screen.FormCount - 1 downto 0 do |
begin |
if Screen.Forms[i] is TMDICategories then |
begin |
TMDICategories(Screen.Forms[i]).DeleteNode(folder, cat); |
end |
end; |
end; |
end; |
procedure TMDITextEditor.DocumentClose1Click(Sender: TObject); |
begin |
Close; |
end; |
function TMDITextEditor.DoSave: boolean; |
begin |
//if changed then |
//begin |
result := true; |
AddToJournal(Format(lng_jnl_textchange, [folder + cat])); |
try |
Memo1.Lines.SaveToFile(getTextFileName(folder, cat)); |
except |
result := false; |
end; |
changed := false; |
AutoSaveTimer.Enabled := false; |
UpdateCaption; |
//end |
//else result := true; |
end; |
procedure TMDITextEditor.ExternalOpenClick(Sender: TObject); |
var |
fn: string; |
begin |
fn := getTextFileName(folder, cat); |
commonExternalOpen(fn); |
end; |
procedure TMDITextEditor.FormClose(Sender: TObject; var Action: TCloseAction); |
begin |
Action := caFree; |
end; |
procedure TMDITextEditor.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
var |
userResponse: integer; |
begin |
if changed then |
begin |
if not AUTOSAVE then |
begin |
BringToFront; |
WindowState := wsNormal; |
userResponse := MessageDlg(Format(lng_savefirst, [folder + cat]), |
mtConfirmation, mbYesNoCancel, 0); |
case userResponse of |
idYes: CanClose := DoSave; |
idNo: CanClose := true; |
idCancel: begin |
CanClose := false; |
Exit; |
end; |
end; |
end |
else |
CanClose := DoSave; |
end; |
end; |
procedure TMDITextEditor.FormShow(Sender: TObject); |
begin |
Memo1.Lines.Clear; |
Memo1.Lines.LoadFromFile(getTextFileName(folder, cat)); |
changed := false; |
AutoSaveTimer.Enabled := false; |
UpdateCaption; |
Memo1.SetFocus; |
end; |
procedure TMDITextEditor.Memo1Change(Sender: TObject); |
begin |
changed := true; |
AutoSaveTimer.Enabled := true; |
UpdateCaption; |
end; |
procedure TMDITextEditor.SaveClick(Sender: TObject); |
begin |
DoSave; |
end; |
procedure TMDITextEditor.AutoSaveTimerTimer(Sender: TObject); |
begin |
if AUTOSAVE and Changed then |
begin |
DoSave; |
end; |
end; |
procedure TMDITextEditor.UpdateCaption; |
var |
capname: string; |
begin |
capname := Format(lng_texteditor_title, [folder + cat]); |
if changed then capname := capname + ' *'; |
if Caption <> capname then Caption := capname; // Kein Aufblitzen |
end; |
end. |