Author Topic: Вопросы по компоненте BluetoothFramework_C6 к Builer C++  (Read 2988 times)

Offline Bazil_Artyom

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
С SE k750 demo версия (то что в архиве с компонентой) работает...

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • Karma: 1000
    • Wireless Communication Library
Re: ??????? ?? ?????????? BluetoothFramework_C6 ? Builer C++
« Reply #16 on: November 13, 2007, 12:31:37 PM »
try
    {

      TBFFiles* pFiles = BFFileTransferClient->Dir();

      Memo1->Lines->Add(IntToStr(pFiles->Count));
      TStringList * str = new TStringList;
      for(int i = 0; i<19;i++)
      {
        if(pFiles->Files->Folder == true) str->Add(pFiles->Files->Name);
      }
      TBFFiles* pFiles1;
      for(int i = 0; i<str->Count;i++)
      {

            Memo1->Lines->Add(str->operator [](i));
            Memo1->Lines->Add("*"+Path+str->operator [](i)+"*");
            BFFileTransferClient->SetPath(Path+str->operator [](i),false);
            pFiles1 = BFFileTransferClient->Dir();

            for(int j = 0; j<pFiles1->Count;j++)
            {
                Memo1->Lines->Add("<->"+pFiles1->Files[j]->Name);
            }


      }
???? ??? ??????? ?????? ???????? ?????, ? ????? ??????? ?????? ?????? ??????????? ? ???(??? ?????? ?????), ?? ???????? ?? ?????? ???????? ???????? ??????: "??????? ?? ??????? ????? ????????? ????". ??? ? ????? ?? ????

???? ?????? ???? ?? ?????? ????? ? ?????? ? ??????? ??????????.

??????:

SetPath('Data');
Dir() -> ??????? ??????:
Images
Sounds
Video

??????? ?????? Data
??? ???????? ? Images
SetPath('Images')

??? ???????? ?? ???? ??????? ?????
SetPath('..')

? ????????? - ??? ???????? ????????. ?????? ??????? ?????? ???? ??? ?? ??????????. ?????? ?? ????? ????? ?????? ??? ????
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline Bazil_Artyom

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
В примере filez.zip исправил рекурсивную функцию DoFiles  и всё заработало
void __fastcall TForm1::DoFiles(TBFFiles* pFiles, String Path)
{
 // TBFFiles* pFiles1 = new TBFFiles();
  for (int i=0; i<pFiles->Count;i++)
  {

    if (pFiles->Files->Folder)
    {
      Path = Path +"\\"+ pFiles->Files->Name;

      try
      {
        BFFileTransferClient->SetPath(pFiles->Files->Name, false);

        pFiles = BFFileTransferClient->Dir();

        DoFiles(pFiles, Path);

        BFFileTransferClient->SetPath("..", false);
        pFiles = BFFileTransferClient->Dir();
      }
      catch (...)
      {
        Memo1->Lines->Add("Oooooops");
      }
    }
    else
    {
        if(ExtractFileExt(AnsiUpperCase(pFiles->Files->Name)) == ".JPG")
        Memo1->Lines->Add(ExtractFileExt(AnsiUpperCase(pFiles->Files->Name))+"<->"+pFiles->Files->Name+"<><><>"+pFiles->Files->Name);
    }
   
  }
}