Prvni verze
This commit is contained in:
0
extCtrls/HeODefine.inc
Normal file
0
extCtrls/HeODefine.inc
Normal file
138
extCtrls/pec_TPVKusovnik.pas
Normal file
138
extCtrls/pec_TPVKusovnik.pas
Normal file
@ -0,0 +1,138 @@
|
||||
unit pec_TPVKusovnik;
|
||||
|
||||
interface
|
||||
|
||||
|
||||
uses
|
||||
VCL.Dialogs,
|
||||
plgController,
|
||||
ddPlugin_TLB;
|
||||
|
||||
type
|
||||
TplgHDCRTNTPVKusovnikController = class(TplgEditorController)
|
||||
protected
|
||||
FSKNizsi: IHeNveButtonEdit;
|
||||
FRegCisNizsi: IHeNveButtonEdit;
|
||||
{
|
||||
procedure OnClickEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnEnterEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnExitEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnEditValueChangedEventHandler (const Sender: IHeNveCustomEdit); override;
|
||||
procedure OnButtonClickEventHandler (const Sender: IHeNveButtonEdit; AButtonIndex: Integer); override;
|
||||
procedure OnChangeEventHandler (const Sender: IHeNveCustomEdit); override;
|
||||
}
|
||||
public
|
||||
procedure FormCreate; override;
|
||||
procedure FormDestroy; override;
|
||||
end;
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Variants, plgMain,
|
||||
helUtils;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.FormCreate;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
FSKNizsi:= GetButtonEdit('lciNizsi_SZ');
|
||||
FRegCisNizsi:= GetButtonEdit('lciNizsi_RegCis');
|
||||
|
||||
{
|
||||
FOrganizace:= GetButtonEdit(strBtnOrganizace);
|
||||
FMena:= GetButtonEdit('lci_gen_atr_Mena');
|
||||
|
||||
if (FOrganizace<>nil) then
|
||||
begin
|
||||
FOrganizace.NVE_Switch_OnExitEvent (self, True);
|
||||
FOrganizace.NVE_Switch_OnChangeEvent (self, True);
|
||||
FOrganizace.NVE_Switch_OnEditValueChangedEvent (self, True);
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.FormDestroy;
|
||||
begin
|
||||
// POZOR! vsechny ukazatele na interface je treba uvolnit!!!
|
||||
// jinak muze HELIOS padnout na Access Violation Error!!!
|
||||
|
||||
FSKNizsi:= nil;
|
||||
FRegCisNizsi:= nil;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnChangeEventHandler (const Sender: IHeNveCustomEdit);
|
||||
var s: string;
|
||||
begin
|
||||
if (Sender=FOrganizace) then
|
||||
begin
|
||||
s:= FOrganizace.NVE_FieldValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnClickEventHandler (const Sender: IHeNveControl);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnEnterEventHandler (const Sender: IHeNveControl);
|
||||
begin
|
||||
// ShowMessage(Sender.NVE_VisualName);
|
||||
end;
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnExitEventHandler (const Sender: IHeNveControl);
|
||||
var cOrg: integer;
|
||||
s, m: string;
|
||||
begin
|
||||
if (GetButtonEdit(Sender)=FOrganizace) then
|
||||
begin
|
||||
s:= FOrganizace.NVE_FieldValue;
|
||||
if not(TryStrToInt(s, cOrg)) then
|
||||
cOrg:= -1;
|
||||
if (cOrg>-1) then
|
||||
begin
|
||||
m:= helUtils.getHeliosStrVal (Helios, '', 'SELECT ISNULL(Mena,N'''') FROM ' + tblCOrg + ' WHERE CisloOrg=' + cOrg.ToString);
|
||||
if (m<>'') and (FMena<>nil) then
|
||||
FMena.NVE_FieldValue:= m;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnEditValueChangedEventHandler (const Sender: IHeNveCustomEdit);
|
||||
begin
|
||||
if (Sender.NVE_VisualName=strBtnOrganizace) then
|
||||
begin
|
||||
OnExitEventHandler (FOrganizace);
|
||||
// s:= (Sender as IHeNveButtonEdit).NVE_FieldValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVKusovnikController.OnButtonClickEventHandler (const Sender: IHeNveButtonEdit; AButtonIndex: Integer);
|
||||
begin
|
||||
// if (Sender=FOrganizace) then
|
||||
end;
|
||||
|
||||
}
|
||||
|
||||
end.
|
||||
128
extCtrls/pec_TPVOperace.pas
Normal file
128
extCtrls/pec_TPVOperace.pas
Normal file
@ -0,0 +1,128 @@
|
||||
unit pec_TPVOperace;
|
||||
|
||||
interface
|
||||
|
||||
|
||||
uses
|
||||
VCL.Dialogs,
|
||||
plgController,
|
||||
ddPlugin_TLB;
|
||||
|
||||
type
|
||||
TplgHDCRTNTPVOperaceController = class(TplgEditorController)
|
||||
protected
|
||||
{
|
||||
procedure OnClickEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnEnterEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnExitEventHandler (const Sender: IHeNveControl); override;
|
||||
procedure OnEditValueChangedEventHandler (const Sender: IHeNveCustomEdit); override;
|
||||
procedure OnButtonClickEventHandler (const Sender: IHeNveButtonEdit; AButtonIndex: Integer); override;
|
||||
procedure OnChangeEventHandler (const Sender: IHeNveCustomEdit); override;
|
||||
}
|
||||
public
|
||||
procedure FormCreate; override;
|
||||
procedure FormDestroy; override;
|
||||
end;
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
System.SysUtils, System.Variants, plgMain,
|
||||
helUtils;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.FormCreate;
|
||||
begin
|
||||
inherited;
|
||||
{
|
||||
FOrganizace:= GetButtonEdit(strBtnOrganizace);
|
||||
|
||||
if (FOrganizace<>nil) then
|
||||
begin
|
||||
FOrganizace.NVE_Switch_OnExitEvent (self, True);
|
||||
FOrganizace.NVE_Switch_OnChangeEvent (self, True);
|
||||
FOrganizace.NVE_Switch_OnEditValueChangedEvent (self, True);
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.FormDestroy;
|
||||
begin
|
||||
// POZOR! vsechny ukazatele na interface je treba uvolnit!!!
|
||||
// jinak muze HELIOS padnout na Access Violation Error!!!
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{
|
||||
procedure TplgHDCRTNTPVOperaceController.OnChangeEventHandler (const Sender: IHeNveCustomEdit);
|
||||
var s: string;
|
||||
begin
|
||||
if (Sender=FOrganizace) then
|
||||
begin
|
||||
s:= FOrganizace.NVE_FieldValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
procedure TplgBonumExtReseniGornicky3DObjednavkaDopravyController.OnClickEventHandler (const Sender: IHeNveControl);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.OnEnterEventHandler (const Sender: IHeNveControl);
|
||||
begin
|
||||
// ShowMessage(Sender.NVE_VisualName);
|
||||
end;
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.OnExitEventHandler (const Sender: IHeNveControl);
|
||||
var cOrg: integer;
|
||||
s, m: string;
|
||||
begin
|
||||
if (GetButtonEdit(Sender)=FOrganizace) then
|
||||
begin
|
||||
s:= FOrganizace.NVE_FieldValue;
|
||||
if not(TryStrToInt(s, cOrg)) then
|
||||
cOrg:= -1;
|
||||
if (cOrg>-1) then
|
||||
begin
|
||||
m:= helUtils.getHeliosStrVal (Helios, '', 'SELECT ISNULL(Mena,N'''') FROM ' + tblCOrg + ' WHERE CisloOrg=' + cOrg.ToString);
|
||||
if (m<>'') and (FMena<>nil) then
|
||||
FMena.NVE_FieldValue:= m;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.OnEditValueChangedEventHandler (const Sender: IHeNveCustomEdit);
|
||||
begin
|
||||
if (Sender.NVE_VisualName=strBtnOrganizace) then
|
||||
begin
|
||||
OnExitEventHandler (FOrganizace);
|
||||
// s:= (Sender as IHeNveButtonEdit).NVE_FieldValue;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TplgHDCRTNTPVOperaceController.OnButtonClickEventHandler (const Sender: IHeNveButtonEdit; AButtonIndex: Integer);
|
||||
begin
|
||||
// if (Sender=FOrganizace) then
|
||||
end;
|
||||
|
||||
}
|
||||
|
||||
end.
|
||||
158
extCtrls/plgAbout.dfm
Normal file
158
extCtrls/plgAbout.dfm
Normal file
@ -0,0 +1,158 @@
|
||||
inherited frmAbout: TfrmAbout
|
||||
Left = 269
|
||||
Top = 93
|
||||
ClientHeight = 530
|
||||
ClientWidth = 728
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnKeyDown = FormKeyDown
|
||||
ExplicitWidth = 744
|
||||
ExplicitHeight = 569
|
||||
TextHeight = 15
|
||||
object bOK: TButton
|
||||
Left = 643
|
||||
Top = 496
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
object PageControlMain: TPageControl
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 708
|
||||
Height = 470
|
||||
ActivePage = tsInfo
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
TabOrder = 1
|
||||
object tsInfo: TTabSheet
|
||||
Caption = 'tsInfo'
|
||||
DesignSize = (
|
||||
700
|
||||
440)
|
||||
object PaintBoxInfo: TPaintBox
|
||||
Left = 30
|
||||
Top = 20
|
||||
Width = 32
|
||||
Height = 32
|
||||
OnPaint = PaintBoxInfoPaint
|
||||
end
|
||||
object LV_Info: TListView
|
||||
Left = 95
|
||||
Top = 20
|
||||
Width = 593
|
||||
Height = 405
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Columns = <
|
||||
item
|
||||
Width = 200
|
||||
end
|
||||
item
|
||||
Width = 350
|
||||
end>
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
GridLines = True
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnCustomDrawItem = LV_InfoCustomDrawItem
|
||||
OnDblClick = LV_InfoDblClick
|
||||
end
|
||||
object bCopy: TButton
|
||||
Left = 10
|
||||
Top = 400
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Copy'
|
||||
TabOrder = 1
|
||||
OnClick = bCopyClick
|
||||
end
|
||||
end
|
||||
object tsLogo: TTabSheet
|
||||
Caption = 'tsLogo'
|
||||
ImageIndex = 2
|
||||
DesignSize = (
|
||||
700
|
||||
440)
|
||||
object ImageLogoAbout: TImage
|
||||
Left = 297
|
||||
Top = 168
|
||||
Width = 105
|
||||
Height = 105
|
||||
Anchors = []
|
||||
AutoSize = True
|
||||
Transparent = True
|
||||
ExplicitTop = 118
|
||||
end
|
||||
end
|
||||
object tsTechPopis: TTabSheet
|
||||
Caption = 'tsTechPopis'
|
||||
ImageIndex = 1
|
||||
object MemoTechPopis: TMemo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 700
|
||||
Height = 442
|
||||
Align = alClient
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
WantReturns = False
|
||||
end
|
||||
end
|
||||
object tsHistorieVerzi: TTabSheet
|
||||
Caption = 'tsHistorieVerzi'
|
||||
ImageIndex = 3
|
||||
object MemoHistorieVerzi: TMemo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 700
|
||||
Height = 442
|
||||
Align = alClient
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
WantReturns = False
|
||||
end
|
||||
end
|
||||
end
|
||||
object ActionList1: TActionList
|
||||
Left = 44
|
||||
Top = 99
|
||||
object A_Zalozka1: TAction
|
||||
Tag = 1
|
||||
Caption = '1'
|
||||
ShortCut = 32817
|
||||
OnExecute = A_Zalozka_X_Execute
|
||||
end
|
||||
object A_Zalozka2: TAction
|
||||
Tag = 2
|
||||
Caption = '2'
|
||||
ShortCut = 32818
|
||||
OnExecute = A_Zalozka_X_Execute
|
||||
end
|
||||
object A_Zalozka3: TAction
|
||||
Tag = 3
|
||||
Caption = '3'
|
||||
ShortCut = 32819
|
||||
OnExecute = A_Zalozka_X_Execute
|
||||
end
|
||||
object A_Zalozka4: TAction
|
||||
Tag = 4
|
||||
Caption = '4'
|
||||
ShortCut = 32820
|
||||
OnExecute = A_Zalozka_X_Execute
|
||||
end
|
||||
end
|
||||
end
|
||||
306
extCtrls/plgAbout.pas
Normal file
306
extCtrls/plgAbout.pas
Normal file
@ -0,0 +1,306 @@
|
||||
{ *************************************************************************** }
|
||||
{ }
|
||||
{ Jadro pluginu 2 Asseco Solutions }
|
||||
{ }
|
||||
{ *************************************************************************** }
|
||||
|
||||
unit plgAbout;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Controls, Forms, StdCtrls, ComCtrls, ExtCtrls, ActnList, ddPlugin_TLB, System.Actions,
|
||||
plgForm;
|
||||
|
||||
type
|
||||
TfrmAbout = class(TfrmPlgPredek)
|
||||
bOK: TButton;
|
||||
PageControlMain: TPageControl;
|
||||
tsInfo: TTabSheet;
|
||||
tsTechPopis: TTabSheet;
|
||||
LV_Info: TListView;
|
||||
PaintBoxInfo: TPaintBox;
|
||||
bCopy: TButton;
|
||||
MemoTechPopis: TMemo;
|
||||
ActionList1: TActionList;
|
||||
A_Zalozka1: TAction;
|
||||
A_Zalozka2: TAction;
|
||||
tsLogo: TTabSheet;
|
||||
ImageLogoAbout: TImage;
|
||||
A_Zalozka3: TAction;
|
||||
tsHistorieVerzi: TTabSheet;
|
||||
MemoHistorieVerzi: TMemo;
|
||||
A_Zalozka4: TAction;
|
||||
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
|
||||
procedure bCopyClick(Sender: TObject);
|
||||
procedure LV_InfoCustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
procedure PaintBoxInfoPaint(Sender: TObject);
|
||||
procedure A_Zalozka_X_Execute(Sender: TObject);
|
||||
procedure LV_InfoDblClick(Sender: TObject);
|
||||
|
||||
public
|
||||
function ShowModalEx(Helios: IHelios): TModalResult;
|
||||
end;
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
uses
|
||||
Windows, SysUtils, Menus, Graphics, plgType, plgMain, ComObj, plgDMGlob,
|
||||
ShellAPI, plgInstalace, Clipbrd;
|
||||
|
||||
const
|
||||
proTlustyRadek = Pointer(-1);
|
||||
proCervenyRadek = Pointer(-2);
|
||||
proUmisteniDLL = Pointer(-3);
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
procedure TfrmAbout.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
LV_Info.Font.Name := plgTestMSSansSerifFont(LV_Info.Font.Name);
|
||||
|
||||
bCopy.Caption := plgCtiOznam(plxJadroKopirovat);
|
||||
|
||||
tsInfo.Caption := '1 - ' + plgCtiOznam(plxJadroZakladniInformace);
|
||||
tsLogo.Caption := '2 - ' + plgCtiOznam(plxJadroLogo);
|
||||
tsTechPopis.Caption := '3 - ' + plgCtiOznam(plxJadroTechnickyPopis);
|
||||
tsHistorieVerzi.Caption := '4 - ' + plgCtiOznam(plxJadroHistorieVerzi);
|
||||
|
||||
// aby slo udelat tabulku napr. s popisem formatu importnich souboru apod.
|
||||
MemoTechPopis.Font.Name := 'Courier New';
|
||||
MemoHistorieVerzi.Font.Name := 'Courier New';
|
||||
|
||||
LV_Info.Columns[0].Caption := plgCtiOznam(plxJadroAbout_Nazev);
|
||||
LV_Info.Columns[1].Caption := plgCtiOznam(plxJadroAbout_Hodnota);
|
||||
|
||||
with TfrmInstalace.Create(nil) do
|
||||
try
|
||||
Self.ImageLogoAbout.Picture.Assign(ImageLogo.Picture);
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
|
||||
ImageLogoAbout.Left := (tsLogo.Width - ImageLogoAbout.Width) div 2;
|
||||
ImageLogoAbout.Top := (tsLogo.Height - ImageLogoAbout.Height) div 2;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.PaintBoxInfoPaint(Sender: TObject);
|
||||
begin
|
||||
DataModuleGlobPLG.ImageList32_32.Draw(PaintBoxInfo.Canvas, 0, 0, DataModuleGlobPLG.Idx.iiInfo);
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.A_Zalozka_X_Execute(Sender: TObject);
|
||||
begin
|
||||
case TAction(Sender).Tag of
|
||||
1: PageControlMain.ActivePage := tsInfo;
|
||||
2: PageControlMain.ActivePage := tsLogo;
|
||||
3: if tsTechPopis.TabVisible then
|
||||
PageControlMain.ActivePage := tsTechPopis;
|
||||
4: if tsHistorieVerzi.TabVisible then
|
||||
PageControlMain.ActivePage := tsHistorieVerzi;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.LV_InfoCustomDrawItem(Sender: TCustomListView;
|
||||
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
|
||||
begin
|
||||
if Item.Data = proTlustyRadek then
|
||||
Sender.Canvas.Font.Style := [fsBold]
|
||||
else
|
||||
if Item.Data = proCervenyRadek then
|
||||
Sender.Canvas.Font.Color := clRed;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.LV_InfoDblClick(Sender: TObject);
|
||||
var
|
||||
Cesta: String;
|
||||
begin
|
||||
if Assigned(LV_Info.Selected) and
|
||||
(LV_Info.Selected.Data = proUmisteniDLL) then
|
||||
begin
|
||||
Cesta := ExtractFileDir(LV_Info.Selected.SubItems[0]);
|
||||
if Cesta <> '' then
|
||||
ShellExecute(0, 'open', PChar(Cesta), nil, nil, SW_SHOWNORMAL);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if PageControlMain.ActivePage = tsInfo then
|
||||
begin
|
||||
// Ctrl+C nebo Ctrl+Insert
|
||||
if (ShortCut(Key, Shift) = ShortCut(ord('C'), [ssCtrl])) or
|
||||
(ShortCut(Key, Shift) = ShortCut(VK_INSERT, [ssCtrl])) then
|
||||
begin
|
||||
bCopyClick(nil);
|
||||
Key := 0;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TfrmAbout.bCopyClick(Sender: TObject);
|
||||
var
|
||||
Obsah: String;
|
||||
II: Integer;
|
||||
LI: TListItem;
|
||||
begin
|
||||
Obsah := '';
|
||||
for II := 0 to LV_Info.Items.Count-1 do
|
||||
begin
|
||||
LI := LV_Info.Items[II];
|
||||
Obsah := Format('%s'#13#10'%s'#9'%s', [Obsah, LI.Caption, LI.SubItems[0]]);
|
||||
end;
|
||||
Delete(Obsah, 1, 2); // zrus prvni CR+LF
|
||||
|
||||
Clipboard.AsText := Obsah;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TfrmAbout.ShowModalEx(Helios: IHelios): TModalResult;
|
||||
var
|
||||
PomPointer: Pointer;
|
||||
VerzeZBD, PomStr: String;
|
||||
ZmenyOK: Boolean;
|
||||
|
||||
{ +++++++++++++++++++++++++++ }
|
||||
|
||||
procedure _PridejText(const Nazev, Hodnota: String; TypRadku: Pointer = nil);
|
||||
begin
|
||||
with LV_Info.Items.Add do
|
||||
begin
|
||||
Caption := Nazev;
|
||||
SubItems.Add(Hodnota);
|
||||
Data := TypRadku;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ +++++++++++++++++++++++++++ }
|
||||
|
||||
begin
|
||||
PageControlMain.ActivePage := tsInfo;
|
||||
|
||||
Caption := Format('%s [%s]', [plgCtiOznam(plxJadroAbout_OPluginu),
|
||||
PluginKonfig.PluginVerejneJmeno]);
|
||||
|
||||
// naplneni informaci
|
||||
LV_Info.Items.BeginUpdate;
|
||||
try
|
||||
LV_Info.Items.Clear;
|
||||
|
||||
_PridejText('PLUGIN', '', proTlustyRadek);
|
||||
_PridejText(plgCtiOznam(plxJadroAbout_Nazev), PluginKonfig.PluginVerejneJmeno);
|
||||
_PridejText(plgCtiOznam(plxJadroVerze), plgVerzePluginu(jvCelaUnicode){$IFnDEF BezLadit}+' (beta)'{$ENDIF});
|
||||
|
||||
if Helios.HeVersion < PluginKonfig.PluginMinimalniPozadovanaVerzeHeliosu then
|
||||
PomPointer := proCervenyRadek
|
||||
else
|
||||
PomPointer := nil;
|
||||
_PridejText(Format(plgCtiOznam(plxJadroAbout_MinVerze_X), [Cplg_ProductName]),
|
||||
plgObecnaVerze(PluginKonfig.PluginMinimalniPozadovanaVerzeHeliosu, jvCela), PomPointer);
|
||||
|
||||
if Helios.SQLVersion < PluginKonfig.PluginMinimalniPozadovanaVerzeSQLServeru then
|
||||
PomPointer := proCervenyRadek
|
||||
else
|
||||
PomPointer := nil;
|
||||
_PridejText(plgCtiOznam(plxJadroMinVerzeSQLServeru),
|
||||
plgVerzeSQLServeru(PluginKonfig.PluginMinimalniPozadovanaVerzeSQLServeru), PomPointer);
|
||||
|
||||
PomPointer := nil;
|
||||
VerzeZBD := plgNactiVerziPluginuZDB(Helios, ZmenyOK);
|
||||
if VerzeZBD = '000000000000' then
|
||||
VerzeZBD := plgCtiOznam(plxJadroNeinstalovano)
|
||||
else
|
||||
begin
|
||||
VerzeZBD := IntToStr(StrToIntDef(Copy(VerzeZBD, 1, 2),1)) + '.' +
|
||||
IntToStr(StrToIntDef(Copy(VerzeZBD, 3, 2),0)) + '.' +
|
||||
Copy(VerzeZBD, 5, 4) + '.' +
|
||||
Copy(VerzeZBD, 9, 4);
|
||||
if ZmenyOK then
|
||||
VerzeZBD := Format('%s (%s)', [VerzeZBD, plgCtiOznam(plxOK)])
|
||||
else
|
||||
begin
|
||||
VerzeZBD := Format('%s (ERROR)', [VerzeZBD]);
|
||||
PomPointer := proCervenyRadek;
|
||||
end;
|
||||
end;
|
||||
_PridejText(plgCtiOznam(plxJadroInstalovanaVerze), VerzeZBD, PomPointer);
|
||||
|
||||
_PridejText('', '');
|
||||
_PridejText(AnsiUpperCase(plgCtiOznam(plxJadroAbout_Vyrobce)), '', proTlustyRadek);
|
||||
_PridejText(plgCtiOznam(plxJadroAbout_Vyrobce), PluginKonfig.PluginCopyrightVyrobce);
|
||||
_PridejText(plgCtiOznam(plxJadroAbout_IdentifikaceVyrobce), PluginKonfig.PartnerIdentification);
|
||||
|
||||
_PridejText('', '');
|
||||
_PridejText('PLUGIN (SYS)', '', proTlustyRadek);
|
||||
_PridejText('ClassID', GUIDToString(PluginKonfig.PluginClass_ID));
|
||||
_PridejText('SysName', PluginKonfig.PluginSystemoveJmeno);
|
||||
_PridejText('ClassName', PluginKonfig.PluginClassName);
|
||||
if PluginKonfig.PluginIdentifikator <> '' then
|
||||
PomStr := PluginKonfig.PluginIdentifikator
|
||||
else
|
||||
PomStr := plgCtiOznam(plxJadro_Nepouzito_);
|
||||
_PridejText(plgCtiOznam(plxJadroIdentifikator), PomStr);
|
||||
_PridejText(plgCtiOznam(plxJadroUmisteni), plgGetPluginPathAndName, proUmisteniDLL);
|
||||
|
||||
if Helios.HeVersion < Cplg_Jadro_MinimalniPozadovanaVerzeHeliosu then
|
||||
PomPointer := proCervenyRadek
|
||||
else
|
||||
PomPointer := nil;
|
||||
|
||||
_PridejText('', '');
|
||||
_PridejText(plgCtiOznam(plxJadroAbout_JADRO), '', proTlustyRadek);
|
||||
_PridejText(plgCtiOznam(plxJadroVerze),
|
||||
plgObecnaVerze(Cplg_VerzeJadra, jvCelaUnicode) +
|
||||
' / IHePlugin3 / ' + plgGetIndependentSQLFloat('%.1f', System.CompilerVersion));
|
||||
_PridejText(Format(plgCtiOznam(plxJadroAbout_MinVerze_X), [Cplg_ProductName]),
|
||||
plgObecnaVerze(Cplg_Jadro_MinimalniPozadovanaVerzeHeliosu, jvCela), PomPointer);
|
||||
// AJ, 8.12.2015 - Administr<74>torsk<73> podpora v HeO
|
||||
{ podpora plat<61> od uvoln<6C>n<EFBFBD> tohoto k<>du, tud<75><64> nen<65> nutn<74> <20><>dn<64> podm<64>nka, proto natvrdo }
|
||||
_PridejText(plgCtiOznam(plxJadroPodporaTicheInstalacePluginu), plgCtiOznam(plxJadroAno));
|
||||
finally
|
||||
LV_Info.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
// technicky popis
|
||||
if PluginKonfig.PluginTechnickyPopis = '' then
|
||||
tsTechPopis.TabVisible := False
|
||||
else
|
||||
MemoTechPopis.Lines.Text := PluginKonfig.PluginTechnickyPopis;
|
||||
|
||||
if PluginKonfig.PluginHistorieVerzi = '' then
|
||||
tsHistorieVerzi.TabVisible := False
|
||||
else
|
||||
MemoHistorieVerzi.Lines.Text := PluginKonfig.PluginHistorieVerzi;
|
||||
|
||||
// vlastni zobrazeni
|
||||
Result := ShowModal;
|
||||
end;
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
end.
|
||||
34
extCtrls/plgExtController.pas
Normal file
34
extCtrls/plgExtController.pas
Normal file
@ -0,0 +1,34 @@
|
||||
unit plgExtController;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
plgType, pec_TPVKusovnik, pec_TPVOperace;
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
const
|
||||
GDefiniceControlleru: array[0..2] of TplgEditorControllerDef =
|
||||
(
|
||||
// aby bylo mozno nemit zadnou definici controlleru,
|
||||
// musi zustat prvni prvek nedefinovan !!
|
||||
(FormIdent : '')
|
||||
|
||||
,(FormIdent: 'TEdKusovnikoveVazbyForm11021';
|
||||
ControllerClass: TplgHDCRTNTPVKusovnikController)
|
||||
|
||||
,(FormIdent: 'TEdPostupForm11019';
|
||||
ControllerClass: TplgHDCRTNTPVOperaceController)
|
||||
|
||||
//last
|
||||
);
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
implementation
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
end.
|
||||
110
extCtrls/plgKonfig.pas
Normal file
110
extCtrls/plgKonfig.pas
Normal file
@ -0,0 +1,110 @@
|
||||
{ *************************************************************************** }
|
||||
{ }
|
||||
{ PluginExample Asseco Solutions }
|
||||
{ }
|
||||
{ *************************************************************************** }
|
||||
|
||||
unit plgKonfig;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
plgKonfigBase, ddPlugin_TLB;
|
||||
|
||||
// ============================================================================
|
||||
// !!! Konfigurace zavisla na danem pluginu, je treba ji nastavit !!!
|
||||
// ============================================================================
|
||||
|
||||
type
|
||||
TPluginKonfig = class(TPluginKonfigBase)
|
||||
protected
|
||||
procedure NastaveniKonfigu; override;
|
||||
function GetPluginVerejneJmeno: String; override;
|
||||
function GetPluginTechnickyPopis: String; override;
|
||||
function GetPluginHistorieVerzi: String; override;
|
||||
public
|
||||
function PartnerIdentification: string; override;
|
||||
function PluginJazykoveDLL (AJazyk: Integer): string; override;
|
||||
procedure VlastniInicializacePluginu (Helios: IHelios); override;
|
||||
end;
|
||||
|
||||
{ =========================================================================== }
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, ComObj, plgType, plgMain;
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
procedure TPluginKonfig.NastaveniKonfigu;
|
||||
begin
|
||||
// !! POZOR !! Tento GUID je pouze pro plgHDCRTN !!
|
||||
FPluginClass_ID := StringToGUID('{66874F1A-0165-4366-89F7-247948CFE933}');
|
||||
|
||||
|
||||
FPluginSystemoveJmeno := 'PluginHDCRTN';
|
||||
FPluginClassName := 'run';
|
||||
FPluginMinimalniPozadovanaVerzeHeliosu := Cplg_PrvniUnicodeVerzeHeliosu;
|
||||
FPluginCopyrightVyrobce := Format('<27> 2024-%d HD Consulting s.r.o. Strakonice', [Cplg_AktualniRok]);
|
||||
FPluginIdentifikator := 'RTN';
|
||||
|
||||
FPluginMinimalniPozadovanaVerzeSQLServeru:= Cplg_SQLVersion_2019_CU24;
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TPluginKonfig.PartnerIdentification: string;
|
||||
begin
|
||||
// zde zadejte partnerskou identifikaci
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TPluginKonfig.GetPluginVerejneJmeno: String;
|
||||
begin
|
||||
Result := plgCtiOznam('Plugin Extern<72> <20>e<EFBFBD>en<65> Rootvin');
|
||||
end;
|
||||
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TPluginKonfig.GetPluginTechnickyPopis: String;
|
||||
begin
|
||||
Result := 'Plugin pro <20>e<EFBFBD>en<65> pl<70>nov<6F>n<EFBFBD> a provozu pek<65>rny (m<>ch<63>n<EFBFBD>/pe<70>en<65>/m<><6D>en<65>/balen<65>)';
|
||||
end;
|
||||
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TPluginKonfig.GetPluginHistorieVerzi: String;
|
||||
begin
|
||||
Result:= 'Historie verz<72>';
|
||||
end;
|
||||
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
function TPluginKonfig.PluginJazykoveDLL (AJazyk: Integer): string;
|
||||
begin
|
||||
case AJazyk of
|
||||
Cplg_jAnglictina,
|
||||
Cplg_jExtAnglictina: Result := 'PluginHDCRTNLng1033.DLL';
|
||||
else Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ --------------------------------------------------------------------------- }
|
||||
|
||||
procedure TPluginKonfig.VlastniInicializacePluginu (Helios: IHelios);
|
||||
begin
|
||||
// - tato procedura se vola vzdy pri spusteni externi akce !!
|
||||
// - pokud je treba udelat nejakou inicializaci pouze jednou, je treba
|
||||
// pouzit promennou, ktera bude signalizovat prvni a dalsi volani
|
||||
end;
|
||||
|
||||
{ ########################################################################### }
|
||||
|
||||
end.
|
||||
14
extCtrls/plgVerze.INC
Normal file
14
extCtrls/plgVerze.INC
Normal file
@ -0,0 +1,14 @@
|
||||
$030020250210
|
||||
{MMnnRRRRMMDD}
|
||||
|
||||
{ MM = major verze }
|
||||
{ nn = minor verze }
|
||||
{ RRRR = rok }
|
||||
{ MM = mesic }
|
||||
{ DD = den }
|
||||
|
||||
{ - cislo (hexadecimalne) verze jako typ Int64 - je v include, protoze se }
|
||||
{ externe nacita pri distribucni kompilaci pro pridani VERSION INFO do EXE }
|
||||
|
||||
{ - toto cislo MUSI byt na PRVNIM RADKU tohoto souboru a na temze }
|
||||
{ radku nesmi byt dalsi znaky (komentare apod.) }
|
||||
Reference in New Issue
Block a user