Unit3.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:30k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- #include "Unit2.h"
- #include "Unit3.h"
- #include "Unit4.h"
- #include "Unit5.h"
- #include <stdio.h>
- #include <Filectrl.hpp>
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm3 *Form3;
- //---------------------------------------------------------------------------
- __fastcall TForm3::TForm3(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm3::Button8Click(TObject *Sender)
- {
- char szStr[250];
- AnsiString szPath;
- if(Edit14->Text!="")
- {
- switch (RadioGroup1->ItemIndex)
- {
- case 0:
- szPath = Form5->Edit53->Text+"\normal\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_normal.txt");
- break;
- case 1:
- szPath = Form5->Edit53->Text+"\food\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_food.txt");
- break;
- case 2:
- szPath = Form5->Edit53->Text+"\jiudai\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_jiudai.txt");
- break;
- case 3:
- szPath = Form5->Edit53->Text+"\drug\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_drug.txt");
- break;
- case 4:
- szPath = Form5->Edit53->Text+"\equip\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_equip.txt");
- CheckAdd(6,Edit14->Text);
- Form2->ComboBox6->Items->SaveToFile("equip.lst");
- break;
- case 5:
- szPath = Form5->Edit53->Text+"\weapon\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_weapon.txt");
- CheckAdd(5,Edit14->Text);
- Form2->ComboBox5->Items->SaveToFile("weapon.lst");
- break;
- case 6:
- szPath = Form5->Edit53->Text+"\book\";
- CheckAdd(2,Edit14->Text +".txt");
- CheckAdd(28,Edit14->Text);
- ListBox2->Items->SaveToFile(szPath + "_book.txt");
- break;
- case 7:
- szPath = Form5->Edit53->Text+"\other\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_other.txt");
- break;
- case 8:
- szPath = Form5->Edit53->Text+"\flag\";
- CheckAdd(2,Edit14->Text +".txt");
- ListBox2->Items->SaveToFile(szPath + "_flag.txt");
- break;
- }
- if(!DirectoryExists(szPath)) CreateDirectory(szPath.c_str(),NULL);
- StrPCopy(szStr,szPath+Edit14->Text+".txt");
- }
- else
- {
- Form1->StatusBar1->SimpleText = "璣ゅ