Example #1
0
void CallsignTagInfo::SetSteamGroupID(uint64 steamGroupID, ZString callsignTag)
{
	m_steamGroupID = steamGroupID;
	m_callsignTag = "";
	m_callsignToken = "";
	SaveToRegistry();
}
BOOL CPropPageRestore::OnKillActive() 
{
    UpdateData();

    SaveToRegistry(TRUE);
    
	return CPMPropPage::OnKillActive();
}
Example #3
0
//---------------------------------------------------------------------------
void __fastcall TRecent::SetMaxFiles(unsigned Value)
{
  RemoveMenuItems();//Remove shown menu items
  FMaxFiles = Value > MaxRecentFiles ? MaxRecentFiles : Value;
  if(FileList.size() > FMaxFiles)
    FileList.resize(FMaxFiles); //RemoveMenuItems() has already removed the actions
  SaveToRegistry();
  ShowMenuItems();//Show menu items again
}
bool CeCosTestPlatform::Save()
{
  const String strDir(CeCosTestUtils::HomeFile(_T(".eCosPlatforms")));
#ifdef _WIN32
  if(!CeCosTestUtils::Exists(strDir)){
    String strPlatformsKey = _T("Software\\eCos Configuration Tool\\Platforms");
//    strPlatformsKey += GetGreatestSubkey (_T("Software\\eCos"));
//    strPlatformsKey += _T("\\Platforms");

    return SaveToRegistry(HKEY_CURRENT_USER,strPlatformsKey);
  }
#endif
  return SaveToDir(strDir);
}
Example #5
0
//---------------------------------------------------------------------------
//Called by user to indicate that file have been used
void __fastcall TRecent::FileUsed(const String &FileName)
{
  if(FMaxFiles)
  {
    RemoveMenuItems();//Remove shown menu items
    ReadFromRegistry();//Read data to get changes made by other version of program
    int Index = FileIndex(FileName);//Get index of FileName in list
    if(Index == -1)//If FileName not in list
    {
      if(FileList.size() == static_cast<unsigned>(FMaxFiles))//If list is full
        FileList.pop_back();//Erase last file name in list
    }
    else
      FileList.erase(FileList.begin() + Index);//Remove FileName from list

    FileList.push_front(std::pair<String, TActionClientItem*>(FileName, NULL));//Add FileName to start of list
    SaveToRegistry();//Write new file list to registry
    ShowMenuItems();//Show new list of menu items
  }
  
  //Add Filename to recent documents list in the start menu
  if(FAddToRecentDocs)
    SHAddToRecentDocs(SHARD_PATH, FileName.c_str());
}
Example #6
0
POPTITEM
SavePenSet(
    PPRINTERINFO    pPI,
    POPTITEM        pOptItem
    )

/*++

Routine Description:




Arguments:




Return Value:




Author:

    06-Nov-1995 Mon 18:52:15 created  


Revision History:


--*/

{
    PPENDATA    pPenData;
    UINT        MaxPens;
    UINT        i;


    pPenData = PI_PPENDATA(pPI);
    MaxPens  = (UINT)pPI->pPlotGPC->MaxPens;
    pOptItem++;

    for (i = 0; i < PRK_MAX_PENDATA_SET; i++) {

        UINT    cPens;
        BOOL    SavePen;

        //
        // Must skip the header
        //

        pOptItem++;
        cPens   = MaxPens;
        SavePen = FALSE;

        while (cPens--) {

            if (pOptItem->Flags & OPTIF_CHANGEONCE) {

                pPenData->ColorIdx = (WORD)pOptItem->Sel;
                SavePen            = TRUE;
            }

            pOptItem++;
            pPenData++;
        }

        if (SavePen) {

            if (!SaveToRegistry(pPI->hPrinter,
                                NULL,
                                NULL,
                                NULL,
                                NULL,
                                NULL,
                                NULL,
                                MAKELONG(i, MaxPens),
                                pPenData - MaxPens)) {

                PlotUIMsgBox(NULL, IDS_PP_NO_SAVE, MB_ICONSTOP | MB_OK);
            }
        }
    }

    return(pOptItem);
}
Example #7
0
void CallsignTagInfo::SetToken(ZString token)
{
	m_callsignToken = token;
	SaveToRegistry();
}
CPropPageRestore::~CPropPageRestore()
{
    SaveToRegistry();
}