Unit2.cpp
上传用户:wangli
上传日期:2008-04-19
资源大小:3077k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit2.h"
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm2 *Form2;
- //---------------------------------------------------------------------------
- __fastcall TForm2::TForm2(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm2::Button2Click(TObject *Sender)
- {
- Form2->Close() ;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm2::FormCreate(TObject *Sender)
- {
- Edit1->Text=Date();
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm2::Button1Click(TObject *Sender)
- {
- int item= Form1->lstMain->Items->Count+1;
- //ShowMessage(item);
- //AddTask(1,Date(),"支出",33,"lkdlkdfklkl");
- Form1->AddTask(item,Edit1->Text,ComboBox1->Text,String(Edit3->Text).ToInt(),Edit4->Text);
- Form1->refresh();
- }
- //---------------------------------------------------------------------------