MainForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit MainForm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TFormMain = class(TForm)
- btnLoad: TButton;
- btnSave: TButton;
- btnShow: TButton;
- procedure btnLoadClick(Sender: TObject);
- procedure btnSaveClick(Sender: TObject);
- procedure btnShowClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- FormMain: TFormMain;
- implementation
- uses
- FormOperations;
- {$R *.DFM}
- procedure TFormMain.btnLoadClick(Sender: TObject);
- var
- i: Integer;
- begin
- for i := 0 to Screen.FormCount - 1 do
- if Supports (Screen.Forms [i], IFormOperations) then
- (Screen.Forms [i] as IFormOperations).Load;
- end;
- procedure TFormMain.btnSaveClick(Sender: TObject);
- var
- i: Integer;
- begin
- for i := 0 to Screen.FormCount - 1 do
- if Supports (Screen.Forms [i], IFormOperations) then
- (Screen.Forms [i] as IFormOperations).Save;
- end;
- procedure TFormMain.btnShowClick(Sender: TObject);
- var
- i: Integer;
- begin
- for i := 0 to Screen.FormCount - 1 do
- Screen.Forms[i].Show;
- end;
- end.