SDIMAIN.PAS
上传用户:autowell
上传日期:2022-06-21
资源大小:16754k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit SDIMAIN;
  2. interface
  3. uses Windows, Classes, Graphics, Forms, Controls, Menus,
  4.   Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, ImgList, StdActns,
  5.   ActnList, ToolWin;
  6. type
  7.   TSDIAppForm = class(TForm)
  8.     OpenDialog: TOpenDialog;
  9.     SaveDialog: TSaveDialog;
  10.     ToolBar1: TToolBar;
  11.     ToolButton9: TToolButton;
  12.     ToolButton1: TToolButton;
  13.     ToolButton2: TToolButton;
  14.     ToolButton3: TToolButton;
  15.     ToolButton4: TToolButton;
  16.     ToolButton5: TToolButton;
  17.     ToolButton6: TToolButton;
  18.     ActionList1: TActionList;
  19.     FileNew1: TAction;
  20.     FileOpen1: TAction;
  21.     FileSave1: TAction;
  22.     FileSaveAs1: TAction;
  23.     FileExit1: TAction;
  24.     EditCut1: TEditCut;
  25.     EditCopy1: TEditCopy;
  26.     EditPaste1: TEditPaste;
  27.     HelpAbout1: TAction;
  28.     StatusBar: TStatusBar;
  29.     ImageList1: TImageList;
  30.     MainMenu1: TMainMenu;
  31.     File1: TMenuItem;
  32.     FileNewItem: TMenuItem;
  33.     FileOpenItem: TMenuItem;
  34.     FileSaveItem: TMenuItem;
  35.     FileSaveAsItem: TMenuItem;
  36.     N1: TMenuItem;
  37.     FileExitItem: TMenuItem;
  38.     Edit1: TMenuItem;
  39.     CutItem: TMenuItem;
  40.     CopyItem: TMenuItem;
  41.     PasteItem: TMenuItem;
  42.     Help1: TMenuItem;
  43.     HelpAboutItem: TMenuItem;
  44.     procedure FileNew1Execute(Sender: TObject);
  45.     procedure FileOpen1Execute(Sender: TObject);
  46.     procedure FileSave1Execute(Sender: TObject);
  47.     procedure FileExit1Execute(Sender: TObject);
  48.     procedure HelpAbout1Execute(Sender: TObject);
  49.   private
  50.     { Private declarations }
  51.   public
  52.     { Public declarations }
  53.   end;
  54. var
  55.   SDIAppForm: TSDIAppForm;
  56. implementation
  57. uses about;
  58. {$R *.dfm}
  59. procedure TSDIAppForm.FileNew1Execute(Sender: TObject);
  60. begin
  61.   { Do nothing }
  62. end;
  63. procedure TSDIAppForm.FileOpen1Execute(Sender: TObject);
  64. begin
  65.   OpenDialog.Execute;
  66. end;
  67. procedure TSDIAppForm.FileSave1Execute(Sender: TObject);
  68. begin
  69.   SaveDialog.Execute;
  70. end;
  71. procedure TSDIAppForm.FileExit1Execute(Sender: TObject);
  72. begin
  73.   Close;
  74. end;
  75. procedure TSDIAppForm.HelpAbout1Execute(Sender: TObject);
  76. begin
  77.   AboutBox.ShowModal;
  78. end;
  79. end.