Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/* XPM */
static char *DBCalcEdit[]={
"24 24 8 1",
"e c #000000",
"f c #000080",
"c c #008080",
"d c #00ffff",
". c #808000",
"# c #808080",
"a c #c0c0c0",
"b c #ffffff",
"........................",
".###############........",
".#a#baaaabaaaaa#........",
".###############........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaabb#........",
".#a#bbbbabbbbbb#........",
".#b#baababaaaab#........",
".#a#bbbcccccccccccccc...",
".#####cbdbdbdbdbdbdbce..",
"......cdeeeeeeeeccccfe..",
"......cbebbbbbbaccccfe..",
"......cdeaaaaaaaccccfe..",
"......cbccccccccccccfe..",
"......cdcebebebebebefe..",
"......cbccccccccccccfe..",
"......cdcebebebebbaefe..",
"......cbccccccccccccfe..",
"......ccfffffffffffffe..",
".......eeeeeeeeeeeeee...",
"........................",
"........................"};

View File

@@ -0,0 +1,230 @@
{ rxdbgrid_columsunit unit
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version with the following modification:
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a
module which is not derived from or based on this library. If you modify
this library, you may extend this exception to your version of the library,
but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit rxdbgrid_columsunit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, CheckLst,
StdCtrls, Buttons, ButtonPanel, Grids, rxdbgrid;
type
{ TrxDBGridColumsForm }
TrxDBGridColumsForm = class(TForm)
btnApply: TBitBtn;
ButtonPanel1: TButtonPanel;
sbUp: TSpeedButton;
sbDown: TSpeedButton;
StringGrid1: TStringGrid;
procedure btnApplyClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure sbUpClick(Sender: TObject);
procedure sbDownClick(Sender: TObject);
procedure StringGrid1Click(Sender: TObject);
procedure StringGrid1ValidateEntry(sender: TObject; aCol, aRow: Integer;
const OldValue: string; var NewValue: String);
private
FGrid:TRxDBGrid;
procedure SetGrid(AGrid:TRxDBGrid);
procedure SetGridColumnsParams;
public
{ public declarations }
end;
procedure ShowRxDBGridColumsForm(Grid:TRxDBGrid);
implementation
uses rxdconst, math;
{$R *.lfm}
procedure ShowRxDBGridColumsForm(Grid: TRxDBGrid);
var
rxDBGridColumsForm: TrxDBGridColumsForm;
begin
rxDBGridColumsForm:=TrxDBGridColumsForm.Create(Application);
rxDBGridColumsForm.SetGrid(Grid);
if rxDBGridColumsForm.ShowModal = mrOk then
begin
if Assigned(Grid) then
rxDBGridColumsForm.SetGridColumnsParams;
end;
rxDBGridColumsForm.Free;
end;
{ TrxDBGridColumsForm }
procedure TrxDBGridColumsForm.FormCreate(Sender: TObject);
begin
sbUp.AnchorSideLeft.Control:=ButtonPanel1.HelpButton;
sbUp.AnchorSideTop.Control:=ButtonPanel1.HelpButton;
sbUp.AnchorSideBottom.Control:=ButtonPanel1.HelpButton;
btnApply.AnchorSideTop.Control:=ButtonPanel1.OKButton;
btnApply.AnchorSideBottom.Control:=ButtonPanel1.OKButton;
{$IFDEF UNIX}
btnApply.AnchorSideRight.Control:=ButtonPanel1.CancelButton;
{$ELSE}
btnApply.AnchorSideRight.Control:=ButtonPanel1.OKButton;
{$ENDIF}
Caption:=sRxDbGridSelColCaption;
sbUp.Hint:=sRxDbGridSelColHint1;
sbDown.Hint:=sRxDbGridSelColHint2;
btnApply.Caption:=sRxDbGridSelApplyCaption;
btnApply.Hint:=sRxDbGridSelApplyHint;
end;
procedure TrxDBGridColumsForm.btnApplyClick(Sender: TObject);
begin
SetGridColumnsParams;
end;
procedure TrxDBGridColumsForm.sbUpClick(Sender: TObject);
var
S, W, C:string;
begin
if (StringGrid1.RowCount > 1) and (StringGrid1.Row > 1) then
begin
C:=StringGrid1.Cells[0, StringGrid1.Row-1];
S:=StringGrid1.Cells[1, StringGrid1.Row-1];
W:=StringGrid1.Cells[2, StringGrid1.Row-1];
StringGrid1.Cells[0, StringGrid1.Row-1]:=StringGrid1.Cells[0, StringGrid1.Row];
StringGrid1.Cells[1, StringGrid1.Row-1]:=StringGrid1.Cells[1, StringGrid1.Row];
StringGrid1.Cells[2, StringGrid1.Row-1]:=StringGrid1.Cells[2, StringGrid1.Row];
StringGrid1.Cells[0, StringGrid1.Row]:=C;
StringGrid1.Cells[1, StringGrid1.Row]:=S;
StringGrid1.Cells[2, StringGrid1.Row]:=W;
StringGrid1.Row:=StringGrid1.Row-1;
end;
end;
procedure TrxDBGridColumsForm.sbDownClick(Sender: TObject);
var
S, W, C:string;
i:integer;
begin
if (StringGrid1.RowCount > 1) and (StringGrid1.Row < StringGrid1.RowCount - 1) then
begin
C:=StringGrid1.Cells[0, StringGrid1.Row+1];
S:=StringGrid1.Cells[1, StringGrid1.Row+1];
W:=StringGrid1.Cells[2, StringGrid1.Row+1];
StringGrid1.Cells[0, StringGrid1.Row+1]:=StringGrid1.Cells[0, StringGrid1.Row];
StringGrid1.Cells[1, StringGrid1.Row+1]:=StringGrid1.Cells[1, StringGrid1.Row];
StringGrid1.Cells[2, StringGrid1.Row+1]:=StringGrid1.Cells[2, StringGrid1.Row];
StringGrid1.Cells[0, StringGrid1.Row]:=C;
StringGrid1.Cells[1, StringGrid1.Row]:=S;
StringGrid1.Cells[2, StringGrid1.Row]:=W;
StringGrid1.Row:=StringGrid1.Row+1;
end;
end;
procedure TrxDBGridColumsForm.StringGrid1Click(Sender: TObject);
var
i:integer;
C:TRxColumn;
begin
i:=StringGrid1.Row;
C:=FGrid.ColumnByCaption(StringGrid1.Cells[1, i]);
if coCustomizeVisible in C.Options then
StringGrid1.Options:=StringGrid1.Options + [goEditing]
else
StringGrid1.Options:=StringGrid1.Options - [goEditing]
;
end;
procedure TrxDBGridColumsForm.StringGrid1ValidateEntry(sender: TObject; aCol,
aRow: Integer; const OldValue: string; var NewValue: String);
begin
if aCol = 2 then
NewValue:=IntToStr(Max(StrToIntDef(NewValue, StrToIntDef(OldValue, 0)), 0));
end;
procedure TrxDBGridColumsForm.SetGrid(AGrid: TRxDBGrid);
var
i:integer;
C:TRxColumn;
begin
if AGrid=FGrid then exit;
FGrid:=AGrid;
if Assigned(AGrid) then
begin
StringGrid1.RowCount:=AGrid.Columns.Count + 1;
for i:=0 to AGrid.Columns.Count-1 do
begin
C:=AGrid.Columns[i] as TRxColumn;
StringGrid1.Cells[0, i + 1]:=BoolToStr(C.Visible, '1', '0');
StringGrid1.Cells[1, i + 1]:=C.Title.Caption;
if C.Width = 0 then
StringGrid1.Cells[2, i + 1]:=IntToStr(AGrid.DefaultColWidth)
else
StringGrid1.Cells[2, i + 1]:=IntToStr(C.Width);
end;
end
else
StringGrid1.RowCount:=1;
end;
procedure TrxDBGridColumsForm.SetGridColumnsParams;
var
i:integer;
Col:TRxColumn;
begin
for i:=1 to StringGrid1.RowCount-1 do
begin
Col:=FGrid.ColumnByCaption(StringGrid1.Cells[1, i]);
if Assigned(Col) then
begin
Col.Visible:=StringGrid1.Cells[0, i] = '1';
Col.Index:=i-1;
Col.Width:=StrToIntDef(StringGrid1.Cells[2, i], 65);
end
end;
end;
end.

View File

@@ -0,0 +1,8 @@
del tooledit.lrs
del rxdbgrid.lrs
del tooledit.res
del rxdbgrid.res
..\..\..\..\tools\lazres.exe tooledit.res picDateEdit.png
..\..\..\..\tools\lazres.exe rxdbgrid.res rx_markerdown.png rx_markerup.png rx_DropDown.png rx_Ellipsis.png rx_Glyph.png rx_minus.png rx_plus.png rx_UpDown.png rx_menu_grid.png

View File

@@ -0,0 +1,100 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, rxtoolbar, RxIniPropStorage, RxAboutDialog, ActnList,
Menus;
type
{ TMainForm }
TMainForm = class(TForm)
actExit: TAction;
actSysMenu: TAction;
BitBtn1: TBitBtn;
MenuItem10: TMenuItem;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
MenuItem13: TMenuItem;
MenuItem6: TMenuItem;
MenuItem7: TMenuItem;
PopupMenu2: TPopupMenu;
RxAboutDialog1: TRxAboutDialog;
RxIniPropStorage1: TRxIniPropStorage;
SpeedButton1: TSpeedButton;
sysAbout: TAction;
actNew: TAction;
actNext: TAction;
actPrior: TAction;
actCustom: TAction;
ActionList1: TActionList;
ImageList1: TImageList;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
PopupMenu1: TPopupMenu;
ToolPanel1: TToolPanel;
procedure Action1Execute(Sender: TObject);
procedure actCustomExecute(Sender: TObject);
procedure actExitExecute(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure sysAboutExecute(Sender: TObject);
private
//
public
{ public declarations }
end;
var
MainForm: TMainForm;
implementation
uses rxShortCutUnit;
{$R *.lfm}
{ TMainForm }
procedure TMainForm.Action1Execute(Sender: TObject);
begin
ShowMessage('Hi');
end;
procedure TMainForm.actCustomExecute(Sender: TObject);
begin
ToolPanel1.Customize(0);
end;
procedure TMainForm.actExitExecute(Sender: TObject);
begin
Close;
end;
procedure TMainForm.BitBtn1Click(Sender: TObject);
var
A: TShortCut;
begin
A:=sysAbout.ShortCut;
if RxSelectShortCut(A) then
sysAbout.ShortCut:=A;
end;
procedure TMainForm.sysAboutExecute(Sender: TObject);
begin
RxAboutDialog1.Execute;
end;
end.

View File

@@ -0,0 +1,38 @@
/* XPM */
static char *TSECRETPANEL[]={
"24 24 11 1",
". c None",
"# c #000000",
"d c #000080",
"i c #0000ff",
"e c #008000",
"g c #800000",
"a c #808080",
"b c #c0c0c0",
"h c #ff0000",
"f c #ffff00",
"c c #ffffff",
"........................",
"........................",
".######################.",
".#aaaaaaaaaaaaaaaaaaab#.",
".#aaaaaaaaaaaaaaaaaacc#.",
".#aabbbbbbbbbbbbbbbbcc#.",
".#aabbbbbd#dbbbbbbbbcc#.",
".#aabbbbdefedbbbbbbbcc#.",
".#aabbbb#fff#aabbbbbcc#.",
".#aabbbbdefedbb##bbbcc#.",
".#aabbbbbd#dbbbggbbbcc#.",
".#aabbbbabbbbb#hh#bbcc#.",
".#aabbbbabbbbb#hh#bbcc#.",
".#aabb#####bb#hhhh#bcc#.",
".#aabb#iii#bb######bcc#.",
".#aabb#iii#aabbbbbbbcc#.",
".#aabb#iii#bbbbbbbbbcc#.",
".#aabb#####bbbbbbbbbcc#.",
".#aabbbbbbbbbbbbbbbbcc#.",
".#accccccccccccccccccc#.",
".#bccccccccccccccccccc#.",
".######################.",
"........................",
"........................"};

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="10"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="project1"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="4">
<Item1>
<PackageName Value="rxdbgrid_export_spreadsheet"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
</Item2>
<Item3>
<PackageName Value="rxnew"/>
</Item3>
<Item4>
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>