CBioSIMProject::CBioSIMProject()
	{
		m_pMyself = NULL;

		//CExecutableGroup* pGroup = new CExecutableGroup();

		SetName("Project");
		SetInternalName("Project");
		m_bAddPath = false;
	}
示例#2
0
void util::ThreadRename(std::string&& name)
{
    SetThreadName(("bitcoin-" + name).c_str());
    SetInternalName(std::move(name));
}
示例#3
0
void CGenPropertyPage::OnAddItem(CDialog & dlg) 
{

  // load dialog with default values
  InitDialog (&dlg);

  // display dialog, exit if cancelled
  if (dlg.DoModal () != IDOK)
    return;

  // create the object's lookup name (label converted to lower case, or generated)
 CObject * pItem;
 CString strObjectName;

  strObjectName = GetObjectName (&dlg);
  if (strObjectName.IsEmpty ())
    strObjectName.Format ("*%s%s",       // e.g. *trigger100
                            (LPCTSTR) m_strObjectType,
                            (LPCTSTR) App.GetUniqueString ());
  else
    strObjectName.MakeLower();

  // if already there (presumably not possible with un-named objects),
  // then abort the add
  if (m_ObjectMap->Lookup (strObjectName, pItem))
    {
    CString strMsg;

    strMsg = TFormat ("The %s named \"%s\" is already in the %s list",
                  (LPCTSTR) m_strObjectType,
                  (LPCTSTR) GetObjectName (&dlg),
                  (LPCTSTR) m_strObjectType);
    ::UMessageBox (strMsg);
    return;
    }

  // add new object to map
  m_ObjectMap->SetAt (strObjectName, pItem = MakeNewObject ());

  // unload from dialog into object's properties
  UnloadDialog (&dlg, pItem);

  // They can no longer cancel the property sheet, the document has changed
  CancelToClose ();
  if (!CheckIfTemporary (pItem))
    m_doc->SetModifiedFlag (TRUE);

  // create a CString for lookup purposes
  CString * pstrObjectName = new CString (strObjectName);

  // add this item to the list view
  add_item (pItem, pstrObjectName, 0, TRUE);

  SetInternalName (pItem, strObjectName);  // set name so we can delete one-shot items

  // resort the list
  t_gen_sort_param sort_param (m_ObjectMap, m_last_col, m_reverse, m_CompareObjects);
  m_ctlList->SortItems (CompareFunc, (LPARAM) &sort_param); 

  // redraw the list
  if (GetFilterFlag ())
    LoadList ();       // full reload because it may have changed filter requirements

// get dispatch id from the script and put it into the item

  if (m_doc->m_ScriptEngine)
    {
    CString strMessage;
    SetDispatchID (pItem, m_doc->GetProcedureDispid (GetScriptName (pItem),
                                                     m_strObjectType, 
                                                     GetLabel (pItem),
                                                     strMessage));
    if (!strMessage.IsEmpty ())
      ::UMessageBox (strMessage, MB_ICONINFORMATION);
    }
  
}    // end of CGenPropertyPage::OnAddItem