Exemple #1
0
BOOL CLangPage::OnInitDialog()
{
  CPropertyPage::OnInitDialog();

  LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));

  UString temp = NWindows::MyLoadString(IDS_LANG_ENGLISH);
  NativeLangString(temp, NWindows::MyLoadString(IDS_LANG_NATIVE));
  int index = (int)m_cmbLang.AddString(GetSystemString(temp));
  m_cmbLang.SetItemData(index, _paths.Size());
  _paths.Add(L"-");
  m_cmbLang.SetCurSel(0);

  const FString dirPrefix = GetLangDirPrefix();
  NWindows::NFile::NFind::CEnumerator enumerator(dirPrefix + FTEXT("*.txt"));
  NWindows::NFile::NFind::CFileInfo fi;
  CLang lang;
  UString error;

  while (enumerator.Next(fi))
  {
    if (fi.IsDir())
      continue;
    const int kExtSize = 4;
    if (fi.Name.Len() < kExtSize)
      continue;
    unsigned pos = fi.Name.Len() - kExtSize;
    if (!StringsAreEqualNoCase_Ascii(fi.Name.Ptr(pos), ".txt"))
      continue;

    if (!LangOpen(lang, dirPrefix + fi.Name))
    {
      error.Add_Space_if_NotEmpty();
      error += fs2us(fi.Name);
      continue;
    }

    const UString shortName = fs2us(fi.Name.Left(pos));
    UString s = shortName;
    const wchar_t *eng = lang.Get(IDS_LANG_ENGLISH);
    if (eng)
      s = eng;
    const wchar_t *native = lang.Get(IDS_LANG_NATIVE);
    if (native)
      NativeLangString(s, native);
    index = (int)m_cmbLang.AddString(GetSystemString(s));
    m_cmbLang.SetItemData(index, _paths.Size());
    _paths.Add(shortName);
    if (g_LangID.IsEqualTo_NoCase(shortName))
      m_cmbLang.SetCurSel(index);
  }

  if (!error.IsEmpty())
    ::MessageBoxW(m_hWnd, error, L"Error in Lang file", MB_ICONERROR);

  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #2
