CEMStatisticsMajorDiseasesReport::CEMStatisticsMajorDiseasesReport(CWnd *pParent)
{
	m_nDlgWidth = 440;
	m_nDlgHeight = 190;
	m_szTitle = _T("Diseases Suffered Report");
	SetDefaultValues();
}
示例#2
0
DWORD PCOCamera::Open(int number)
{
  DWORD err =0;
  HANDLE camHandle=NULL;

  if(getsencamfunc(&camLib)==TRUE)
  {
   errmsg.ShowError(_T("Cannot load library sencam"));
   return PCO_ERROR_APPLICATION_DLLNOTFOUND;
  }

  strcpy_s(libname,sizeof(libname),CAMLIB_NAME);

  err = initboard(number,&camHandle);
  errmsg.ShowPCOError(_T("initboard"), err);
  if(err == PCO_NOERROR)
  {
   boardnum=number;
   cameraHandle=camHandle;
  }
  err = setup_camera(camHandle);
  errmsg.ShowPCOError(_T("setup_camera"), err);
  if(err != PCO_NOERROR)
   Close();
  else
   err=get_cam_param(camHandle,&campar);
  if(err == PCO_NOERROR)
   SetDefaultValues();
  return err;
}
示例#3
0
文件: Options.cpp 项目: jplee/MILF
COptions::COptions()
{
	m_theOptions = this;
	m_pXmlFile = 0;
	m_pLastServer = 0;

	m_acquired = false;

	SetDefaultValues();

	m_save_timer.SetOwner(this);

	std::map<std::string, int> nameOptionMap;
	GetNameOptionMap(nameOptionMap);

	LoadGlobalDefaultOptions(nameOptionMap);

	InitSettingsDir();

	CInterProcessMutex mutex(MUTEX_OPTIONS);
	m_pXmlFile = new CXmlFile(_T("filezilla"));
	if (!m_pXmlFile->Load(wxFileName()))
	{
		wxString msg = m_pXmlFile->GetError() + _T("\n\n") + _("For this session the default settings will be used. Any changes to the settings will not be saved.");
		wxMessageBox(msg, _("Error loading xml file"), wxICON_ERROR);
		delete m_pXmlFile;
		m_pXmlFile = 0;
	}
	else
		CreateSettingsXmlElement();

	LoadOptions(nameOptionMap);
}
示例#4
0
COptions::COptions()
{
	m_theOptions = this;
	m_pXmlFile = 0;
	m_pLastServer = 0;

	SetDefaultValues();

	m_save_timer.SetOwner(this);

	auto const nameOptionMap = GetNameOptionMap();
	LoadGlobalDefaultOptions(nameOptionMap);

	CLocalPath const dir = InitSettingsDir();

	CInterProcessMutex mutex(MUTEX_OPTIONS);
	m_pXmlFile = new CXmlFile(dir.GetPath() + _T("filezilla.xml"));
	if (!m_pXmlFile->Load()) {
		wxString msg = m_pXmlFile->GetError() + _T("\n\n") + _("For this session the default settings will be used. Any changes to the settings will not be saved.");
		wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);
		delete m_pXmlFile;
		m_pXmlFile = 0;
	}
	else {
		CreateSettingsXmlElement();
	}

	LoadOptions(nameOptionMap);
}
rptDonthuoctonghop::rptDonthuoctonghop(CWnd *pParent)
	{

	m_nDlgWidth = 565;
	m_nDlgHeight = 220;
	SetDefaultValues();
}
CHMSInsuraceRepor21aDialog::CHMSInsuraceRepor21aDialog(CWnd *pParent)
	{

	m_nDlgWidth = 430;
	m_nDlgHeight = 225;
	SetDefaultValues();
}
void CDlgEditSymbols::OnCbnSelchangeName()
{
	LRESULT index = m_Name.SendMessage(CB_GETCURSEL, (WPARAM) 0, 0);
	int len = m_Name.SendMessage(CB_GETLBTEXTLEN, (WPARAM) index, (LPARAM) 0);

	char *buffer = new char[len+1];
 
	m_Name.SendMessage(CB_GETLBTEXT, (WPARAM) index, (LPARAM) buffer);
	name.Format("%s", buffer);

	delete [] buffer;           
	buffer = NULL;

	if (name.Find("ttlimits") != -1)
	{
		m_Titletext.EnableWindow(true);
		m_ParseResults.EnableWindow(true);
		m_ParseButton.EnableWindow(true);
	}

	else
	{
		m_Titletext.EnableWindow(false);
		m_ParseResults.EnableWindow(false);
		m_ParseButton.EnableWindow(false);
	}

	m_Value.GetWindowText(value);
	m_Value.Clear();
	m_Value.ResetContent();
	SetDefaultValues();
	if (m_Value.SelectString(-1, value) == CB_ERR)
		m_Value.SetWindowText(value);
}
CEMTestnParaRatebyRoom::CEMTestnParaRatebyRoom(CWnd *pParent)
{
	m_szTitle = _T("Patients General Statistics");
	m_nDlgWidth = 420;
	m_nDlgHeight = 125;
	SetDefaultValues();
}
CEMMonthlyDrugIncome::CEMMonthlyDrugIncome(CWnd *pParent)
{
	m_szTitle = _T("Patients General Statistics");
	m_nDlgWidth = 420;
	m_nDlgHeight = 125;
	SetDefaultValues();
}
CRptDanhsachBNVaoVien::CRptDanhsachBNVaoVien(CWnd *pParent)
{

	m_nDlgWidth = 435;
	m_nDlgHeight = 185;
	SetDefaultValues();
}
示例#11
0
bool COptions::Create( bool useAppDataFolder, std::string dynamicDataFolder, std::string pgmFolder )
{
    // Set the file name of the configuration file including full path
    configFileName = dynamicDataFolder.c_str();
    configFileName.append( "config.xml" );
    theLog.WriteLine( "Options         => Name of config file: '%s'.", configFileName.c_str() );

    // Set the file name of the old configuration file
    oldconfigFileName = dynamicDataFolder.c_str();
    oldconfigFileName.append( "config.dat" );

    // Set default configuration values before loading the configuration file and overwriting the default
    SetDefaultValues();

    // Load configuration file and overwrite the previously set defaults
    if (!LoadConfiguration())
        return false;

    // Load game levels data and names
    if (!LoadLevels( useAppDataFolder ? dynamicDataFolder : "", pgmFolder ))
        return false;
    
    // Everything went ok.
    return true;
}
示例#12
0
/** Reads the property configuration files.
 *
 * Clears all current values from the property table, and then reads and 
 * sets properties from the configuration files. All properties read from 
 * configuration files are considered mutable by the application (except for
 * the values of the specified configuration files.
 *
 * @return Zero on success, or a non-zero value on error. Properties will 
 *    be set to default on error, or if not set by one or more of the
 *    configuration files.
 * 
 * @internal
 */
