UninstallForm::UninstallForm(wxWindow* parent, gcRefPtr<UserCore::UserI> user) : wxFrame(parent, wxID_ANY, PRODUCT_NAME_CATW(L" UnInstaller"), wxDefaultPosition, wxSize(500, 330), wxCAPTION | wxMINIMIZE_BOX | wxSYSTEM_MENU | wxTAB_TRAVERSAL)
{
	m_pUser = user;

	wxPanel* pTitlePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,57 ), wxTAB_TRAVERSAL );
	pTitlePanel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNHIGHLIGHT ) );

	m_labTitle = new wxStaticText(pTitlePanel, wxID_ANY, Managers::GetString(L"#DUN_UNINSTALL_HEADER"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labTitleInfo = new wxStaticText(pTitlePanel, wxID_ANY, Managers::GetString(L"#DUN_UNINSTALL_SUBHEADER"), wxDefaultPosition, wxDefaultSize, 0 );

	m_imgLogo = new wxStaticBitmap(this, wxID_ANY, wxBitmap(wxT("IDI_HEADER"), wxBITMAP_TYPE_RESOURCE ), wxDefaultPosition, wxSize( 150,57 ), 0 );

	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );

	m_butRepair = new wxButton( this, wxID_ANY, Managers::GetString(L"#DUN_REPAIR"), wxDefaultPosition, wxDefaultSize, 0 );
	m_butUninstall = new wxButton( this, wxID_ANY, Managers::GetString(L"#DUN_UNINSTALL"), wxDefaultPosition, wxDefaultSize, 0 );
	m_butCancel = new wxButton( this, wxID_ANY, Managers::GetString(L"#CANCEL"), wxDefaultPosition, wxDefaultSize, 0 );

	wxFont font = m_labTitle->GetFont();
	font.SetWeight(wxFONTWEIGHT_BOLD);
	m_labTitle->SetFont(font);

	m_pContent = new UDFSettingsPanel(this);

	m_bContentSizer = new wxBoxSizer( wxHORIZONTAL );
	m_bContentSizer->Add(m_pContent, 1, wxEXPAND, 5);

	wxBoxSizer* bSizer1 = new wxBoxSizer( wxHORIZONTAL );

	bSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
	bSizer1->Add( m_butRepair, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
	bSizer1->Add( m_butUninstall, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
	bSizer1->Add( m_butCancel, 0, wxALL, 5 );


	wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
	fgSizer2->Add( m_labTitle, 0, wxALL, 5 );
	fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
	fgSizer2->Add( m_labTitleInfo, 0, wxLEFT, 15 );

	pTitlePanel->SetSizer( fgSizer2 );
	pTitlePanel->Layout();


	wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer( 1, 2, 0, 0 );
	fgSizer3->AddGrowableCol( 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer3->Add( pTitlePanel, 1, wxEXPAND, 5 );
	fgSizer3->Add( m_imgLogo, 0, 0, 5 );


	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 5, 1, 0, 0 );
	fgSizer1->AddGrowableCol( 0 );
	fgSizer1->AddGrowableRow( 2 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer1->Add( fgSizer3, 1, wxEXPAND, 5 );
	fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
	fgSizer1->Add( m_bContentSizer, 1, wxEXPAND|wxLEFT|wxRIGHT, 10 );
	fgSizer1->Add( m_staticline1, 1, wxEXPAND, 5 );
	fgSizer1->Add( bSizer1, 1, wxEXPAND, 5 );
	
	SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );

	this->SetSizer( fgSizer1 );
	this->Layout();
	
	this->Centre( wxBOTH );
	SetIcon(wxIcon(wxICON(IDI_ICONNORMAL)));

	Bind(wxEVT_COMMAND_BUTTON_CLICKED, &UninstallForm::onButtonClicked, this);
	Bind(wxEVT_CLOSE_WINDOW, &UninstallForm::onCloseWindow, this);
}
Beispiel #2
0
McfViewerForm::McfViewerForm(wxWindow* parent, gcString mcf) : gcFrame(parent, wxID_ANY, PRODUCT_NAME_CATW(L": Mcf Viewer"), wxDefaultPosition, wxSize(370,500), wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL)
{
	Bind(wxEVT_COMMAND_BUTTON_CLICKED, &McfViewerForm::onButtonClicked, this); 
	Bind(wxEVT_CLOSE_WINDOW, &McfViewerForm::onClose, this);

	this->SetSizeHints( wxSize( 370,400 ), wxDefaultSize );
	
	wxStaticText* m_staticText26 = new wxStaticText( this, wxID_ANY, wxT("Item Id"), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText27 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labId = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("File Version"), wxDefaultPosition, wxSize( 80,-1 ), 0 );
	wxStaticText* m_staticText15 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labVersion = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText23 = new wxStaticText( this, wxID_ANY, wxT("Type"), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText24 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labType = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText16 = new wxStaticText( this, wxID_ANY, wxT("Build"), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText17 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labMCFVers = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText18 = new wxStaticText( this, wxID_ANY, wxT("Flags"), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText19 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labPatch = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("Branch"), wxDefaultPosition, wxDefaultSize, 0 );
	wxStaticText* m_staticText21 = new wxStaticText( this, wxID_ANY, wxT(":"), wxDefaultPosition, wxDefaultSize, 0 );
	m_labBranch = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 );

	m_tcFileTree = new wxTreeCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTR_DEFAULT_STYLE );

	m_butOpen = new gcButton(this, wxID_ANY, L"Open", wxDefaultPosition, wxSize(75,22));

	wxFlexGridSizer* fgSizer11;
	fgSizer11 = new wxFlexGridSizer( 20, 3, 0, 0 );
	fgSizer11->SetFlexibleDirection( wxBOTH );
	fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer11->Add( m_staticText26, 0, 0, 5 );
	fgSizer11->Add( m_staticText27, 0, 0, 5 );
	fgSizer11->Add( m_labId, 0, wxLEFT, 5 );
	
	fgSizer11->Add( m_staticText14, 0, 0, 5 );
	fgSizer11->Add( m_staticText15, 0, 0, 5 );
	fgSizer11->Add( m_labVersion, 0, wxLEFT, 5 );
	
	fgSizer11->Add( m_staticText23, 0, 0, 5 );
	fgSizer11->Add( m_staticText24, 0, 0, 5 );
	fgSizer11->Add( m_labType, 0, wxLEFT, 5 );
	
	fgSizer11->Add( m_staticText16, 0, 0, 5 );
	fgSizer11->Add( m_staticText17, 0, 0, 5 );
	fgSizer11->Add( m_labMCFVers, 0, wxLEFT, 5 );
	
	fgSizer11->Add( m_staticText18, 0, 0, 5 );
	fgSizer11->Add( m_staticText19, 0, 0, 5 );
	fgSizer11->Add( m_labPatch, 0, wxLEFT, 5 );
	
	fgSizer11->Add( m_staticText20, 0, 0, 5 );
	fgSizer11->Add( m_staticText21, 0, 0, 5 );
	fgSizer11->Add( m_labBranch, 0, wxLEFT, 5 );


	wxFlexGridSizer* fgSizer12;
	fgSizer12 = new wxFlexGridSizer( 1, 2, 0, 0 );
	fgSizer12->AddGrowableCol( 0 );
	fgSizer12->AddGrowableRow( 0 );
	fgSizer12->SetFlexibleDirection( wxBOTH );
	fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );

	fgSizer12->Add( fgSizer11, 1, wxEXPAND, 7 );
	fgSizer12->Add( m_butOpen, 1, 0, 5 );

	wxFlexGridSizer* fgSizer10;
	fgSizer10 = new wxFlexGridSizer( 2, 1, 0, 0 );
	fgSizer10->AddGrowableCol( 0 );
	fgSizer10->AddGrowableRow( 1 );
	fgSizer10->SetFlexibleDirection( wxBOTH );
	fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );

	fgSizer10->Add( fgSizer12, 1, wxEXPAND|wxALL, 7 );
	fgSizer10->Add( m_tcFileTree, 1, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( fgSizer10 );
	this->Layout();

	Centre(wxBOTH);

	if (mcf.size() > 0)
		loadMcf(mcf.c_str());
}