Example #1
0
Taiga::Taiga()
    : logged_in(false),
      current_tip_type(TIPTYPE_DEFAULT),
      play_status(PLAYSTATUS_STOPPED),
      ticker_media(0),
      ticker_memory(0),
      ticker_new_episodes(0),
      ticker_queue(0) {
  SetVersionInfo(VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
}
Example #2
0
CLauncherWindow::CLauncherWindow()
: Framework::Win32::CDialog(MAKEINTRESOURCE(IDD_LAUNCHERWINDOW))
, m_pageLoaded(false)
, m_pageLoadTimerId(NULL)
{
	CAppConfig::GetInstance().RegisterPreferenceString(PREF_LAUNCHER_SERVER_NAME, "");
	CAppConfig::GetInstance().RegisterPreferenceString(PREF_LAUNCHER_SERVER_ADDRESS, "");

	SetClassPtr();

	{
		int smallIconSizeX = GetSystemMetrics(SM_CXSMICON);
		int smallIconSizeY = GetSystemMetrics(SM_CYSMICON);
		int bigIconSizeX = GetSystemMetrics(SM_CXICON);
		int bigIconSizeY = GetSystemMetrics(SM_CYICON);

		HICON smallIcon = reinterpret_cast<HICON>(LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAIN), IMAGE_ICON, smallIconSizeX, smallIconSizeY, 0));
		HICON bigIcon = reinterpret_cast<HICON>(LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAIN), IMAGE_ICON, bigIconSizeX, bigIconSizeY, 0));

		SetIcon(ICON_SMALL, smallIcon);
		SetIcon(ICON_BIG, bigIcon);
	}

	try
	{
		m_serverDefs.Read(Framework::CStdStream("servers.xml", "rb"));
	}
	catch(...)
	{

	}

	{
		auto webBrowserPlaceholder = Framework::Win32::CStatic(GetItem(IDC_WEBBROWSER_PLACEHODLER));

		RECT placeHolderRect = webBrowserPlaceholder.GetWindowRect();
		ScreenToClient(m_hWnd, reinterpret_cast<LPPOINT>(&placeHolderRect) + 0);
		ScreenToClient(m_hWnd, reinterpret_cast<LPPOINT>(&placeHolderRect) + 1);

		m_webBrowser = Framework::Win32::CWebBrowser(m_hWnd, placeHolderRect);
	}

	m_serverAddressComboBox = Framework::Win32::CComboBox(GetItem(IDC_SERVERADDRESS_COMBOBOX));
	m_versionInfoLabel = Framework::Win32::CStatic(GetItem(IDC_VERSIONINFO_LABEL));

	FillServerAddressComboBox();
	LoadServerAddressComboBoxSetting();
	SetVersionInfo();
	LoadLoginPage();
}