?? seldtype.pas
字號(hào):
unit SelDType;
interface
uses
SysUtils, Classes, wbsData, MultiLang
{$IFDEF CLX}
,QForms ,QDialogs ,QControls, QStdCtrls
{$ELSE}
, Graphics, Controls,
Forms, Dialogs, StdCtrls, Grids, Outline
{$ENDIF}
;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
{$IFNDEF CLX}
Outline1: TOutline;
{$ENDIF}
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Dtype: String[3];
TXTop: Boolean;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
{$IFNDEF CLX}
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',1){'Bitmap graphic'} Then DType:='BMP'; // code001
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',2){'Plain text file ...'} Then Begin // code002
DType:='ASC';
End;
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',3){'Plain text file ...-using standard method'} Then Begin // code003
DType:='ASC';
End;
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',4){'Plain text file ...-using compatible method'} Then Begin // code004
DType:='TXT';
End;
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',5){'HTML file'} Then DType:='HTM'; // code005
If Outline1.Items[Outline1.SelectedItem].FullPath=ml.GetCodeString('Seldtype',6){'PDF file'} Then DType:='PDF'; // code006
{$ENDIF}
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
{$IFDEF CLX}
Application.HelpSystem.ShowContextHelp(600,Application.HelpFile);
{$ELSE}
Application.HelpContext(600);
{$ENDIF}
end;
procedure TForm1.FormShow(Sender: TObject);
begin
{$IFNDEF CLX}
Outline1.Items[2].Expanded:=false;
{$ENDIF}
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// ml support
Button1.Caption:=ml.GetComponentString('Seldtype.Button1.Caption');
Button2.Caption:=ml.GetComponentString('Seldtype.Button2.Caption');
Form1.Caption:=ml.GetComponentString('Seldtype.Form1.Caption');
ml.GetComponentStringList('Seldtype.Memo1.Lines',Memo1.Lines);
{$IFNDEF CLX}
ml.GetComponentStringList('Seldtype.Outline1.Lines',Outline1.Lines);
///////////////////////////////////////////////////////////////////////
Outline1.SelectedItem:=2;
{$ENDIF}
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -