📄 swf_xml_binding.pas
字号:
procedure Set_GridPopupWidth(Value: Integer);
procedure Set_GridPopupX(Value: Integer);
procedure Set_GridPopupY(Value: Integer);
procedure Set_Name(Value: WideString);
procedure Set_WhereClause(Value: WideString);
procedure Set_RowsPerPage(Value: Integer);
procedure Set_UseCompoundColNames(Value: Boolean);
procedure Set_Icon(Value: WideString);
procedure Set_IconFilename(Value: WideString);
procedure Set_GridSortedColumns(Value: WideString);
procedure Set_FormSortedColumns(Value: WideString);
procedure Set_OrderBy(Value: WideString);
public
procedure AfterConstruction; override;
end;
{ TXMLSWF_TableType }
TXMLSWF_TableType = class(TXMLNode, IXMLSWF_TableType)
protected
{ IXMLSWF_TableType }
function Get_OrigTable: Integer;
function Get_Join_ColumnName: WideString;
function Get_Join_Width: Integer;
function Get_NM_Width: Integer;
function Get_SWF_Columns: IXMLSWF_ColumnsType;
procedure Set_OrigTable(Value: Integer);
procedure Set_Join_ColumnName(Value: WideString);
procedure Set_Join_Width(Value: Integer);
procedure Set_NM_Width(Value: Integer);
public
procedure AfterConstruction; override;
end;
{ TXMLSWF_ColumnsType }
TXMLSWF_ColumnsType = class(TXMLNodeCollection, IXMLSWF_ColumnsType)
protected
{ IXMLSWF_ColumnsType }
function Get_SWF_Column(Index: Integer): IXMLSWF_ColumnType;
function Add: IXMLSWF_ColumnType;
function Insert(const Index: Integer): IXMLSWF_ColumnType;
public
procedure AfterConstruction; override;
end;
{ TXMLSWF_ColumnType }
TXMLSWF_ColumnType = class(TXMLNode, IXMLSWF_ColumnType)
protected
{ IXMLSWF_ColumnType }
function Get_OrigCol: Integer;
function Get_GridName: WideString;
function Get_FormName: WideString;
function Get_SelectedForGrid: Boolean;
function Get_SelectedForForm: Boolean;
function Get_FixedWidth: Integer;
function Get_TruncateChars: Integer;
function Get_IsForeignKey: Boolean;
function Get_FkTablename: WideString;
function Get_FkColname: WideString;
function Get_FormWidth: Integer;
procedure Set_OrigCol(Value: Integer);
procedure Set_GridName(Value: WideString);
procedure Set_FormName(Value: WideString);
procedure Set_SelectedForGrid(Value: Boolean);
procedure Set_SelectedForForm(Value: Boolean);
procedure Set_FixedWidth(Value: Integer);
procedure Set_TruncateChars(Value: Integer);
procedure Set_IsForeignKey(Value: Boolean);
procedure Set_FkTablename(Value: WideString);
procedure Set_FkColname(Value: WideString);
procedure Set_FormWidth(Value: Integer);
end;
{ TXMLJoinTablesType }
TXMLJoinTablesType = class(TXMLNodeCollection, IXMLJoinTablesType)
protected
{ IXMLJoinTablesType }
function Get_SWF_Table(Index: Integer): IXMLSWF_TableType;
function Add: IXMLSWF_TableType;
function Insert(const Index: Integer): IXMLSWF_TableType;
public
procedure AfterConstruction; override;
end;
{ TXMLNMTablesType }
TXMLNMTablesType = class(TXMLNodeCollection, IXMLNMTablesType)
protected
{ IXMLNMTablesType }
function Get_SWF_Table(Index: Integer): IXMLSWF_TableType;
function Add: IXMLSWF_TableType;
function Insert(const Index: Integer): IXMLSWF_TableType;
public
procedure AfterConstruction; override;
end;
{ TXMLUnassignedViewsType }
TXMLUnassignedViewsType = class(TXMLNodeCollection, IXMLUnassignedViewsType)
protected
{ IXMLUnassignedViewsType }
function Get_SWF_View(Index: Integer): IXMLSWF_ViewType;
function Add: IXMLSWF_ViewType;
function Insert(const Index: Integer): IXMLSWF_ViewType;
public
procedure AfterConstruction; override;
end;
{ Global Functions }
function GetSWF_Data(Doc: IXMLDocument): IXMLSWF_DataType;
function LoadSWF_Data(const FileName: WideString): IXMLSWF_DataType;
function NewSWF_Data: IXMLSWF_DataType;
function LoadSWF_DataFromString(xmlData :string): IXMLSWF_DataType;
const
TargetNamespace = '';
implementation
{ Global Functions }
function GetSWF_Data(Doc: IXMLDocument): IXMLSWF_DataType;
begin
Result := Doc.GetDocBinding('SWF_Data', TXMLSWF_DataType, TargetNamespace) as IXMLSWF_DataType;
end;
function LoadSWF_Data(const FileName: WideString): IXMLSWF_DataType;
begin
Result := LoadXMLDocument(FileName).GetDocBinding('SWF_Data', TXMLSWF_DataType, TargetNamespace) as IXMLSWF_DataType;
end;
function NewSWF_Data: IXMLSWF_DataType;
begin
Result := NewXMLDocument.GetDocBinding('SWF_Data', TXMLSWF_DataType, TargetNamespace) as IXMLSWF_DataType;
end;
function LoadSWF_DataFromString(xmlData :string): IXMLSWF_DataType;
begin
Result := LoadXMLData(xmlData).GetDocBinding('SWF_Data', TXMLSWF_DataType, TargetNamespace) as IXMLSWF_DataType;
end;
{ TXMLSWF_DataType }
procedure TXMLSWF_DataType.AfterConstruction;
begin
RegisterChildNode('SWF_Groups', TXMLSWF_GroupsType);
RegisterChildNode('UnassignedViews', TXMLUnassignedViewsType);
inherited;
end;
function TXMLSWF_DataType.Get_Username: WideString;
begin
Result := ChildNodes['Username'].Text;
end;
procedure TXMLSWF_DataType.Set_Username(Value: WideString);
begin
ChildNodes['Username'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_Hostname: WideString;
begin
Result := ChildNodes['Hostname'].Text;
end;
procedure TXMLSWF_DataType.Set_Hostname(Value: WideString);
begin
ChildNodes['Hostname'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_Databasename: WideString;
begin
Result := ChildNodes['Databasename'].Text;
end;
procedure TXMLSWF_DataType.Set_Databasename(Value: WideString);
begin
ChildNodes['Databasename'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_Heading: WideString;
begin
Result := ChildNodes['Heading'].Text;
end;
procedure TXMLSWF_DataType.Set_Heading(Value: WideString);
begin
ChildNodes['Heading'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_Layout: WideString;
begin
Result := ChildNodes['Layout'].Text;
end;
procedure TXMLSWF_DataType.Set_Layout(Value: WideString);
begin
ChildNodes['Layout'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_WinSaveDir: WideString;
begin
Result := ChildNodes['WinSaveDir'].Text;
end;
procedure TXMLSWF_DataType.Set_WinSaveDir(Value: WideString);
begin
ChildNodes['WinSaveDir'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_LinuxSaveDir: WideString;
begin
Result := ChildNodes['LinuxSaveDir'].Text;
end;
procedure TXMLSWF_DataType.Set_LinuxSaveDir(Value: WideString);
begin
ChildNodes['LinuxSaveDir'].NodeValue := Value;
end;
function TXMLSWF_DataType.Get_SWF_Groups: IXMLSWF_GroupsType;
begin
Result := ChildNodes['SWF_Groups'] as IXMLSWF_GroupsType;
end;
function TXMLSWF_DataType.Get_UnassignedViews: IXMLUnassignedViewsType;
begin
Result := ChildNodes['UnassignedViews'] as IXMLUnassignedViewsType;
end;
{ TXMLSWF_GroupsType }
procedure TXMLSWF_GroupsType.AfterConstruction;
begin
RegisterChildNode('SWF_Group', TXMLSWF_GroupType);
ItemTag := 'SWF_Group';
ItemInterface := IXMLSWF_GroupType;
inherited;
end;
function TXMLSWF_GroupsType.Get_SWF_Group(Index: Integer): IXMLSWF_GroupType;
begin
Result := List[Index] as IXMLSWF_GroupType;
end;
function TXMLSWF_GroupsType.Add: IXMLSWF_GroupType;
begin
Result := AddItem(-1) as IXMLSWF_GroupType;
end;
function TXMLSWF_GroupsType.Insert(const Index: Integer): IXMLSWF_GroupType;
begin
Result := AddItem(Index) as IXMLSWF_GroupType;
end;
{ TXMLSWF_GroupType }
procedure TXMLSWF_GroupType.AfterConstruction;
begin
RegisterChildNode('SWF_Views', TXMLSWF_ViewsType);
inherited;
end;
function TXMLSWF_GroupType.Get_Name: WideString;
begin
Result := ChildNodes['Name'].Text;
end;
procedure TXMLSWF_GroupType.Set_Name(Value: WideString);
begin
ChildNodes['Name'].NodeValue := Value;
end;
function TXMLSWF_GroupType.Get_ShowOnLine: Integer;
begin
Result := ChildNodes['ShowOnLine'].NodeValue;
end;
procedure TXMLSWF_GroupType.Set_ShowOnLine(Value: Integer);
begin
ChildNodes['ShowOnLine'].NodeValue := Value;
end;
function TXMLSWF_GroupType.Get_ShowInColumn: Integer;
begin
Result := ChildNodes['ShowInColumn'].NodeValue;
end;
procedure TXMLSWF_GroupType.Set_ShowInColumn(Value: Integer);
begin
ChildNodes['ShowInColumn'].NodeValue := Value;
end;
function TXMLSWF_GroupType.Get_ViewsAsPopup: Boolean;
begin
Result := ChildNodes['ViewsAsPopup'].NodeValue;
end;
procedure TXMLSWF_GroupType.Set_ViewsAsPopup(Value: Boolean);
begin
ChildNodes['ViewsAsPopup'].NodeValue := Value;
end;
function TXMLSWF_GroupType.Get_SWF_Views: IXMLSWF_ViewsType;
begin
Result := ChildNodes['SWF_Views'] as IXMLSWF_ViewsType;
end;
{ TXMLSWF_ViewsType }
procedure TXMLSWF_ViewsType.AfterConstruction;
begin
RegisterChildNode('SWF_View', TXMLSWF_ViewType);
ItemTag := 'SWF_View';
ItemInterface := IXMLSWF_ViewType;
inherited;
end;
function TXMLSWF_ViewsType.Get_SWF_View(Index: Integer): IXMLSWF_ViewType;
begin
Result := List[Index] as IXMLSWF_ViewType;
end;
function TXMLSWF_ViewsType.Add: IXMLSWF_ViewType;
begin
Result := AddItem(-1) as IXMLSWF_ViewType;
end;
function TXMLSWF_ViewsType.Insert(const Index: Integer): IXMLSWF_ViewType;
begin
Result := AddItem(Index) as IXMLSWF_ViewType;
end;
{ TXMLSWF_ViewType }
procedure TXMLSWF_ViewType.AfterConstruction;
begin
RegisterChildNode('SWF_Table', TXMLSWF_TableType);
RegisterChildNode('JoinTables', TXMLJoinTablesType);
RegisterChildNode('NMTables', TXMLNMTablesType);
inherited;
end;
function TXMLSWF_ViewType.Get_FormHeight: Integer;
begin
Result := ChildNodes['FormHeight'].NodeValue;
end;
procedure TXMLSWF_ViewType.Set_FormHeight(Value: Integer);
begin
ChildNodes['FormHeight'].NodeValue := Value;
end;
function TXMLSWF_ViewType.Get_FormWidth: Integer;
begin
Result := ChildNodes['FormWidth'].NodeValue;
end;
procedure TXMLSWF_ViewType.Set_FormWidth(Value: Integer);
begin
ChildNodes['FormWidth'].NodeValue := Value;
end;
function TXMLSWF_ViewType.Get_FormX: Integer;
begin
Result := ChildNodes['FormX'].NodeValue;
end;
procedure TXMLSWF_ViewType.Set_FormX(Value: Integer);
begin
ChildNodes['FormX'].NodeValue := Value;
end;
function TXMLSWF_ViewType.Get_FormY: Integer;
begin
Result := ChildNodes['FormY'].NodeValue;
end;
procedure TXMLSWF_ViewType.Set_FormY(Value: Integer);
begin
ChildNodes['FormY'].NodeValue := Value;
end;
function TXMLSWF_ViewType.Get_GridPopupHeight: Integer;
begin
Result := ChildNodes['GridPopupHeight'].NodeValue;
end;
procedure TXMLSWF_ViewType.Set_GridPopupHeight(Value: Integer);
begin
ChildNodes['GridPopupHeight'].NodeValue := Value;
end;
function TXMLSWF_ViewType.Get_GridPopupWidth: Integer;
begin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -