void __fastcall TMain::Config1Click(TObject *Sender)
{
//config setting
if (FrmConfig->ShowModal() == mrOk)
{
try
{
String iniDirPath = ExtractFilePath(Application->ExeName)+ "\Config.ini";//ini data path
TIniFile *aIniFile = new TIniFile(iniDirPath);
aIniFile->WriteString("Path","SharePath",FrmConfig->edtPort->Text);
aIniFile->WriteString("Port","ComunicationPort",FrmConfig->edtPath->Text);
}
catch(...)
{
ShowMessage("Save Config Data Fail!");
}
}
}