InstallPage.cpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include "InstallPage.h"
  2. InstallationPage::InstallationPage(CPaintManagerUI* m_pm)
  3. {
  4. this->m_pm = m_pm;
  5. InitControls();
  6. InitLanguage();
  7. }
  8. InstallationPage::~InstallationPage()
  9. {
  10. LayoutHome = NULL;
  11. Btninstall = NULL;
  12. BtnIconSelectFolder = NULL;
  13. BtnTextSelectFolder = NULL;
  14. TextShowContentLink = NULL;
  15. CheckInstallSetting = NULL;
  16. EdFilepath = NULL;
  17. }
  18. void InstallationPage::InitControls()
  19. {
  20. LayoutHome = static_cast<CVerticalLayoutUI*>(m_pm->FindControl(UI_LayoutHome));
  21. Btninstall = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnInstall));
  22. BtnIconSelectFolder = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnIconSelectFolder));
  23. BtnTextSelectFolder = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnTextSelectFolder));
  24. TxtByClickInstall = static_cast<CTextUI*>(m_pm->FindControl(UI_TxtByClickInstall));
  25. BtnTermsService = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnTermsService));
  26. TxtAnd = static_cast<CTextUI*>(m_pm->FindControl(UI_TxtAnd));
  27. BtnPrivacyPolicy = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnPrivacyPolicy));
  28. InstallationfolderTitle = static_cast<CLabelUI*>(m_pm->FindControl(UI_LbInstallationfolderTitle));
  29. TextShowContentLink = static_cast<CTextUI*>(m_pm->FindControl(UI_TextShowContentLink));//因无法修改超链颜色,所以暂时停用
  30. CheckInstallSetting = static_cast<CCheckBoxUI*>(m_pm->FindControl(UI_CheckInstallSetting));
  31. EdFilepath = static_cast<CRichEditUI*>(m_pm->FindControl(UI_EdFilepath));
  32. EdFilepath->SetContextMenuUsed(true);
  33. Lbicon = static_cast<CButtonUI*>(m_pm->FindControl(UI_Lbicon));
  34. BtnClose = static_cast<CButtonUI*>(m_pm->FindControl(UI_BtnClose));
  35. }
  36. void InstallationPage::InitLanguage()
  37. {
  38. InstallationfolderTitle->SetText(UIstr(TextType::Text_InstallPath));
  39. Btninstall->SetText(UIstr(TextType::Btn_Install));
  40. BtnTextSelectFolder->SetText(UIstr(TextType::Btn_FilePath));
  41. EdFilepath->SetText(PathCore::smPath_Install.c_str());
  42. FolderCore::GetOrCreateFolderPath(PathCore::smPath_Install);
  43. TextShowContentLink->SetText(UIstr(TextType::Link_Install));
  44. CheckInstallSetting->SetText(UIstr(TextType::Btn_CutomInstall));
  45. Lbicon->SetText(L"▼");
  46. TxtByClickInstall->SetText(UIstr(TextType::Txt_ByClickInstall));
  47. BtnTermsService->SetText(UIstr(TextType::Btn_TermsService));
  48. TxtAnd->SetText(UIstr(TextType::Txt_And));
  49. BtnPrivacyPolicy->SetText(UIstr(TextType::Btn_PrivacyPolicy));
  50. }
  51. CDuiString InstallationPage::UIstr(TextType textType)
  52. {
  53. CDuiString duiStr(CLanguage::GetText(textType).c_str());
  54. return duiStr;
  55. }
  56. void InstallationPage::InitValue()
  57. {
  58. }