0
bool CLangPage::OnInit()
{
  LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));

  _langCombo.Attach(GetItem(IDC_LANG_LANG));

  UString temp = MyLoadString(IDS_LANG_ENGLISH);
  NativeLangString(temp, MyLoadString(IDS_LANG_NATIVE));
  int index = (int)_langCombo.AddString(temp);
  _langCombo.SetItemData(index, _paths.Size());
  _paths.Add(L"-");
  _langCombo.SetCurSel(0);

  const FString dirPrefix = GetLangDirPrefix();
  NFile::NFind::CEnumerator enumerator(dirPrefix + FTEXT("*.txt"));
  NFile::NFind::CFileInfo fi;
  CLang lang;
  UString error;
  
  while (enumerator.Next(fi))
  {
    if (fi.IsDir())
      continue;
    const int kExtSize = 4;
    if (fi.Name.Len() < kExtSize)
      continue;
    unsigned pos = fi.Name.Len() - kExtSize;
    if (!StringsAreEqualNoCase_Ascii(fi.Name.Ptr(pos), ".txt"))
      continue;

    if (!LangOpen(lang, dirPrefix + fi.Name))
    {
      if (!error.IsEmpty())
        error += L' ';
      error += fs2us(fi.Name);
      continue;
    }
    
    const UString shortName = fs2us(fi.Name.Left(pos));
    UString s = shortName;
    const wchar_t *eng = lang.Get(IDS_LANG_ENGLISH);
    if (eng)
      s = eng;
    const wchar_t *native = lang.Get(IDS_LANG_NATIVE);
    if (native)
      NativeLangString(s, native);
    index = (int)_langCombo.AddString(s);
    _langCombo.SetItemData(index, _paths.Size());
    _paths.Add(shortName);
    if (g_LangID.IsEqualToNoCase(shortName))
      _langCombo.SetCurSel(index);
  }
  
  if (!error.IsEmpty())
    MessageBoxW(0, error, L"Error in Lang file", MB_OK | MB_ICONSTOP);
  return CPropertyPage::OnInit();
}
Exemple #3
0
// Find a CLang by name, if not found, add it
CLangMngr::CLang * CLangMngr::GetLang(const char *name)
{
	for (size_t iter = 0; iter < m_Languages.length(); ++iter)
	{
		if (strcmp(m_Languages[iter]->GetName(), name) == 0)
			return m_Languages[iter];
	}

	CLang *p = new CLang(name);
	p->SetMngr(this);

	m_Languages.append(p);
	return p;
}
Exemple #4
0
UString LangString(UInt32 langID)
{
  const wchar_t *s = g_Lang.Get(langID);
  if (s)
    return s;
  return MyLoadString(langID);
}
Exemple #5
0
void LangString_OnlyFromLangFile(UInt32 langID, UString &dest)
{
  dest.Empty();
  const wchar_t *s = g_Lang.Get(langID);
  if (s)
    dest = s;
}
Exemple #6
0
void ReloadLang()
{
  g_Lang.Clear();
  ReadRegLang(g_LangID);
  #ifndef _UNICODE
  if (g_IsNT)
  #endif
  {
    if (g_LangID.IsEmpty())
    {
      OpenDefaultLang();
      return;
    }
  }
  if (g_LangID.Len() > 1 || g_LangID[0] != L'-')
  {
    FString s = us2fs(g_LangID);
    if (s.Find(FCHAR_PATH_SEPARATOR) < 0)
    {
      if (s.Find(FTEXT('.')) < 0)
        s += FTEXT(".txt");
      s.Insert(0, GetLangDirPrefix());
    }
    LangOpen(g_Lang, s);
  }
}
Exemple #7
0
const char *CLangMngr::GetDef(const char *langName, const char *key, int &status)
{
	CLang *lang = GetLangR(langName);

	keytbl_val &val = KeyTable.AltFindOrInsert(ke::AString(key)); //KeyTable[make_string(key)];
	if (lang == NULL)
	{
		status = ERR_BADLANG;
		return NULL;
	} else if (val.index == -1) {
		status = ERR_BADKEY;
		return NULL;
	} else {
		status = 0;
		return lang->GetDef(val.index, status);
	}
}
Exemple #8
0
BOOL CStartTargetDB::OnInitDialog() 
{
	CDialog::OnInitDialog();

	// Windows의 Button 등의 글자를 선택한 언어에 맞게 보여진다.
	SetWindowText(theLang.GetMessage(WN_STD_TITLE));
	m_su_ok.SetWindowText(theLang.GetMessage(WN_STD_OK));
	m_su_cancel.SetWindowText(theLang.GetMessage(WN_STD_CANCEL));

	// Master를 검사하여, Master가 실행이 안 되어있으면, 실행시킨다.
	if( cCUBRID->bCheckMaster() )
		if( !cCUBRID->bStartMaster() )
		{
			AfxMessageBox(theLang.GetMessage(MSG_MASTER_ERROR), MB_OK | MB_ICONSTOP);
			return FALSE;
		}


	// 기동된 DB를 가져온다. DB가 없으면, OK Buttone을 Disable한다.
	DBNAMEPtr_t pStartList = cCUBRID->pReqStopDBList();
	if( !pStartList )
	{
		m_su_ok.EnableWindow(false);
		return TRUE;
	}

	DBNAMEPtr_t pCur = pStartList;
	int index = 0;

	// ListBox에서 보여 줄수 있는 DB의 최대 갯수
	for (int i = 0; i < MAXSERVER; i++) {
		m_ListDB.InsertString( index, pCur->sName );

		if( !pCur->next ) break;
		pCur = pCur->next;
		index++;
	}

	cCUBRID->bDestoryDBList( pStartList );

	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #9
0
void LangSetDlgItemText(HWND dialog, UInt32 controlID, UInt32 langID)
{
  const wchar_t *s = g_Lang.Get(langID);
  if (s)
  {
    CWindow window(GetDlgItem(dialog, controlID));
    window.SetText(s);
  }
}
Exemple #10
0
void CUCPDetail::CheckFile(CEdit &edit, bool file)
{
CFilename	tmpFile;

	edit.GetWindowText(tmpFile);
	
	if (file) {
		if (tmpFile.isIncludeDir()) {
			MessageBox(theLang.GetMessage(MSG_UCP_PATH));
			m_ucpd_ok.EnableWindow(false);
			return;
		}

		tmpFile = theEnv.GetUniCAS() + "\\bin\\" + tmpFile;
		tmpFile.Unix2Dos();
		
		if (_access(LPCSTR(tmpFile), 0)) {
			m_ucpd_ok.EnableWindow(false);
			return;
		}
	} else {
		if (tmpFile.isFullpath()) {
			MessageBox(theLang.GetMessage(MSG_UCP_FULLPATH));
			m_ucpd_ok.EnableWindow(false);
			return;
		}

		if (tmpFile.isIncludeDosPath()) {
			MessageBox(theLang.GetMessage(MSG_UCP_DOSPATH));
			m_ucpd_ok.EnableWindow(false);
			return;
		}
		
		tmpFile = theEnv.GetUniCAS() + '\\' + tmpFile;
		tmpFile.Unix2Dos();
		
		if (_access(LPCSTR(tmpFile), 0)) {
			m_ucpd_ok.EnableWindow(false);
			return;
		}
	}

	EnableApply();
}
Exemple #11
0
bool CEnv::GetEnviornment()
{
    CFilename	cubrid, cubrid_databases, unicas;
    SetCUBRIDEnvVar();

    if (!getenv(ENV_CUBRID)) {
        m_errmsg.Format(MSG_ENV_ERROR, ENV_CUBRID);
        return false;
    } else if (!getenv(ENV_CUBRID_DATABASES)) {
        m_errmsg.Format(MSG_ENV_ERROR, ENV_CUBRID_DATABASES);
        return false;
    } else if (!getenv(ENV_CUBRID_LANG)) {
        m_errmsg.Format(MSG_ENV_ERROR, ENV_CUBRID_LANG);
        return false;
    } else {
        theLang.ReadMessage(getenv(ENV_CUBRID), getenv(ENV_CUBRID_LANG));
    }

    cubrid.Format("%s", getenv(ENV_CUBRID));
    cubrid.TrimRight("\\");
    cubrid.MakeLower();
    cubrid.GetDriver(m_cubrid_driver, m_cubrid);

    cubrid_databases.Format("%s", getenv(ENV_CUBRID_DATABASES));
    cubrid_databases.TrimRight("\\");
    cubrid_databases.MakeLower();
    cubrid_databases.GetDriver(m_cubrid_databases_driver, m_cubrid_databases);

    unicas.Format("%s", getenv(ENV_CUBRID));
    unicas.TrimRight("\\");
    unicas.MakeLower();
    unicas.GetDriver(m_unicas_driver, m_unicas);

    if (!CheckCUBRID()) {
        m_errmsg.Format(theLang.GetMessage(MSG_INSTALL_ERROR), "CUBRID");
        return false;
    }
    if (!CheckUniCAS()) {
        m_errmsg.Format(theLang.GetMessage(MSG_INSTALL_ERROR), "CUBRIDCAS");
        return false;
    }

    return true;
}
Exemple #12
0
void LangString(UInt32 langID, UString &dest)
{
  const wchar_t *s = g_Lang.Get(langID);
  if (s)
  {
    dest = s;
    return;
  }
  MyLoadString(langID, dest);
}
Exemple #13
0
int SetLangID( int langID )
{
	int nRet = 0;
	int curID = s_SysLang.GetLangID();

	if ( curID != langID )
    {
    	nRet = s_SysLang.SetLangID( langID );
    	if ( nRet == 0 )
        {    
        	char path[256];
        	const char *pLangFile = s_SysLang.GetLangFile( langID );
        	snprintf( path, sizeof(path), "%s/%s", SYS_CONFIG_LANG_PATH, pLangFile );
        	nRet = s_SysLang.LoadLangFile( path );
        	if ( nRet != 0 ) s_SysLang.SetLangID( curID );
        }
    }
    
	return nRet;
}
Exemple #14
0
BOOL CAboutDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	CString serverVersion;

	serverVersion.Format("CUBRID %s", PRODUCT_STRING);
	m_txt_msg.SetWindowText((LPCTSTR)serverVersion);
	m_ok.SetWindowText(theLang.GetMessage(WN_ABT_OK));

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #15
0
BOOL CShutdown::OnInitDialog() 
{
int	index = 0;

	CDialog::OnInitDialog();

	// Windows의 Button 등의 글자를 선택한 언어에 맞게 보여진다.
	SetWindowText(theLang.GetMessage(WN_SHD_TITLE));
	m_ss_ok.SetWindowText(theLang.GetMessage(WN_SHD_OK));
	m_ss_cancel.SetWindowText(theLang.GetMessage(WN_SHD_CANCEL));

	for (int i = 0; i < MAXSERVER; i++) {
		if (!g_Server[i].m_DBName.IsEmpty()) {
			m_ListDB.InsertString(index, LPCSTR(g_Server[i].m_DBName));
			index++;
		}
	}

	if (m_ListDB.GetCount() == 0) m_ss_ok.EnableWindow(false);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #16
0
void LangSetDlgItems_Colon(HWND dialog, const UInt32 *ids, unsigned numItems)
{
  for (unsigned i = 0; i < numItems; i++)
  {
    UInt32 id = ids[i];
    const wchar_t *s = g_Lang.Get(id);
    if (s)
    {
      CWindow window(GetDlgItem(dialog, id));
      UString s2 = s;
      s2 += L':';
      window.SetText(s2);
    }
  }
}
Exemple #17
0
void CUCMDetail::OnUcmdRestart() 
{
#ifdef UNICAS_ON
int	index;
char err_msg[100];
int	rc;

	index = m_ucmd_list.GetNextItem(-1, LVNI_ALL | LVNI_SELECTED);
	if (index == -1) { 
		m_ucmd_restart.EnableWindow(false);
		return;
	} else {
		if (AfxMessageBox(theLang.GetMessage(MSG_UC_RESTART), MB_YESNO | MB_ICONQUESTION) == IDYES) {
			rc = uc_restart((char *)LPCSTR(m_broker), index+1, err_msg);
		}
	}
#endif
}
Exemple #18
0
void LangSetDlgItems(HWND dialog, const UInt32 *ids, unsigned numItems)
{
  unsigned i;
  for (i = 0; i < ARRAY_SIZE(kLangPairs); i++)
  {
    const CIDLangPair &pair = kLangPairs[i];
    CWindow window(GetDlgItem(dialog, pair.ControlID));
    if (window)
    {
      const wchar_t *s = g_Lang.Get(pair.LangID);
      if (s)
        window.SetText(s);
    }
  }

  for (i = 0; i < numItems; i++)
  {
    UInt32 id = ids[i];
    LangSetDlgItemText(dialog, id, id);
  }
}
Exemple #19
0
BOOL CUCPDetail::OnInitDialog()
{
char	tempstr[100];

	CDialog::OnInitDialog();
	
	if (!m_ucinfo) {
		m_ucinfo = new CUCInfo();
		m_ucinfo->m_broker = m_tmp_broker;
		m_ucinfo->m_broker_port = m_tmp_port;
		m_ucinfo->m_appl_server_shm_id = m_tmp_shmid;
	} else {
		m_ucpd_broker.SetReadOnly(true);
	}
	
	CString	title;
	title.Format(theLang.GetMessage(WN_UPD_TITLE), m_ucinfo->m_broker);
	SetWindowText(title);

	m_ucpd_txt_cp.SetWindowText(theLang.GetMessage(WN_UPD_COMMON_PROPERTY));
	m_ucpd_txt_broker.SetWindowText(theLang.GetMessage(WN_UPD_BROKER));
	m_ucpd_broker.SetWindowText(LPCSTR(m_ucinfo->m_broker));
	m_ucpd_service.SetCheck(m_ucinfo->m_service);
	if (m_ucinfo->m_service) {
		m_ucpd_service.SetWindowText(theLang.GetMessage(WN_UPD_SERVICE_ON));
	} else {
		m_ucpd_service.SetWindowText(theLang.GetMessage(WN_UPD_SERVICE_OFF));
	}
	m_ucpd_txt_appl_server.SetWindowText(theLang.GetMessage(WN_UPD_APPL_SERVER));
    CEdit* pComboEdit=(CEdit*)(GetDlgItem( IDC_UCPD_STYPE )->GetWindow(GW_CHILD));
    pComboEdit->SetReadOnly();
	m_ucpd_appl_server.SetCurSel(m_ucinfo->m_appl_server);
	m_ucpd_more.SetWindowText(theLang.GetMessage(WN_UPD_MORE));
	if (m_ucinfo->m_appl_server == 0) {
		m_ucpd_more.EnableWindow(false);
	} else {
		m_ucpd_more.EnableWindow(true);
	}
	m_ucpd_txt_broker_port.SetWindowText(theLang.GetMessage(WN_UPD_BROKER_PORT));
	m_ucpd_broker_port.SetWindowText(LPCSTR(m_ucinfo->m_broker_port));
	m_ucpd_txt_appl_server_shm_id.SetWindowText(theLang.GetMessage(WN_UPD_APPL_SERVER_SHM_ID));
	m_ucpd_appl_server_shm_id.SetWindowText(LPCSTR(m_ucinfo->m_appl_server_shm_id));

	m_ucpd_txt_as.SetWindowText(theLang.GetMessage(WN_UPD_APPLICATION_SERVER));
	m_ucpd_auto_add_appl_server.SetWindowText(theLang.GetMessage(WN_UPD_AUTO_ADD_APPL_SERVER));
	m_ucpd_auto_add_appl_server.SetCheck(m_ucinfo->m_auto_add_appl_server);
	m_ucpd_txt_min_num_appl_server.SetWindowText(theLang.GetMessage(WN_UPD_MIN_NUM_APPL_SERVER));
	sprintf(tempstr, "%d", m_ucinfo->m_min_num_appl_server);
	m_ucpd_min_num_appl_server.SetWindowText(tempstr);
	m_ucpd_txt_max_num_appl_server.SetWindowText(theLang.GetMessage(WN_UPD_MAX_NUM_APPL_SERVER));
	sprintf(tempstr, "%d", m_ucinfo->m_max_num_appl_server);
	m_ucpd_max_num_appl_server.SetWindowText(tempstr);
	m_ucpd_txt_appl_server_max_size.SetWindowText(theLang.GetMessage(WN_UPD_APPL_SERVER_MAX_SIZE));
	sprintf(tempstr, "%d", m_ucinfo->m_appl_server_max_size);
	m_ucpd_appl_server_max_size.SetWindowText(tempstr);

	m_ucpd_txt_li.SetWindowText(theLang.GetMessage(WN_UPD_LOG_INFORMATION));
	m_ucpd_txt_log_dir.SetWindowText(theLang.GetMessage(WN_UPD_LOG_DIR));
	m_ucpd_log_dir.SetWindowText(LPCSTR(m_ucinfo->m_log_dir));
	if (m_ucinfo->m_log_backup) {
		m_ucpd_log_backup.SetWindowText(theLang.GetMessage(WN_UPD_LOG_BACKUP_ON));
	} else {
		m_ucpd_log_backup.SetWindowText(theLang.GetMessage(WN_UPD_LOG_BACKUP_OFF));
	}
	m_ucpd_log_backup.SetCheck(m_ucinfo->m_log_backup);
	if (m_ucinfo->m_sql_log) {
		m_ucpd_sql_log.SetWindowText(theLang.GetMessage(WN_UPD_SQL_LOG_ON));
	} else {
		m_ucpd_sql_log.SetWindowText(theLang.GetMessage(WN_UPD_SQL_LOG_OFF));
	}
	m_ucpd_sql_log.SetCheck(m_ucinfo->m_sql_log);
	if (m_ucinfo->m_access_log) {
		m_ucpd_access_log.SetWindowText(theLang.GetMessage(WN_UPD_ACCESS_LOG_ON));
	} else {
		m_ucpd_access_log.SetWindowText(theLang.GetMessage(WN_UPD_ACCESS_LOG_OFF));
	}
	m_ucpd_access_log.SetCheck(m_ucinfo->m_access_log);

	m_ucpd_txt_sc.SetWindowText(theLang.GetMessage(WN_UPD_SECURITY));
	if (m_ucinfo->m_security) {
		m_ucpd_security.SetWindowText(theLang.GetMessage(WN_UPD_SECURITY_ON));
	} else {
		m_ucpd_security.SetWindowText(theLang.GetMessage(WN_UPD_SECURITY_OFF));
	}
	m_ucpd_security.SetCheck(m_ucinfo->m_security);
	m_ucpd_txt_access_list.SetWindowText(theLang.GetMessage(WN_UPD_ACCESS_LIST));
	m_ucpd_access_list.SetWindowText(LPCSTR(m_ucinfo->m_access_list));

	m_ucpd_txt_etc.SetWindowText(theLang.GetMessage(WN_UPD_ETC));
	m_ucpd_txt_source_env.SetWindowText(theLang.GetMessage(WN_UPD_SOURCE_ENV));
	m_ucpd_source_env.SetWindowText(LPCSTR(m_ucinfo->m_source_env));
	m_ucpd_txt_time_to_kill.SetWindowText(theLang.GetMessage(WN_UPD_TIME_TO_KILL));
	m_ucpd_time_to_kill.SetWindowText(LPCSTR(m_ucinfo->m_time_to_kill));
	m_ucpd_txt_session_timeout.SetWindowText(theLang.GetMessage(WN_UPD_SESSION_TIMEOUT));
	m_ucpd_session_timeout.SetWindowText(LPCSTR(m_ucinfo->m_session_timeout));
	m_ucpd_txt_job_queue_size.SetWindowText(theLang.GetMessage(WN_UPD_JOB_QUEUE_SIZE));
	m_ucpd_job_queue_size.SetWindowText(LPCSTR(m_ucinfo->m_job_queue_size));

	m_ucpd_ok.SetWindowText(theLang.GetMessage(WN_UPD_OK));
	m_ucpd_cancel.SetWindowText(theLang.GetMessage(WN_UPD_CANCEL));
//	m_ucpd_ok.EnableWindow(false);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #20
0
const char *GetFontLib( int langID )
{
	return s_SysLang.GetFontLib( langID );
}
Exemple #21
0
int GetFontWidth( int langID )
{
	return s_SysLang.GetFontWidth( langID );
}
Exemple #22
0
bool LangOpen(CLang &lang, CFSTR fileName)
{
  return lang.Open(fileName, L"7-Zip");
}
Exemple #23
0
const char *GetCharSet()
{
    return s_SysLang.GetCharSet( s_SysLang.GetLangID() );
}
Exemple #24
0
const char *GetLangSufix( int langID )
{
	return s_SysLang.GetLangSufix( langID );
}
Exemple #25
0
const char *GetLangName( int langID )
{
	return s_SysLang.GetLangName( langID );
}
Exemple #26
0
void LangSetWindowText(HWND window, UInt32 langID)
{
  const wchar_t *s = g_Lang.Get(langID);
  if (s)
    MySetWindowText(window, s);
}
Exemple #27
0
int GetIDList( int **ppList )
{
	return s_SysLang.GetIDList( ppList );
}
Exemple #28
0
BOOL CUCMDetail::OnInitDialog() 
{
	CDialog::OnInitDialog();

	/* get window size */
	m_flag = true;
	GetClientRect(m_main_client);

	/* display title */
	CString	title;
	title.Format(theLang.GetMessage(WN_UMD_TITLE), LPCSTR(m_broker));
	SetWindowText(title);
	m_ucmd_add.SetWindowText(theLang.GetMessage(WN_UMD_ADD));
	m_ucmd_drop.SetWindowText(theLang.GetMessage(WN_UMD_DROP));
	m_ucmd_restart.SetWindowText(theLang.GetMessage(WN_UMD_RESTART));
	m_ucmd_cancel.SetWindowText(theLang.GetMessage(WN_UMD_CANCEL));

	m_ucmd_list.InsertColumn(0, theLang.GetMessage(TITLE_UCM_ID), LVCFMT_CENTER, 3*10);
	m_ucmd_list.InsertColumn(1, theLang.GetMessage(TITLE_UCM_PID), LVCFMT_CENTER, 5*10);
	m_ucmd_list.InsertColumn(2, theLang.GetMessage(TITLE_UCM_C), LVCFMT_CENTER, 5*10);
	m_ucmd_list.InsertColumn(3, theLang.GetMessage(TITLE_UCM_PORT), LVCFMT_CENTER, 6*10);
	m_ucmd_list.InsertColumn(4, theLang.GetMessage(TITLE_UCM_STATUS), LVCFMT_CENTER, 6*10);
	m_ucmd_list.InsertColumn(5, theLang.GetMessage(TITLE_UCM_LASTACCESSTIME), LVCFMT_CENTER, 15*10);
	m_ucmd_list.InsertColumn(6, theLang.GetMessage(TITLE_UCM_ACTION), LVCFMT_CENTER, 20*10);

	Display();

	SetTimer(1031, 500, NULL);

	if (m_autoadd) {
		m_ucmd_add.EnableWindow(false);
		m_ucmd_drop.EnableWindow(false);
	} else {
		m_ucmd_add.EnableWindow(true);
		m_ucmd_drop.EnableWindow(true);
	}

	m_ucmd_restart.EnableWindow(false);


	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #29
0
void CLangMngr::MergeDefinitions(const char *lang, ke::Vector<sKeyDef> &tmpVec)
{
	CLang * language = GetLang(lang);
	if (language)
		language->MergeDefinitions(tmpVec);
}
Exemple #30
0
BOOL CWas::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	SetWindowText(theLang.GetMessage(WN_WAS_TITLE));
	if (m_ucinfo) {
		m_was_enc_appl.SetWindowText(theLang.GetMessage(WN_WAS_ENC_APPL));
		m_was_enc_appl.SetCheck(m_ucinfo->m_enc_appl);
		m_was_session.SetWindowText(theLang.GetMessage(WN_WAS_SESSION));
		m_was_session.SetCheck(m_ucinfo->m_session);
		m_was_set_cookie.SetWindowText(theLang.GetMessage(WN_WAS_SET_COOKIE));
		m_was_set_cookie.SetCheck(m_ucinfo->m_set_cookie);
		m_was_entry_value_trim.SetWindowText(theLang.GetMessage(WN_WAS_ENTRY_VALUE_TRIM));
		m_was_entry_value_trim.SetCheck(m_ucinfo->m_entry_value_trim);
		m_was_oid_check.SetWindowText(theLang.GetMessage(WN_WAS_OID_CHECK));
		m_was_oid_check.SetCheck(m_ucinfo->m_oid_check);

		m_was_txt_appl_root.SetWindowText(theLang.GetMessage(WN_WAS_APPL_ROOT));
		m_was_appl_root.SetWindowText(m_ucinfo->m_appl_root);
		m_was_txt_file_upload_temp_dir.SetWindowText(theLang.GetMessage(WN_WAS_FILE_UPLOAD_TEMP_DIR));
		m_was_file_upload_temp_dir.SetWindowText(m_ucinfo->m_file_upload_temp_dir);
		m_was_txt_error_log.SetWindowText(theLang.GetMessage(WN_WAS_ERROR_LOG));
		m_was_error_log.SetCurSel(m_ucinfo->m_error_log);
	    CEdit* pComboEdit=(CEdit*)(GetDlgItem( IDC_WAS_ERRLOG )->GetWindow(GW_CHILD));
		pComboEdit->SetReadOnly();
		m_was_txt_file_upload_delimiter.SetWindowText(theLang.GetMessage(WN_WAS_FILE_UPLOAD_DELIMITER));
		m_was_file_upload_delimiter.SetWindowText(m_ucinfo->m_file_upload_delimiter);
	}
	m_was_apply.SetWindowText(theLang.GetMessage(WN_WAS_OK));
	m_was_cancel.SetWindowText(theLang.GetMessage(WN_WAS_CANCEL));

	m_was_apply.EnableWindow(false);

	return TRUE; 
}