123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //---------------------------------------------------------------------------
- #pragma hdrstop
- #include "CommFlashF.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- TCommFlash::TCommFlash()
- {
- }
- //---------------------------------------------------------------------------
- TCommFlash::~TCommFlash()
- {
- }
- //---------------------------------------------------------------------------
- bool TCommFlash::CallFunc(TShockwaveFlashEx *ShockwaveFlash1, String AFuncName, String AArgs)
- {
- try
- {
- String sCommand;
- sCommand.sprintf((L"<invoke name=\"%s\"><arguments><string>%s</string></arguments></invoke>"), AFuncName, AArgs);
- ShockwaveFlash1->CallFunction(sCommand);
- }
- catch (Exception &exception)
- {
- //throw Exception(String(exception.ClassName()) + exception.Message);
- return false;
- }
- return true;
- }
- //---------------------------------------------------------------------------
- String TCommFlash::ReplaceName(String AName)
- {
- String sReturn;
- sReturn = StringReplace(AName, "<", "[", TReplaceFlags() << rfReplaceAll);
- sReturn = StringReplace(sReturn, ">", "]", TReplaceFlags() << rfReplaceAll);
- sReturn = StringReplace(sReturn, ",", "^", TReplaceFlags() << rfReplaceAll);
- sReturn = StringReplace(sReturn, "$", "^", TReplaceFlags() << rfReplaceAll);
- return sReturn;
- }
- //---------------------------------------------------------------------------
|