当前位置: 首页>>代码示例>>C++>>正文


C++ StringStorage::setString方法代码示例

本文整理汇总了C++中StringStorage::setString方法的典型用法代码示例。如果您正苦于以下问题:C++ StringStorage::setString方法的具体用法?C++ StringStorage::setString怎么用?C++ StringStorage::setString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringStorage的用法示例。


在下文中一共展示了StringStorage::setString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateUI

void VideoRegionsConfigDialog::updateUI()
{
  StringVector *videoClasses = m_config->getVideoClassNames();
  std::vector<Rect> *videoRects = m_config->getVideoRects();
  StringStorage textAreaData;
  TCHAR endLine[3] = {13, 10, 0};
  {
    AutoLock al(m_config);
    textAreaData.setString(_T(""));
    for (size_t i = 0; i < videoClasses->size(); i++) {
      textAreaData.appendString(videoClasses->at(i).getString());
      textAreaData.appendString(&endLine[0]);
    }
    TCHAR buffer[32];
    _ltot(m_config->getVideoRecognitionInterval(), &buffer[0], 10);
    m_videoRecognitionInterval.setText(buffer);
  }
  m_videoClasses.setText(textAreaData.getString());

  {
    AutoLock al(m_config);
    textAreaData.setString(_T(""));
    for (size_t i = 0; i < videoRects->size(); i++) {
      Rect r = videoRects->at(i);
      StringStorage s;
      RectSerializer::toString(&r, &s);
      textAreaData.appendString(s.getString());
      textAreaData.appendString(&endLine[0]);
    }
  }
  m_videoRects.setText(textAreaData.getString());
}
开发者ID:heroyin,项目名称:qmlvncviewer,代码行数:32,代码来源:VideoRegionsConfigDialog.cpp

示例2: tryCalcInputFilesSize

void DownloadOperation::tryCalcInputFilesSize()
{
  FileInfoList *fil = m_toCopy;

  while (fil != NULL) {
    if (fil->getFileInfo()->isDirectory()) {
      StringStorage pathNoRoot;
      StringStorage pathToFile;

      fil->getAbsolutePath(&pathNoRoot, _T('/'));

      pathToFile.setString(m_pathToSourceRoot.getString());
      if (!pathToFile.endsWith(_T('/'))) {
        pathToFile.appendString(_T("/"));
      }
      pathToFile.appendString(pathNoRoot.getString());

      m_foldersToCalcSizeLeft++;
      m_sender->sendFolderSizeRequest(pathToFile.getString());
    } else {
      m_totalBytesToCopy += fil->getFileInfo()->getSize();
    }
    fil = fil->getNext();
  }
}
开发者ID:skbkontur,项目名称:KonturVNC,代码行数:25,代码来源:DownloadOperation.cpp

示例3: getServerInfoMsgRcvd

void ControlClient::getServerInfoMsgRcvd()
{
  bool acceptFlag = false;
  bool serviceFlag = false;

  StringStorage logPath;
  StringStorage statusText;

  TvnServerInfo info;

  TvnServer::getInstance()->getServerInfo(&info);

  StringStorage status;
  {
    AutoLock al(&m_tcpDispValuesMutex);
    if (m_tcpDispId != 0) {
      status.format(_T("[ID = %u] %s"),
                    m_tcpDispId,
                    info.m_statusText.getString());
    } else {
      status.setString(info.m_statusText.getString());
    }
  }

  m_gate->writeUInt32(ControlProto::REPLY_OK);

  m_gate->writeUInt8(info.m_acceptFlag ? 1 : 0);
  m_gate->writeUInt8(info.m_serviceFlag ? 1 : 0);
  m_gate->writeUTF8(status.getString());
}
开发者ID:heroyin,项目名称:qmlvncviewer,代码行数:30,代码来源:ControlClient.cpp

示例4: sendDesktopName

void RfbInitializer::sendDesktopName()
{
  StringStorage deskName;
  if (!Environment::getComputerName(&deskName)) {
    deskName.setString(DefaultNames::DEFAULT_COMPUTER_NAME);
  }

  AnsiStringStorage ansiName(&deskName);
  unsigned int dnLen = (unsigned int)ansiName.getLength();
  _ASSERT(dnLen == ansiName.getLength());

  m_output->writeUInt32(dnLen);
  m_output->writeFully(ansiName.getString(), dnLen);
}
开发者ID:sim0629,项目名称:tightvnc,代码行数:14,代码来源:RfbInitializer.cpp

示例5: sendDesktopName

void RfbInitializer::sendDesktopName()
{
  StringStorage deskName;
  if (!Environment::getComputerName(&deskName)) {
    deskName.setString(_T("TightVNC Server"));
  }

  size_t dnLen = deskName.getLength();
  char *ansiName = new char[dnLen + 1];
  deskName.toAnsiString(ansiName, dnLen + 1);

  m_output->writeUInt32(dnLen);
  m_output->writeFully(ansiName, dnLen);
}
开发者ID:kaseya,项目名称:tightvnc2,代码行数:14,代码来源:RfbInitializer.cpp

示例6: readConfigSettings

