Exemple #1
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 #2
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 #3
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 #4
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 #5
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 #6
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 #7
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 #8
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; 
}
Exemple #9
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
}