1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
void Projet_konvertorFrm::WxButton1Click(wxCommandEvent& event)
{
// insert your code here
//Déclaration de quelque var locales...
double value1 = atof((char*)((WxEdit1->GetValue()).c_str()));
double value2 = atof((char*)((WxEdit2->GetValue()).c_str()));
double value3 = atof((char*)((WxEdit3->GetValue()).c_str()));
if( (value1 != 0.0) and (value2 != 0.0) and (value3 != 0.0) )
{
SetStatusText( wxT( "" ) );
wxString text;
text.Printf(_("%4.5f, %4.5f, %4.5f"), value1, value2, value3 );
SetStatusText( text );
k_CART2GEO( value1,
value2,
value3,
0.081819191,
0.003352811,
6366175.0664);
wxString outLongitude;
outLongitude.Printf(_( "%f"), longitude * 180 / PI);
WxEdit4->SetValue( outLongitude );
wxString outLatitude;
outLatitude.Printf(_( "%f"), latitude * 180 / PI);
WxEdit5->SetValue( outLatitude );
wxString outHauteur;
outHauteur.Printf(_( "%f"), hauteur );
WxEdit6->SetValue( outHauteur );
}
else
{
SetStatusText( wxT( "Des valeurs sont manquantes!" ) );
}
} |
Partager