void DesktopServerProto::readConfigSettings(BlockingGate *gate)
{
  ServerConfig *srvConf = Configurator::getInstance()->getServerConfig();

  // Log
  srvConf->setLogLevel(gate->readUInt32());

  // Polling
  srvConf->setPollingInterval(gate->readUInt32());
  srvConf->setGrabTransparentWindowsFlag(gate->readUInt8() != 0);

  srvConf->blockLocalInput(gate->readUInt8() != 0);
  srvConf->setLocalInputPriority(gate->readUInt8() != 0);
  srvConf->setLocalInputPriorityTimeout(gate->readUInt32());

  srvConf->enableRemovingDesktopWallpaper(gate->readUInt8() != 0);

  // Receive video class names
  AutoLock al(srvConf);
  size_t stringCount = gate->readUInt32();

  StringStorage tmpString;
  for (size_t i = 0; i < stringCount; i++) {
    gate->readUTF8(&tmpString);
    srvConf->getVideoClassNames()->push_back(tmpString);
  }
  // Receive video rects
  stringCount = gate->readUInt32();

  tmpString.setString(_T(""));
  for (size_t i = 0; i < stringCount; i++) {
    gate->readUTF8(&tmpString);
    srvConf->getVideoRects()->push_back(RectSerializer::toRect(&tmpString));
  }

  // Receive video recognition interval
  srvConf->setVideoRecognitionInterval(gate->readUInt32());
  // Receive socket timeout
  srvConf->setIdleTimeout(gate->readUInt32());
}
开发者ID:heroyin,项目名称:qmlvncviewer,代码行数:40,代码来源:DesktopServerProto.cpp

示例7: getInputFilesSize

UINT64 UploadOperation::getInputFilesSize()
{
    UINT64 totalFilesSize = 0;

    FileInfoList *fil = m_toCopy;
    while (fil != NULL) {
        StringStorage pathNoRoot;
        StringStorage pathToFile;

        fil->getAbsolutePath(&pathNoRoot, _T('\\'));

        pathToFile.setString(m_pathToSourceRoot.getString());
        pathToFile.appendString(_T("\\"));
        pathToFile.appendString(pathNoRoot.getString());

        totalFilesSize += getFileSize(pathToFile.getString());

        fil = fil->getNext();
    }

    return totalFilesSize;
}
开发者ID:sim0629,项目名称:tightvnc,代码行数:22,代码来源:UploadOperation.cpp

示例8: updateUI

void AdministrationConfigDialog::updateUI()
{
  m_logLevel.setSignedInt(m_config->getLogLevel());

  m_useControlAuth.check(m_config->isControlAuthEnabled());

  ConfigDialog *configDialog = (ConfigDialog *)m_parentDialog;

  StringStorage logPath;

  m_config->getLogFilePath(&logPath);

  if (logPath.isEmpty()) {
    logPath.setString(StringTable::getString(IDS_LOGPATH_UNAVALIABLE));
    m_openLogPathButton.setEnabled(false);
    m_logPathTB.setEnabled(false);
  }

  m_logPathTB.setText(logPath.getString());

  StringStorage folder;
  getFolderName(logPath.getString(), &folder);
  HANDLE hDoc = CreateFile(folder.getString(), GENERIC_READ,
                           FILE_SHARE_READ, 0, OPEN_EXISTING,
                           FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, 0);
  if (hDoc == INVALID_HANDLE_VALUE) {
    m_openLogPathButton.setEnabled(false);
  } else {
    CloseHandle(hDoc);
    m_openLogPathButton.setEnabled(true);
  }

  for (int i = 0; i < 5; i++) {
    m_shared[0].check(false);
  }

  if (m_config->isAlwaysShared() && !m_config->isNeverShared() && !m_config->isDisconnectingExistingClients()) {
    m_shared[0].check(true);
  }
  if (!m_config->isAlwaysShared() && m_config->isNeverShared() && !m_config->isDisconnectingExistingClients()) {
    m_shared[1].check(true);
  }
  if (!m_config->isAlwaysShared() && m_config->isNeverShared() && m_config->isDisconnectingExistingClients()) {
    m_shared[2].check(true);
  }
  if (!m_config->isAlwaysShared() && !m_config->isNeverShared() && !m_config->isDisconnectingExistingClients()) {
    m_shared[3].check(true);
  }
  if (!m_config->isAlwaysShared() && !m_config->isNeverShared() && m_config->isDisconnectingExistingClients()) {
    m_shared[4].check(true);
  }

  for (int i = 0; i < 3; i++) {
    m_disconnectAction[i].check(false);
  }
  switch (m_config->getDisconnectAction()) {
  case ServerConfig::DA_DO_NOTHING:
    m_disconnectAction[0].check(true);
    break;
  case ServerConfig::DA_LOCK_WORKSTATION:
    m_disconnectAction[1].check(true);
    break;
  case ServerConfig::DA_LOGOUT_WORKSTATION:
    m_disconnectAction[2].check(true);
    break;
  }

  m_logForAllUsers.check(m_config->isSaveLogToAllUsersPathFlagEnabled());

  if (m_config->hasControlPassword()) {
    unsigned char cryptedPassword[8];

    m_config->getControlPassword(cryptedPassword);

    m_cpControl->setCryptedPassword((char *)cryptedPassword);
  }

  m_cpControl->setEnabled(m_config->isControlAuthEnabled());
}
开发者ID:newmind,项目名称:tvnc_rds,代码行数:79,代码来源:AdministrationConfigDialog.cpp


注:本文中的StringStorage::setString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。