Ejemplo n.º 1
0
bool MyApp::OnInit()
{
	MainFrame *frame = new MainFrame(NULL);
    frame->SetIcon(wxICON(datcom)); // To Set App Icon
    frame->Show();
	return true;
}
Ejemplo n.º 2
0
bool PRIMEServer::OnInit()
{
#ifdef _DEBUG
    Utilities::SetStdOutToNewConsole();
#endif

    PRIME::Reply a;
    
    m_frame = new MainFrame( (wxFrame *)NULL , -1, wxString::FromUTF8("FLOW Server") );
    m_frame->SetIcon(wxICON(FLOW));
    m_frame->Show( true );

    a.set_type(PRIME::Reply_ReplyType_SPEED_TEST);
    int size = a.ByteSize();
    m_frame->log(wxString::Format("Size %d", size));
	
    wxString str;
    str.Format("%d",wxThread::GetCPUCount());
    m_frame->log(str);
    //printf("\nValue %d\n", a.type());
    if(wxSocketBase::Initialize()){
        wxString t;
        t = wxString::Format("%d",a.type());
        wxString s(wxT("Socket Base Initialized\n"+t));
        m_frame->log(s);
    } else {
        //m_frame->C3OOutputText->AppendText(wxT("Socket Base NOT Initialized... Exiting!\n"));
    }
    
    return true;
}
Ejemplo n.º 3
0
bool ConfigurationViewerApp::OnInit()
{
  // Create the main application window
  MainFrame *frame = new MainFrame("Configuration Viewer",
                               wxPoint(50, 50), wxSize(450, 340));

    // Give it an icon
#ifdef __WXMSW__
  frame->SetIcon(wxIcon("mondrian"));
#else
  frame->SetIcon(wxIcon( mondrian_xpm ));
#endif

  frame->Show(TRUE);
  SetTopWindow(frame);

  return TRUE;
}
Ejemplo n.º 4
0
	  virtual bool OnInit() {
		  wxInitAllImageHandlers();
		  I18n::Init();
		  MainFrame* window = new MainFrame(NULL);
		  window->SetIcon(wxIcon(wxT("AAAAAAAAAAAAA")));
		  WindowManager::SetMainWindow(window);
		  window->Show(true);
		  window->Centre();
		  return true;
	  }
Ejemplo n.º 5
0
    virtual bool OnInit() {
        // Activate an earlier instance if found,
        // or quit it if argv[1] == wxT("quit")
        bool quit = argc>1 && !wxStricmp(argv[1], wxT("quit"));
        const wxChar* title = wxT("TouchCursor Configuration");
        if (quit) {
            win32funcs::QuitExistingWindow(title);
            return false;
        }
        else {
            bool found = win32funcs::RaiseExistingWindow(title);
            if (found) return false;
        }

        wxXmlResource::Get()->AddHandler(new wxFrameXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxDialogXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxNotebookXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxPanelXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxCheckBoxXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxRadioButtonXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxChoiceXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxListBoxXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxButtonXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxStaticTextXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxTextCtrlXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxSizerXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxStaticBitmapXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxStaticLineXmlHandler);
        wxXmlResource::Get()->AddHandler(new wxHtmlWindowXmlHandler);

        InitXmlResource();

        MainFrame* frame = new MainFrame;
        frame->SetIcon(wxICON(APP));
        assert(frame->GetTitle() == title);
        frame->Show();
        SetTopWindow(frame);
        return true;
    }