예제 #1
0
	std::wstring render(bool propper, std::wstring syntax, std::wstring date_format = DATE_FORMAT, DWORD langId = 0) const {
		if (propper) {
			// To obtain the appropriate message string from the message file, load the message file with the LoadLibrary function and use the FormatMessage function
			strEx::replace(syntax, _T("%message%"), render_message(langId));
		} else {
			strEx::replace(syntax, _T("%message%"), _T("%message% needs the descriptions flag set!"));
		}

		strEx::replace(syntax, _T("%source%"), get_source());
		strEx::replace(syntax, _T("%computer%"), get_computer());
		strEx::replace(syntax, _T("%generated%"), strEx::format_date(get_time_generated(), date_format));
		strEx::replace(syntax, _T("%written%"), strEx::format_date(get_time_written(), date_format));
		strEx::replace(syntax, _T("%generated-raw%"), strEx::itos(pevlr_->TimeGenerated));
		strEx::replace(syntax, _T("%written-raw%"), strEx::itos(pevlr_->TimeWritten));
		strEx::replace(syntax, _T("%type%"), translateType(eventType()));
		strEx::replace(syntax, _T("%category%"), strEx::itos(pevlr_->EventCategory));
		strEx::replace(syntax, _T("%facility%"), strEx::itos(facility()));
		strEx::replace(syntax, _T("%qualifier%"), strEx::itos(facility()));
		strEx::replace(syntax, _T("%customer%"), strEx::itos(customer()));
		strEx::replace(syntax, _T("%rawid%"), strEx::itos(raw_id()));
		strEx::replace(syntax, _T("%severity%"), translateSeverity(severity()));
		strEx::replace(syntax, _T("%strings%"), enumStrings());
		strEx::replace(syntax, _T("%log%"), file_);
		strEx::replace(syntax, _T("%file%"), file_);
		strEx::replace(syntax, _T("%id%"), strEx::itos(eventID()));
		strEx::replace(syntax, _T("%user%"), userSID());
		return syntax;
	}
예제 #2
0
파일: group_pad.cpp 프로젝트: nadult/FreeFT
GroupPad::GroupPad(const IRect &rect, PGroupEditor editor, TileGroup *group)
    :Window(rect), m_editor(editor), m_group(group) {
    m_filter_box = make_shared<ComboBox>(IRect(0, 0, rect.width(), 22), 200,
                                         "Filter: ", enumStrings(TileFilter()));
    attach(m_filter_box);
    m_filter_box->selectEntry((int)editor->tileFilter());
}