Exemplo n.º 1
0
float TFastIniSection::ReadFloat(AnsiString Key, float Default)
{
    int index = SearchKey(Key);
    if (index >= 0){
        return StrToFloatDef(Values(index), Default);
    }else{
        return Default;
    }
}
void __fastcall TGridToChartDemo::StringGrid1SetEditText(TObject *Sender,
      int ACol, int ARow, const AnsiString Value)
{
  if (Showing && Chart1->Series[StringGrid1->ColCount-ACol-1] != NULL)
  {
    TChartSeries *Series = Chart1->Series[StringGrid1->ColCount-ACol-1];
    Series->MandatoryValueList->Value[ARow-1] = StrToFloatDef(StringGrid1->Cells[ACol][ARow],0);
    Series->Repaint();
  }
}
Exemplo n.º 3
0
void __fastcall TfrmPropVisor::DownClickDbl(TObject *Sender)
{
  const long double inc = 0.01;
  long double value;
  try{
    value = StrToFloatDef(((TEdit*)((TCSpinButton*)Sender)->FocusControl)->Text, 1);
  }catch(...){
    return;}
  if( (value - inc) > 0.0 )
    value -= inc;
  else
    value = 1;
  ((TEdit*)((TCSpinButton*)Sender)->FocusControl)->Text = FloatToStr(value);
}
Exemplo n.º 4
0
//---------------------------------------------------------------------------
double StrToFloat(const UnicodeString & Value)
{
  return StrToFloatDef(Value, 0.0);
}
Exemplo n.º 5
0
void __fastcall TfrmPropVisor::edtPasoGridYChange(TObject *Sender)
{
  if( StrToFloatDef(edtPasoGridY->Text,1) > 0)
    dsgPrevia->GridStepY = StrToFloatDef(edtPasoGridY->Text,1);
}
Exemplo n.º 6
0
void __fastcall TfrmPropVisor::edtMarksLongYChange(TObject *Sender)
{
  dsgPrevia->MarksLengthAxeY = StrToFloatDef(edtMarksLongY->Text,1);
}
Exemplo n.º 7
0
void __fastcall TfrmPropVisor::edtMarksStepYChange(TObject *Sender)
{
  if( StrToFloatDef(edtMarksStepY->Text,1) > 0)
    dsgPrevia->MarksStepY = StrToFloatDef(edtMarksStepY->Text,1);
}
Exemplo n.º 8
0
void __fastcall TfrmPropVisor::edtLabelStepXChange(TObject *Sender)
{
  if( StrToFloatDef(edtLabelStepX->Text, 1) > 0 )
    dsgPrevia->LabelsStepX = StrToFloatDef(edtLabelStepX->Text, 1);
}
Exemplo n.º 9
0
float TIniFile::ReadFloat(const wxString &Section, const wxString &Ident,
  float Default)
{
	return StrToFloatDef(ReadString(Section, Ident, FloatToStr(Default)),
	  Default);
}