static int ReadPropertyFiles(void)
{
   /* load all default values first - override later with file entries */
   if (SetDefaultValues() != 0)
      return -1;

   /* read global, and then app configuration files */
   if (*s_GlobalPropertyFile)
      if (ReadFileProperties(s_GlobalPropertyFile))
         SLPPropertySet("net.slp.OpenSLPConfigFile", 
               s_GlobalPropertyFile, SLP_PA_READONLY);

   /* read environment specified configuration file */
   if (*s_EnvPropertyFile)
      if (ReadFileProperties(s_EnvPropertyFile))
         SLPPropertySet("net.slp.EnvConfigFile", 
               s_EnvPropertyFile, SLP_PA_READONLY);

   /* if set, read application-specified configuration file */
   if (*s_AppPropertyFile)
      if (ReadFileProperties(s_AppPropertyFile))
         SLPPropertySet("net.slp.AppConfigFile", 
               s_AppPropertyFile, SLP_PA_READONLY);

   return 0;
}
CTMTreatmentActivitybyDept::CTMTreatmentActivitybyDept(CWnd *pParent)
	{

	m_nDlgWidth = 410;
	m_nDlgHeight = 185;
	SetDefaultValues();
	m_bPreview = true;
}
示例#14
0
// --> END_HTML
////////////////////////////////////////////////////////////////////////////////
void KVQH1::init()
{
   SetDefaultValues();
   fChannel = kQH1;
   SetType("QH1");
   fFPGAOutputNumbers = 1;
   LoadPSAParameters();
}
示例#15
0
int ImportTilesDlg::ShowModal(uint width, uint height)
{
    _width = _defaultWidth = width;
    _height = _defaultHeight = height;

    SetDefaultValues();

    return wxDialog::ShowModal();
}
SoundClass::SoundClass(FMOD::System** mainSystemRef, FMOD::ChannelGroup* channelGroup, FMOD_VECTOR position, const char* filePath) : m_FModSysRef(mainSystemRef), m_channelGroupRef(channelGroup)
{
	SetDefaultValues();

	result = (*m_FModSysRef)->createSound( filePath, FMOD_CREATESTREAM | FMOD_3D, 0, &m_audioClip);

	FMODErrorCheck();

	numOfBars = 32;
	barVals = new float[numOfBars];
}
示例#17
0
void TextureDescriptor::InitializeValues()
{
    SetDefaultValues();

    for(int32 i = 0; i < GPU_FAMILY_COUNT; ++i)
    {
        compression[i].Clear();
    }

    exportedAsGpuFamily = GPU_UNKNOWN;
    exportedAsPixelFormat = FORMAT_INVALID;
}
示例#18
0
文件: joyd.c 项目: mmitch/joyd
int main (int argc, char **argv)
/* simple main program */
{
	/* don't tell me that this condition looks ugly... */
	if (    (argc > 2)
	     || (
                   (argc == 2)
                && (
                      (strcmp(argv[1],PRINT_VERSION)      == 0)
		   || (strcmp(argv[1],PRINT_VERSION_LONG) == 0)
		   )
                 )
           ) {
		printf(PROGRAM_VERSION "\n");
		printf(PROGRAM_INFOTEXT "\n");
		exit(0);
	};

	SetDefaultValues();

	if (config.debug > 1) {
		Print(stdout,PROGRAM_VERSION," starting up");
	}

	InstallSignalHandler();

	if (argc > 1) {
		free(config.config_file);
		config.config_file = AllocString(argv[1]);
	}
	
	ReadConfigFile();

	if (config.daemon) {
		ForkToBackground();
	}
	
	OpenJoystick();

	AddMissingCalibrations();

	ActionLoop();

	CloseJoystick();

	Print(stdout,PROGRAM_VERSION," quits now (should've never come around here!?)");

	return 0;
}
示例#19
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    scene = new CustomScene(this);
    ui->graphicsView->setScene(scene);
    /* Enable mouse move events and track those via Scene to allow get scene position */
    ui->graphicsView->setMouseTracking(true);
    SetDefaultValues();
    pixmapItem = NULL;
    pixmapItemJulian = NULL;
    ThreadList = NULL;
    ThreadObjList = NULL;
    ThreadsRunning = 0;
    SelectedEffect = MandelProt;
    /* Not used currently
    appTimer = new AppTimer((AppTimerIf*)this);
    appTimer->SetTimeout(200);*/
    StartCalculation(false);
}
示例#20
0
void CLineProperty::Alloc(int nCurSize,int nOldSize)
{
	if( nCurSize <= 0 )
	{
		Free();
		return;
	}
	if( (nCurSize != nOldSize) || (m_pData == NULL) )
	{			
		Free();

 		if( HSDrawData::m_pHSExternAlloc )
 		{
 			m_pData = (HSDouble*)(*HSDrawData::m_pHSExternAlloc)(nCurSize,HSDoubleType);
 			m_nSize = nCurSize;
 		}

	}
	if( m_pData != NULL )
	{
		SetDefaultValues(m_pData,nCurSize,hx_DefMinValues);
	}
}
CFMUnlockPatientList::CFMUnlockPatientList(CWnd* pParent)
{
	m_nDlgWidth = 500;
	m_nDlgHeight = 475;
	SetDefaultValues();
}
CEMPatientStatbyLocation::CEMPatientStatbyLocation(CWnd *pParent){

	m_nDlgWidth = 500;
	m_nDlgHeight = 190;
	SetDefaultValues();
}
示例#23
0
/*=========================================================================*/
int SLPPropertyReadFile(const char* conffile)
/* Reads and sets properties from the specified configuration file         */
/*                                                                         */
/* conffile     (IN) the path of the config file to read.                  */
/*                                                                         */
/* Returns  -   zero on success. non-zero on error.  Properties will be set*/
/*              to default on error.                                       */
/*=========================================================================*/
{
    char*   line;
    char*   alloced;
    FILE*   fp;
    char*   namestart;
    char*   nameend;
    char*   valuestart;
    char*   valueend; 

    if(SetDefaultValues())
    {
        return -1;
    }

    alloced = xmalloc(4096);
    if(alloced == 0)
    {
        /* out of memory */
        errno = ENOMEM;
        return -1;
    }

    fp = fopen(conffile,"r");
    if(!fp)
    {
        goto CLEANUP;
    }

    /* Set the property that keeps track of conffile */
    SLPPropertySet("net.slp.OpenSLPConfigFile",conffile);

    while(fgets(alloced,4096,fp))
    {
        line = alloced;

        /* trim whitespace */
        while(*line && *line <= 0x20)
        {
            line++;
        }

        if(*line == 0)
        {
            continue;
        }

        /* skip commented lines */
        if(*line == '#' || *line == ';')
        {
            continue;
        }

        /* parse out the property name*/
        namestart = line;
        nameend = line;
        nameend = strchr(nameend,'=');

        if(nameend == 0)
        {
            continue;
        }
        valuestart = nameend + 1;  /* start of value for later*/

        while(*nameend <= 0x20 || *nameend == '=')
        {
            *nameend = 0;
            nameend --;
        }

        /* parse out the property value */
        while(*valuestart && *valuestart <= 0x20)
        {
            valuestart++;
        }

        valueend = valuestart;

        /* Seek to the end of the value */
        while(*valueend)
        {
            valueend++;
        }
        
        /* Remove any whitespace that might be present */
        while(valueend != valuestart && *valueend <= 0x20)
        {
            *valueend = 0;
            valueend --;
        }

        /* set the property */
        if(valuestart && *valuestart)
        {
            SLPPropertySet(namestart, valuestart);
        }
    }   


    CLEANUP:
    if(fp)
    {
        fclose(fp);
    }

    if(alloced)
    {
        xfree(alloced);
    }

    return 0;
}
示例#24
0
文件: main.c 项目: installero/inperc
int main(int argc, char * argv[]) {
  SetDefaultValues();
  SetParams(argc,argv);

  if(TestMode) {
    TestAllFunctions();
    return 0;
  };

  res = fopen (ResFileName, "a") ;

  float * Stick;
  Stick = malloc(ObjectNum*ParamsNum*sizeof(float));

  int e, i;

  float nu_av = 0, nu_disp = 0;

  float * nu;
  nu = malloc(ExperimentNum*sizeof(float));

  for (e=0; e<ExperimentNum; e++) {
    for (i=0; i<ObjectNum; i++) StickRandomInit(Stick_i);
    nu[e] = CountAverageBondsAmount(Stick, BondDistance);
    fprintf(stderr,"%1.5f, %1.5f\n", BondDistance, nu[e]);
  }

  nu_av = 0, nu_disp = 0;
  for (e=0; e<ExperimentNum; e++) nu_av += nu[e];
  nu_av = nu_av/(float)ExperimentNum;
  for (e=0; e<ExperimentNum; e++) nu_disp += pow(nu[e]-nu_av,2);
  nu_disp=sqrt(nu_disp/(float)ExperimentNum);

  fprintf(stderr,"%1.5f, %1.5f±%1.5f\r", BondDistance, nu_av, nu_disp);

  float rs = 0;
  if (ThreeDMode) rs = pow((3/(4*ObjectNum*pi)),0.33333);
  else rs = sqrt(1/(ObjectNum*pi));

  float nu_t = 0;
  if (ThreeDMode) {
    nu_t = ObjectNum*(
            (4*pi*BondDistance*BondDistance*BondDistance/3) +
            (2*pi*StickLength*BondDistance*BondDistance)
          );
  } else {
    nu_t = ObjectNum*(
            (pi*BondDistance*BondDistance) +
            (4*StickLength*BondDistance)+
            (StickFiDistortion ? StickLength*StickLength*(1-(sin(2*StickFiDistortion)/(2*StickFiDistortion)))/StickFiDistortion : 0)
          );
  }
  int color = (nu_t < nu_av + nu_disp && nu_t > nu_av - nu_disp ) ? 32 : 31;
  
  fprintf(res,"%%l\t%%n\t%%rs\t%%a\t%%df\t%%bd\t%%nu\t%%nu_err\t%%nu_t\n");
  fprintf(res,"%1.7f\t%d\t%1.7f\t%1.7f\t%1.7f\t%1.7f\t%1.7f\t%1.7f\t%1.7f\n", StickLength, ObjectNum, rs, LocalizationLength, StickFiDistortion, BondDistance, nu_av, nu_disp, nu_t);

  fprintf(stderr,"\n%1.7f\t%d\t%1.7f\t%1.7f\t%1.7f\t%1.7f %1.7f±%1.7f", StickLength, ObjectNum, rs, LocalizationLength, StickFiDistortion, BondDistance, nu_av, nu_disp);
  fprintf(stderr, "%c[%d;%d;%dm (ν_t = %1.7f)", 0x1B, 1, color, 40, nu_t);
  fprintf(stderr, "%c[%dm\n", 0x1B, 0);

  
  return 0;
}
CCEMPatientStatistic::CCEMPatientStatistic(CWnd *pParent){

	m_nDlgWidth = 1029;
	m_nDlgHeight = 773;
	SetDefaultValues();
}
CEMWeekSynthesisReport::CEMWeekSynthesisReport(CWnd *pParent){

	m_nDlgWidth = 500;
	m_nDlgHeight = 100;
	SetDefaultValues();
}
示例#27
0
CEMQtyAtExam::CEMQtyAtExam(CWnd *pParent)
{
	m_nDlgWidth = 435;
	m_nDlgHeight = 185;
	SetDefaultValues();
}
CEMOperationFosteringListC12::CEMOperationFosteringListC12(CWnd *pParent){

	m_nDlgWidth = 605;
	m_nDlgHeight = 405;
	SetDefaultValues();
}
CPMSExportSheetList::CPMSExportSheetList(CWnd *pParent){

	m_nDlgWidth = 440;
	m_nDlgHeight = 130;
	SetDefaultValues();
}
ECode CCellSignalStrengthGsm::constructor()
{
    return SetDefaultValues();
}