Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaukrt committed Dec 27, 2022
0 parents commit fc2fdf0
Show file tree
Hide file tree
Showing 21 changed files with 6,055 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.cfg
*.dcu
*.exe
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2006 Tomas Paukrt

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Version history

## 1.0.0 (2022-12-27)

* Initial release
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Home Designer

## Introduction

The Home Designer is a single-purpose application for choosing
the color combination of a house facade. Color shades can be
assigned to up to five separate layers with adjustable transparency.

## Prerequisites

* Delphi 6

## Directory structure

```
HDesigner
|
|--bin Directory with built executable files
|
|--demo Directory with demo images
|
|--source Directory with source files
|
|--temp Directory with compiled unit files
|
|--LICENSE BSD 3-clause license
|--NEWS.md Version history
+--README.md This file
```

## License

The code is available under the BSD 3-clause license.
See the `LICENSE` file for the full license text.
Empty file added bin/.placeholder
Empty file.
Binary file added demo/house.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions source/HDesigner.dof
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[FileVersion]
Version=6.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=1
K=0
L=1
M=0
N=1
O=1
P=1
Q=1
R=1
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=..\bin
UnitOutputDir=..\temp
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=..\temp
Packages=VCL50;VCLX50;VCLSMP50;VCLDB50;VCLADO50;VCLBDE50;VCLDBX50;QRPT50;TEEUI50;TEEDB50;TEE50;DSS50;TEEQR50;VCLIB50;VCLMID50;VCLIE50;INETDB50;INET50;NMFAST50;WEBMID50;dclocx50;dclaxserver50
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Version Info]
IncludeVerInfo=1
AutoIncBuild=1
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1029
CodePage=1250
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=Home Designer
ProductVersion=1.0.0.0
Comments=
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=1
Item0=..\temp
[HistoryLists\hlUnitOutputDirectory]
Count=1
Item0=..\temp
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=..\bin
26 changes: 26 additions & 0 deletions source/HDesigner.dpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (C) 2006 Tomas Paukrt

program HDesigner;

uses
Forms,
uMain in 'uMain.pas' {FormMain},
uAbout in 'uAbout.pas' {FormAbout},
uArea in 'uArea.pas' {FormArea},
uColor in 'uColor.pas' {FormColor},
uSetup in 'uSetup.pas' {FormSetup},
uConfig in 'uConfig.pas';

{$R *.RES}

begin
Application.Initialize;
Application.Title := 'Home Designer';
Application.CreateForm(TFormMain, FormMain);
Application.CreateForm(TFormAbout, FormAbout);
Application.CreateForm(TFormArea, FormArea);
Application.CreateForm(TFormColor, FormColor);
Application.CreateForm(TFormSetup, FormSetup);
Application.Run;
end.
Binary file added source/HDesigner.res
Binary file not shown.
68 changes: 68 additions & 0 deletions source/uAbout.dfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
object FormAbout: TFormAbout
Left = 230
Top = 174
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'About'
ClientHeight = 126
ClientWidth = 216
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
KeyPreview = True
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
object btnOK: TButton
Left = 72
Top = 92
Width = 75
Height = 25
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 0
end
object GroupBox: TGroupBox
Left = 8
Top = 8
Width = 201
Height = 73
TabOrder = 1
object lbName: TLabel
Left = 16
Top = 16
Width = 166
Height = 27
Alignment = taCenter
Caption = 'Home Designer'
Font.Charset = ANSI_CHARSET
Font.Color = clNavy
Font.Height = -24
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object lbVersion: TLabel
Left = 16
Top = 48
Width = 169
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'version A.B.C'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
end
end
110 changes: 110 additions & 0 deletions source/uAbout.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (C) 2006 Tomas Paukrt

unit uAbout;

interface

uses
Windows, Forms, Classes, Controls, StdCtrls, SysUtils;

// *****************************************************************************
// *****************************************************************************

type
TFormAbout = class(TForm)
GroupBox : TGroupBox;
lbName : TLabel;
lbVersion : TLabel;
//
btnOK : TButton;
//
procedure FormKeyPress(Sender : TObject; var Key : Char);
procedure FormCreate(Sender : TObject);
public
procedure Execute();
end;

var
FormAbout : TFormAbout;

// *****************************************************************************
// *****************************************************************************

implementation

{$R *.DFM}

// *****************************************************************************
// **************************** POMOCNE FUNKCE *******************************
// *****************************************************************************

// -----------------------------------------------------------------------------
// zjisteni verze souboru (programu)
function GetFileVersion() : String;
var
Size : Cardinal;
Length : Cardinal;
Temp : Cardinal;
Buffer : Pointer;
Value : Pointer;
begin
Result := '';
Size := GetFileVersionInfoSize(PChar(Application.ExeName), Temp);
if Size > 0 then
try
GetMem(Buffer, Size);
try
GetFileVersionInfo(PChar(Application.ExeName), 0, Size, Buffer);
VerQueryValue(Buffer, '\', Value, Length);
if Assigned(Value) then
with TVSFixedFileInfo(Value^) do
Result := Format('%u.%u.%u', [HiWord(dwFileVersionMS),
LoWord(dwFileVersionMS),
HiWord(dwFileVersionLS)]);
finally
FreeMem(Buffer, Size);
end;
except
end;
end;

// *****************************************************************************
// ****************** TRIDA TFormAbout - PRIVATNI METODY *********************
// *****************************************************************************

// -----------------------------------------------------------------------------
// udalost - stisk klavesy
procedure TFormAbout.FormKeyPress(Sender : TObject; var Key : Char);
begin
if Key = Chr(VK_ESCAPE) then
Close();
end;

// -----------------------------------------------------------------------------
// udalost - vytvoreni formulare
procedure TFormAbout.FormCreate(Sender : TObject);
var
Version : String;
begin
Version := GetFileVersion();
if Version <> '' then
lbVersion.Caption := 'version ' + Version;
end;

// *****************************************************************************
// ****************** TRIDA TFormAbout - VEREJNE METODY **********************
// *****************************************************************************

// -----------------------------------------------------------------------------
// otevreni dialogu
procedure TFormAbout.Execute();
begin
Position := poMainFormCenter;
ShowModal();
end;

// *****************************************************************************
// *****************************************************************************

end.
Loading

0 comments on commit fc2fdf0

Please sign in to comment.