summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/Chess4Net/lib/TntUnicodeControls/Source/TntDBClientActns.pas
blob: 98904c73808c10fa74178f245f2220f999d5b39d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

{*****************************************************************************}
{                                                                             }
{    Tnt Delphi Unicode Controls                                              }
{      http://www.tntware.com/delphicontrols/unicode/                         }
{        Version: 2.3.0                                                       }
{                                                                             }
{    Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com)       }
{                                                                             }
{*****************************************************************************}

unit TntDBClientActns;

{$INCLUDE TntCompilers.inc}

interface

uses
  Classes, ActnList, DBClientActns, TntActnList;

type
{TNT-WARN TClientDataSetApply}
  TTntClientDataSetApply = class(TClientDataSetApply{TNT-ALLOW TClientDataSetApply}, ITntAction)
  private
    function GetCaption: WideString;
    procedure SetCaption(const Value: WideString);
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
  protected
    procedure DefineProperties(Filer: TFiler); override;
  public
    procedure Assign(Source: TPersistent); override;
  published
    property Caption: WideString read GetCaption write SetCaption;
    property Hint: WideString read GetHint write SetHint;
  end;

{TNT-WARN TClientDataSetRevert}
  TTntClientDataSetRevert = class(TClientDataSetRevert{TNT-ALLOW TClientDataSetRevert}, ITntAction)
  private
    function GetCaption: WideString;
    procedure SetCaption(const Value: WideString);
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
  protected
    procedure DefineProperties(Filer: TFiler); override;
  public
    procedure Assign(Source: TPersistent); override;
  published
    property Caption: WideString read GetCaption write SetCaption;
    property Hint: WideString read GetHint write SetHint;
  end;

{TNT-WARN TClientDataSetUndo}
  TTntClientDataSetUndo = class(TClientDataSetUndo{TNT-ALLOW TClientDataSetUndo}, ITntAction)
  private
    function GetCaption: WideString;
    procedure SetCaption(const Value: WideString);
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
  protected
    procedure DefineProperties(Filer: TFiler); override;
  public
    procedure Assign(Source: TPersistent); override;
  published
    property Caption: WideString read GetCaption write SetCaption;
    property Hint: WideString read GetHint write SetHint;
  end;

implementation

uses
  TntClasses, TntDBActns;

{TNT-IGNORE-UNIT}

procedure TntDBClientActn_AfterInherited_Assign(Action: TCustomAction{TNT-ALLOW TCustomAction}; Source: TPersistent);
begin
  TntDBActn_AfterInherited_Assign(Action, Source);
  // TClientDataSetApply
  if (Action is TClientDataSetApply) and (Source is TClientDataSetApply) then begin
    TClientDataSetApply(Action).MaxErrors := TClientDataSetApply(Source).MaxErrors;
    TClientDataSetApply(Action).DisplayErrorDlg := TClientDataSetApply(Source).DisplayErrorDlg;
  end;
  // TClientDataSetUndo
  if (Action is TClientDataSetUndo) and (Source is TClientDataSetUndo) then begin
    TClientDataSetUndo(Action).FollowChange := TClientDataSetUndo(Source).FollowChange;
  end;
end;

//-------------------------
//    TNT DB ACTNS
//-------------------------

{ TTntClientDataSetApply }

procedure TTntClientDataSetApply.Assign(Source: TPersistent);
begin
  inherited;
  TntDBClientActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntClientDataSetApply.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

function TTntClientDataSetApply.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntClientDataSetApply.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntClientDataSetApply.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntClientDataSetApply.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{ TTntClientDataSetRevert }

procedure TTntClientDataSetRevert.Assign(Source: TPersistent);
begin
  inherited;
  TntDBClientActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntClientDataSetRevert.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

function TTntClientDataSetRevert.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntClientDataSetRevert.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntClientDataSetRevert.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntClientDataSetRevert.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

{ TTntClientDataSetUndo }

procedure TTntClientDataSetUndo.Assign(Source: TPersistent);
begin
  inherited;
  TntDBClientActn_AfterInherited_Assign(Self, Source);
end;

procedure TTntClientDataSetUndo.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

function TTntClientDataSetUndo.GetCaption: WideString;
begin
  Result := TntAction_GetCaption(Self);
end;

procedure TTntClientDataSetUndo.SetCaption(const Value: WideString);
begin
  TntAction_SetCaption(Self, Value);
end;

function TTntClientDataSetUndo.GetHint: WideString;
begin
  Result := TntAction_GetHint(Self);
end;

procedure TTntClientDataSetUndo.SetHint(const Value: WideString);
begin
  TntAction_SetHint(Self, Value);
end;

end.