main.pas
上传用户:blmaxia
上传日期:2010-02-17
资源大小:657k
文件大小:2k
源码类别:

Delphi/CppBuilder

开发平台:

Delphi

  1. unit main;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, StdCtrls, jpeg, ExtCtrls, ComCtrls;
  6. type
  7.   TMainform = class(TForm)
  8.     Panel1: TPanel;
  9.     PageControl1: TPageControl;
  10.     TabSheet1: TTabSheet;
  11.     TabSheet2: TTabSheet;
  12.     Panel2: TPanel;
  13.     Image1: TImage;
  14.     Label1: TLabel;
  15.     Button1: TButton;
  16.     Button2: TButton;
  17.     Button3: TButton;
  18.     Button4: TButton;
  19.     Button5: TButton;
  20.     Button6: TButton;
  21.     Button7: TButton;
  22.     procedure FormCreate(Sender: TObject);
  23.     procedure Button1Click(Sender: TObject);
  24.     procedure Button2Click(Sender: TObject);
  25.     procedure Button3Click(Sender: TObject);
  26.     procedure Button4Click(Sender: TObject);
  27.     procedure Button5Click(Sender: TObject);
  28.     procedure Button6Click(Sender: TObject);
  29.     procedure Button7Click(Sender: TObject);
  30.   private
  31.     { Private declarations }
  32.   public
  33.     { Public declarations }
  34.   end;
  35. var
  36.   Mainform: TMainform;
  37.   mypath:string;
  38.   
  39. implementation
  40. uses book, reader, lend, infoquery;
  41. {$R *.dfm}
  42. procedure TMainform.FormCreate(Sender: TObject);
  43. begin
  44.   mypath:=extractfilepath(paramstr(0));
  45.   shortdateformat:='yyyy/mm/dd';
  46. end;
  47. procedure TMainform.Button1Click(Sender: TObject);
  48. begin
  49.   bookform.show;
  50. end;
  51. procedure TMainform.Button2Click(Sender: TObject);
  52. begin
  53.   readerform.show;
  54. end;
  55. procedure TMainform.Button3Click(Sender: TObject);
  56. begin
  57.   lendform.show;
  58. end;
  59. procedure TMainform.Button4Click(Sender: TObject);
  60. begin
  61.   close;
  62. end;
  63. procedure TMainform.Button5Click(Sender: TObject);
  64. begin
  65.   queryform.show;
  66. end;
  67. procedure TMainform.Button6Click(Sender: TObject);
  68. begin
  69.   button5click(sender);
  70. end;
  71. procedure TMainform.Button7Click(Sender: TObject);
  72. begin
  73.   button5click(sender);
  74. end;
  75. end.