bugfixes and new features
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="10"/>
|
<Version Value="11"/>
|
||||||
<General>
|
<General>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
@@ -17,9 +17,10 @@
|
|||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<FormatVersion Value="2"/>
|
||||||
<FormatVersion Value="1"/>
|
<Modes Count="1">
|
||||||
</local>
|
<Mode0 Name="default"/>
|
||||||
|
</Modes>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="1">
|
<RequiredPackages Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<Version Value="10"/>
|
<Version Value="11"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="15">
|
<Units Count="16">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="Belegscanner.lpr"/>
|
<Filename Value="Belegscanner.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="17" Y="10"/>
|
<CursorPos X="17" Y="10"/>
|
||||||
<UsageCount Value="32"/>
|
<UsageCount Value="36"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="304"/>
|
<TopLine Value="374"/>
|
||||||
<CursorPos X="30" Y="358"/>
|
<CursorPos X="45" Y="377"/>
|
||||||
<UsageCount Value="32"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
<Unit9>
|
<Unit9>
|
||||||
<Filename Value="/usr/share/fpcsrc/3.0.4/rtl/objpas/classes/classesh.inc"/>
|
<Filename Value="/usr/share/fpcsrc/3.0.4/rtl/objpas/classes/classesh.inc"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="1834"/>
|
<TopLine Value="647"/>
|
||||||
<CursorPos X="14" Y="1873"/>
|
<CursorPos X="14" Y="681"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
@@ -122,128 +122,139 @@
|
|||||||
<CursorPos X="14" Y="1696"/>
|
<CursorPos X="14" Y="1696"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit14>
|
</Unit14>
|
||||||
|
<Unit15>
|
||||||
|
<Filename Value="/usr/lib/lazarus/2.0.6/components/lazutils/laztracer.pas"/>
|
||||||
|
<UnitName Value="LazTracer"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<CursorPos Y="50"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit15>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="133" Column="107" TopLine="46"/>
|
<Caret Line="207" Column="21" TopLine="173"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="238" Column="49" TopLine="228"/>
|
<Caret Line="215" Column="22" TopLine="175"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="153" Column="3" TopLine="151"/>
|
<Caret Line="207" Column="82" TopLine="175"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" Column="15" TopLine="133"/>
|
<Caret Line="62" Column="42" TopLine="29"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="167" Column="7" TopLine="133"/>
|
<Caret Line="60" Column="61" TopLine="27"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" Column="11" TopLine="134"/>
|
<Caret Line="62" Column="42" TopLine="29"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="196" Column="66" TopLine="189"/>
|
<Caret Line="432" Column="5" TopLine="364"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="363" Column="97" TopLine="302"/>
|
<Caret Line="62" Column="42" TopLine="29"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="131" Column="24" TopLine="97"/>
|
<Caret Line="56" Column="40" TopLine="27"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="363" Column="97" TopLine="302"/>
|
<Caret Line="62" Column="32" TopLine="29"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="131" Column="24"/>
|
<Caret Line="59" Column="37" TopLine="27"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="238" Column="3" TopLine="231"/>
|
<Caret Line="203" Column="45" TopLine="187"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="153" Column="3" TopLine="151"/>
|
<Caret Line="62" Column="39" TopLine="19"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" Column="31" TopLine="161"/>
|
<Caret Line="208" Column="13" TopLine="174"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="150" Column="49" TopLine="134"/>
|
<Caret Line="213" Column="13" TopLine="174"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" Column="26" TopLine="134"/>
|
<Caret Line="206" Column="19" TopLine="176"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="242" Column="18" TopLine="230"/>
|
<Caret Line="214" Column="42" TopLine="177"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="188" Column="3" TopLine="184"/>
|
<Caret Line="217" Column="93" TopLine="177"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="310" Column="48" TopLine="301"/>
|
<Caret Line="219" Column="65" TopLine="183"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="224" Column="29" TopLine="190"/>
|
<Caret Line="204" Column="117" TopLine="186"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="188" Column="3" TopLine="184"/>
|
<Caret Line="203" Column="117" TopLine="203"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="365" Column="45" TopLine="301"/>
|
<Caret Line="204" Column="117" TopLine="204"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="357" Column="33" TopLine="301"/>
|
<Caret Line="403" Column="63" TopLine="365"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret TopLine="109"/>
|
<Caret Line="376" Column="32" TopLine="320"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="237" Column="3" TopLine="230"/>
|
<Caret Line="382" Column="24" TopLine="320"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="153" Column="3" TopLine="151"/>
|
<Caret Line="21" Column="19"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" Column="8" TopLine="161"/>
|
<Caret Line="100" Column="26" TopLine="34"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="318" Column="172" TopLine="302"/>
|
<Caret Line="382" Column="24" TopLine="316"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="168" TopLine="134"/>
|
<Caret Line="21" Column="19"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="scanner.pas"/>
|
<Filename Value="scanner.pas"/>
|
||||||
<Caret Line="358" Column="28" TopLine="302"/>
|
<Caret Line="116" Column="134" TopLine="67"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes Count="0" ActiveMode="default"/>
|
||||||
|
</RunParams>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
|||||||
BIN
Belegscanner.res
BIN
Belegscanner.res
Binary file not shown.
59
scanner.lfm
59
scanner.lfm
@@ -7,48 +7,51 @@ object ScanForm: TScanForm
|
|||||||
ClientHeight = 880
|
ClientHeight = 880
|
||||||
ClientWidth = 1188
|
ClientWidth = 1188
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '1.8.2.0'
|
LCLVersion = '2.0.6.0'
|
||||||
object TypeSelector: TComboBox
|
object TypeSelector: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 208
|
Top = 208
|
||||||
Width = 276
|
Width = 276
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = TypeSelectorChange
|
OnChange = TypeSelectorChange
|
||||||
|
OnKeyDown = ComboKey
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Text = 'Select Type'
|
Text = 'Herkunft'
|
||||||
end
|
end
|
||||||
object Origin: TComboBox
|
object Origin: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 240
|
Top = 240
|
||||||
Width = 272
|
Width = 272
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = OriginChange
|
OnChange = OriginChange
|
||||||
|
OnKeyDown = ComboKey
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Text = 'Start'
|
Text = 'Start'
|
||||||
end
|
end
|
||||||
object Destination: TComboBox
|
object Destination: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 304
|
Top = 304
|
||||||
Width = 272
|
Width = 272
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = DestinationChange
|
OnChange = DestinationChange
|
||||||
|
OnKeyDown = ComboKey
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
Text = 'Ziel'
|
Text = 'Ziel'
|
||||||
end
|
end
|
||||||
object FolderName: TLabel
|
object FolderName: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 19
|
Height = 17
|
||||||
Top = 840
|
Top = 842
|
||||||
Width = 103
|
Width = 101
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Ordnername'
|
Caption = 'Ordnername'
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
@@ -58,13 +61,14 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object Product: TComboBox
|
object Product: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 240
|
Top = 240
|
||||||
Width = 276
|
Width = 276
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = ProductChange
|
OnChange = ProductChange
|
||||||
|
OnKeyDown = ComboKey
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Text = 'Produkt'
|
Text = 'Produkt'
|
||||||
Visible = False
|
Visible = False
|
||||||
@@ -82,7 +86,7 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object Resolution: TComboBox
|
object Resolution: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 368
|
Top = 368
|
||||||
Width = 72
|
Width = 72
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@@ -97,7 +101,7 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object DPI: TLabel
|
object DPI: TLabel
|
||||||
Left = 984
|
Left = 984
|
||||||
Height = 16
|
Height = 14
|
||||||
Top = 376
|
Top = 376
|
||||||
Width = 19
|
Width = 19
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@@ -106,9 +110,9 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object BaseFolder: TLabel
|
object BaseFolder: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 19
|
Height = 17
|
||||||
Top = 816
|
Top = 818
|
||||||
Width = 88
|
Width = 89
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'BaseFolder'
|
Caption = 'BaseFolder'
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
@@ -119,13 +123,14 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object Stop: TComboBox
|
object Stop: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 272
|
Top = 272
|
||||||
Width = 272
|
Width = 272
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = StopChange
|
OnChange = StopChange
|
||||||
|
OnKeyDown = ComboKey
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = 'Zwischenhalt'
|
Text = 'Zwischenhalt'
|
||||||
end
|
end
|
||||||
@@ -150,7 +155,7 @@ object ScanForm: TScanForm
|
|||||||
end
|
end
|
||||||
object PicSize: TComboBox
|
object PicSize: TComboBox
|
||||||
Left = 904
|
Left = 904
|
||||||
Height = 28
|
Height = 27
|
||||||
Top = 336
|
Top = 336
|
||||||
Width = 272
|
Width = 272
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@@ -192,6 +197,28 @@ object ScanForm: TScanForm
|
|||||||
OnClick = extButtonClick
|
OnClick = extButtonClick
|
||||||
TabOrder = 11
|
TabOrder = 11
|
||||||
end
|
end
|
||||||
|
object dropBtn: TButton
|
||||||
|
Left = 904
|
||||||
|
Height = 49
|
||||||
|
Top = 512
|
||||||
|
Width = 272
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Datensatz löschen'
|
||||||
|
OnClick = dropBtnClick
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
object OpenDir: TButton
|
||||||
|
Left = 904
|
||||||
|
Height = 32
|
||||||
|
Top = 744
|
||||||
|
Width = 276
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Ordner öffnen'
|
||||||
|
OnClick = OpenDirClick
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 13
|
||||||
|
end
|
||||||
object BaseFolderDialog: TSelectDirectoryDialog
|
object BaseFolderDialog: TSelectDirectoryDialog
|
||||||
left = 520
|
left = 520
|
||||||
top = 128
|
top = 128
|
||||||
|
|||||||
152
scanner.pas
152
scanner.pas
@@ -25,6 +25,8 @@ type
|
|||||||
|
|
||||||
{ TScanForm }
|
{ TScanForm }
|
||||||
TScanForm = class(TForm)
|
TScanForm = class(TForm)
|
||||||
|
dropBtn: TButton;
|
||||||
|
OpenDir: TButton;
|
||||||
extButton: TButton;
|
extButton: TButton;
|
||||||
Swap: TButton;
|
Swap: TButton;
|
||||||
DropButton: TButton;
|
DropButton: TButton;
|
||||||
@@ -44,10 +46,12 @@ type
|
|||||||
TypeSelector: TComboBox;
|
TypeSelector: TComboBox;
|
||||||
|
|
||||||
procedure BaseFolderClick(Sender: TObject);
|
procedure BaseFolderClick(Sender: TObject);
|
||||||
|
procedure dropBtnClick(Sender: TObject);
|
||||||
procedure extButtonClick(Sender: TObject);
|
procedure extButtonClick(Sender: TObject);
|
||||||
procedure DropButtonClick(Sender: TObject);
|
procedure DropButtonClick(Sender: TObject);
|
||||||
procedure CalendarChange(Sender: TObject);
|
procedure CalendarChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure OpenDirClick(Sender: TObject);
|
||||||
procedure ProductChange(Sender: TObject);
|
procedure ProductChange(Sender: TObject);
|
||||||
procedure DestinationChange(Sender: TObject);
|
procedure DestinationChange(Sender: TObject);
|
||||||
procedure OriginChange(Sender: TObject);
|
procedure OriginChange(Sender: TObject);
|
||||||
@@ -57,8 +61,11 @@ type
|
|||||||
procedure TypeSelectorChange(Sender: TObject);
|
procedure TypeSelectorChange(Sender: TObject);
|
||||||
function ExportConfig(): string;
|
function ExportConfig(): string;
|
||||||
function ExportOptions(dropDown: TComboBox): string;
|
function ExportOptions(dropDown: TComboBox): string;
|
||||||
|
procedure ComboKey(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure UpdateFolder();
|
procedure UpdateFolder();
|
||||||
procedure MixLocations(d1: TComboBox; d2: TComboBox; d3: TComboBox);
|
procedure MixLocations(d1: TComboBox; d2: TComboBox; d3: TComboBox);
|
||||||
|
procedure DeleteStationFrom(combo: TComboBox; station: string; defaultName : string);
|
||||||
|
procedure DeleteStation(station : string);
|
||||||
private
|
private
|
||||||
date: TDateTime;
|
date: TDateTime;
|
||||||
function getSize(): TPoint;
|
function getSize(): TPoint;
|
||||||
@@ -161,11 +168,25 @@ end;
|
|||||||
function TScanForm.ExportOptions(dropDown: TComboBox): string;
|
function TScanForm.ExportOptions(dropDown: TComboBox): string;
|
||||||
var
|
var
|
||||||
list: TStringList;
|
list: TStringList;
|
||||||
tx: string;
|
item, current: string;
|
||||||
|
i: integer;
|
||||||
|
drop: Boolean;
|
||||||
begin
|
begin
|
||||||
// make sure the current text appears in future lists
|
// make sure the current text appears in future lists
|
||||||
tx := dropDown.Text;
|
item := dropDown.Text;
|
||||||
if (tx[1] <> ' ') then dropDown.Items.Add(tx);
|
drop := item.StartsWith(' ');
|
||||||
|
|
||||||
|
if drop then
|
||||||
|
begin
|
||||||
|
i := 0;
|
||||||
|
while i < dropDown.Items.Count do
|
||||||
|
begin
|
||||||
|
item := Trim(item);
|
||||||
|
current := Trim(dropDown.Items[i]);
|
||||||
|
if current = item then dropDown.Items.Delete(i) else i := i+1;
|
||||||
|
end;
|
||||||
|
end else dropDown.Items.Add(item);
|
||||||
|
|
||||||
// create a StringList to sort and concatenate
|
// create a StringList to sort and concatenate
|
||||||
list := TStringList.Create;
|
list := TStringList.Create;
|
||||||
list.StrictDelimiter := True;
|
list.StrictDelimiter := True;
|
||||||
@@ -181,6 +202,30 @@ begin
|
|||||||
Result := list.DelimitedText
|
Result := list.DelimitedText
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TScanForm.ComboKey(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
var
|
||||||
|
combo : TComboBox;
|
||||||
|
index : integer;
|
||||||
|
tx : string;
|
||||||
|
begin
|
||||||
|
if key = 40 then
|
||||||
|
begin
|
||||||
|
if TObject(Sender) is TComboBox then
|
||||||
|
begin
|
||||||
|
combo := TComboBox(Sender);
|
||||||
|
tx := combo.Text;
|
||||||
|
for index := 0 to combo.Items.Count-1 do
|
||||||
|
begin
|
||||||
|
if combo.Items[index].StartsWith(tx,true) then
|
||||||
|
begin
|
||||||
|
combo.ItemIndex:=index-1;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TScanForm.TypeSelectorChange(Sender: TObject);
|
procedure TScanForm.TypeSelectorChange(Sender: TObject);
|
||||||
var
|
var
|
||||||
state: boolean;
|
state: boolean;
|
||||||
@@ -276,6 +321,20 @@ begin
|
|||||||
UpdateFolder();
|
UpdateFolder();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure addItemsTo(combo: TComboBox; line: String);
|
||||||
|
var
|
||||||
|
parts: TStringArray;
|
||||||
|
fixed, part: string;
|
||||||
|
begin
|
||||||
|
parts := line.Split(',');
|
||||||
|
for part in parts do
|
||||||
|
begin
|
||||||
|
fixed := part.Replace('"','');
|
||||||
|
if (fixed <> '') then combo.Items.Add(fixed);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TScanForm.FormCreate(Sender: TObject);
|
procedure TScanForm.FormCreate(Sender: TObject);
|
||||||
var
|
var
|
||||||
filename: String;
|
filename: String;
|
||||||
@@ -297,33 +356,27 @@ begin
|
|||||||
line:=line.Substring(7);
|
line:=line.Substring(7);
|
||||||
BaseFolder.Caption:=line;
|
BaseFolder.Caption:=line;
|
||||||
end;
|
end;
|
||||||
if line.StartsWith('types:') then
|
if line.StartsWith('types:') then addItemsTo(TypeSelector,line.Substring(6));
|
||||||
begin
|
if line.StartsWith('items:') then addItemsTo(Product,line.Substring(6));
|
||||||
line := line.Substring(6);
|
if line.StartsWith('sizes:') then addItemsTo(PicSize,line.Substring(6));
|
||||||
TypeSelector.Items.AddStrings(line.Split(','));
|
|
||||||
end;
|
|
||||||
if line.StartsWith('items:') then
|
|
||||||
begin
|
|
||||||
line := line.Substring(6);
|
|
||||||
Product.Items.AddStrings(line.Split(','));
|
|
||||||
end;
|
|
||||||
if line.StartsWith('sizes:') then
|
|
||||||
begin
|
|
||||||
line := line.Substring(6);
|
|
||||||
PicSize.Items.AddStrings(line.Split(','));
|
|
||||||
end;
|
|
||||||
if line.StartsWith('locations:') then
|
if line.StartsWith('locations:') then
|
||||||
begin
|
begin
|
||||||
line := line.Substring(10);
|
line := line.Substring(10);
|
||||||
Origin.Items.AddStrings(line.Split(','));
|
addItemsTo(Origin,line);
|
||||||
Destination.Items.AddStrings(line.Split(','));
|
addItemsTo(Destination,line);
|
||||||
Stop.Items.AddStrings(line.Split(','));
|
addItemsTo(Stop,line);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
finally
|
finally
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TScanForm.OpenDirClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteLn(BaseFolder.Caption);
|
||||||
|
fpSystem('gio open "'+BaseFolder.Caption+'"');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TScanForm.BaseFolderClick(Sender: TObject);
|
procedure TScanForm.BaseFolderClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
BaseFolderDialog.FileName:=BaseFolder.Caption;
|
BaseFolderDialog.FileName:=BaseFolder.Caption;
|
||||||
@@ -331,6 +384,48 @@ begin
|
|||||||
BaseFolder.Caption := BaseFolderDialog.FileName;
|
BaseFolder.Caption := BaseFolderDialog.FileName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TScanForm.DeleteStationFrom(combo: TComboBox; station : string; defaultName : string);
|
||||||
|
var
|
||||||
|
index : integer;
|
||||||
|
begin
|
||||||
|
index := combo.Items.IndexOf(station);
|
||||||
|
if index > -1 then
|
||||||
|
begin
|
||||||
|
combo.Items.Delete(index);
|
||||||
|
combo.Text := defaultName;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScanForm.DeleteStation(station : string);
|
||||||
|
begin
|
||||||
|
DeleteStationFrom(Origin,station,'Start');
|
||||||
|
DeleteStationFrom(Stop,station,'Zwischenhalt');
|
||||||
|
DeleteStationFrom(Destination,station,'Ziel');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScanForm.dropBtnClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
tx : string;
|
||||||
|
begin
|
||||||
|
tx := TypeSelector.Text;
|
||||||
|
if (tx <> 'Herkunft') and (tx <> 'Ticket') then
|
||||||
|
begin
|
||||||
|
TypeSelector.Items.Delete(TypeSelector.ItemIndex);
|
||||||
|
TypeSelector.Text := 'Herkunft';
|
||||||
|
end;
|
||||||
|
|
||||||
|
tx := Product.Text;
|
||||||
|
if Product.Enabled and (tx <> 'Produkt') then
|
||||||
|
begin
|
||||||
|
Product.Items.Delete(Product.ItemIndex);
|
||||||
|
Product.Text := 'Produkt';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Origin.Enabled and (Origin.Text <> 'Start') then deleteStation(Origin.Text);
|
||||||
|
if Stop.Enabled and (Stop.Text <> 'Zwischenhalt') then deleteStation(Stop.Text);
|
||||||
|
if Destination.Enabled and (Destination.Text <> 'Ziel') then deleteStation(Destination.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TScanForm.extButtonClick(Sender: TObject);
|
procedure TScanForm.extButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
cmd: string;
|
cmd: string;
|
||||||
@@ -353,16 +448,11 @@ var
|
|||||||
tx: string;
|
tx: string;
|
||||||
begin
|
begin
|
||||||
tx := FormatDateTime('YYYY-MM-DD', date) + ' - ';
|
tx := FormatDateTime('YYYY-MM-DD', date) + ' - ';
|
||||||
if (Product.Enabled and (Product.Tag > 0) and not( Product.Text = '') and not (Product.Text = 'Produkt')) then
|
if (Product.Enabled and (Product.Tag > 0) and not( Product.Text = '') and not (Product.Text = 'Produkt')) then tx := tx + Trim(Product.Text) + ' von ';
|
||||||
tx := tx + Trim(Product.Text) + ' von ';
|
if (TypeSelector.Tag > 0) then tx := tx + Trim(TypeSelector.Text);
|
||||||
if (TypeSelector.Tag > 0) then
|
if (Origin.Enabled and (Origin.Tag > 0)) then tx := tx + ': ' + Trim(Origin.Text);
|
||||||
tx := tx + Trim(TypeSelector.Text);
|
if (Stop.Enabled and (Stop.Tag > 0) and not (Stop.Text = '')and not (Stop.Text = 'Zwischenhalt')) then tx := tx + ' - ' + Trim(Stop.Text);
|
||||||
if (Origin.Enabled and (Origin.Tag > 0)) then
|
if (Destination.Enabled and (Destination.Tag > 0)) then tx := tx + ' - ' + Trim(Destination.Text);
|
||||||
tx := tx + ': ' + Trim(Origin.Text);
|
|
||||||
if (Stop.Enabled and (Stop.Tag > 0) and not (Stop.Text = '')and not (Stop.Text = 'Zwischenhalt')) then
|
|
||||||
tx := tx + ' - ' + Trim(Stop.Text);
|
|
||||||
if (Destination.Enabled and (Destination.Tag > 0)) then
|
|
||||||
tx := tx + ' - ' + Trim(Destination.Text);
|
|
||||||
FolderName.Caption := tx;
|
FolderName.Caption := tx;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user