///////////////////////////////////////////////////////////////////////////////////////////
// Authors: Eva Bunodiere, Yasmin Kossak
// application.cpp
// Application Class definitions  
// JPC36 Wx-View
// July 25th 2000
// Technical Advisor : Carlos Moreno
///////////////////////////////////////////////////////////////////////////////////////////

#include "application.h"

#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;

#define WXVIEW_MAIN
#include "wx-view.h"

#include "Splash.h"


IMPLEMENT_APP(Application)

bool Application::OnInit()
{
    srand (time(NULL));

    wxSetWorkingDirectory (user_preferences.fullpath.c_str());

    Splash * frame = new Splash(wxDefaultPosition, wxSize(550,400));
	frame->Centre();
	frame->Show(true);
    SetTopWindow(frame);

    return true;
}

int Application::OnExit()
{
    wxSetWorkingDirectory (user_preferences.initial_working_directory.c_str());

    return 0;
}