//---------------------------------------------------------------------------
//
// Name:        Dlg2.cpp
// Author:      Standart
// Created:     13/04/07 00:28:45
// Description: Dlg2 class implementation
//
//---------------------------------------------------------------------------

#include "Dlg2.h"

//Do not add custom headers
//wxDev-C++ designer will remove them
////Header Include Start
////Header Include End

//----------------------------------------------------------------------------
// Dlg2
//----------------------------------------------------------------------------
//Add Custom Events only in the appropriate block.
//Code added in other places will be removed by wxDev-C++
////Event Table Start
BEGIN_EVENT_TABLE(Dlg2,wxDialog)
	////Manual Code Start
	////Manual Code End
	
	EVT_CLOSE(Dlg2::OnClose)
	EVT_BUTTON(ID_WXBUTTON2,Dlg2::WxButton2Click)
	EVT_BUTTON(ID_WXBUTTON1,Dlg2::WxButton1Click)
END_EVENT_TABLE()
////Event Table End

Dlg2::Dlg2(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
	CreateGUIControls();
}

Dlg2::~Dlg2()
{
} 

void Dlg2::CreateGUIControls()
{
	//Do not add custom code between
        //GUI Items Creation Start and GUI Items Creation End.
	//wxDev-C++ designer will remove them.
	//Add the custom code before or after the blocks
	////GUI Items Creation Start

	SetTitle(wxT("Mettre du texte pendant un voyage"));
	SetIcon(wxNullIcon);
	SetSize(8,8,443,309);
	Center();
	

	WxButton2 = new wxButton(this, ID_WXBUTTON2, wxT("Annuler"), wxPoint(267,238), wxSize(102,27), 0, wxDefaultValidator, wxT("WxButton2"));

	WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("Valider"), wxPoint(60,238), wxSize(100,27), 0, wxDefaultValidator, wxT("WxButton1"));

	WxEdit4 = new wxTextCtrl(this, ID_WXEDIT4, wxT(""), wxPoint(8,200), wxSize(418,24), 0, wxDefaultValidator, wxT("WxEdit4"));

	WxStaticText4 = new wxStaticText(this, ID_WXSTATICTEXT4, wxT("phrase 4"), wxPoint(14,181), wxDefaultSize, 0, wxT("WxStaticText4"));
	WxStaticText4->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxBOLD, false));

	WxEdit3 = new wxTextCtrl(this, ID_WXEDIT3, wxT(""), wxPoint(8,143), wxSize(417,23), 0, wxDefaultValidator, wxT("WxEdit3"));

	WxEdit2 = new wxTextCtrl(this, ID_WXEDIT2, wxT(""), wxPoint(8,87), wxSize(418,24), 0, wxDefaultValidator, wxT("WxEdit2"));

	WxStaticText3 = new wxStaticText(this, ID_WXSTATICTEXT3, wxT("phrase 3"), wxPoint(13,124), wxDefaultSize, 0, wxT("WxStaticText3"));
	WxStaticText3->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxBOLD, false));

	WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("phrase 2"), wxPoint(15,69), wxDefaultSize, 0, wxT("WxStaticText2"));
	WxStaticText2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxBOLD, false));

	WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("phrase 1"), wxPoint(16,13), wxDefaultSize, 0, wxT("WxStaticText1"));
	WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxBOLD, false));

	WxEdit1 = new wxTextCtrl(this, ID_WXEDIT1, wxT(""), wxPoint(8,32), wxSize(418,24), 0, wxDefaultValidator, wxT("WxEdit1"));
	////GUI Items Creation End
}

void Dlg2::OnClose(wxCloseEvent& /*event*/)
{
	Destroy();
}

/*
 * Dlg2Activate
 */
void Dlg2::Dlg2Activate(wxActivateEvent& event)
{
	// insert your code here
}

/*
 * WxButton2Click
 */
void Dlg2::WxButton2Click(wxCommandEvent& event)
{
	valid2=false;
	Destroy();
}

/*
 * WxButton1Click
 */
void Dlg2::WxButton1Click(wxCommandEvent& event)
{
    valid2=true;
    text01=WxEdit1->GetValue();
    text02=WxEdit2->GetValue();
    text03=WxEdit3->GetValue();
    text04=WxEdit4->GetValue();
	Destroy();
}