16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 15:09:19 +02:00

Wyłączenie okienek pop-up. W zamian zapis do logów.

Wyłączenie okienek pop-up. W zamian zapis do logów.
This commit is contained in:
firleju
2017-01-09 21:12:09 +01:00
parent be65869456
commit 6a7f636fdd
2 changed files with 41 additions and 40 deletions

View File

@@ -7,16 +7,16 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
#include "system.hpp"
#include "classes.hpp"
#include "system.hpp"
#pragma hdrstop
#include "Logs.h"
#include "Globals.h"
#include "Logs.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <iostream>
#include <stdio.h>
std::ofstream output; // standardowy "log.txt", mo¿na go wy³¹czyæ
std::ofstream errors; // lista b³êdów "errors.txt", zawsze dzia³a
@@ -91,22 +91,23 @@ void ErrorLog(const char *str)
void Error(const AnsiString &asMessage, bool box)
{
if (box)
MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
WriteLog(asMessage.c_str());
// if (box)
// MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
ErrorLog(asMessage.c_str());
}
void Error(const std::string &asMessage, bool box)
{
if (box)
MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
WriteLog(asMessage.c_str());
// if (box)
// MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
ErrorLog(asMessage.c_str());
}
void Error(const char* &asMessage, bool box)
void Error(const char *&asMessage, bool box)
{
if (box)
MessageBox(NULL, asMessage, string("EU07 " + Global::asRelease).c_str(), MB_OK);
// if (box)
// MessageBox(NULL, asMessage, string("EU07 " + Global::asRelease).c_str(), MB_OK);
ErrorLog(asMessage);
WriteLog(asMessage);
}

6
Logs.h
View File

@@ -16,9 +16,9 @@ void WriteConsoleOnly(const char *str, double value);
void WriteConsoleOnly(const char *str, bool newline = true);
void WriteLog(const char *str, double value);
void WriteLog(const char *str, bool newline = true);
void Error(const AnsiString &asMessage, bool box = true);
void Error(const std::string &asMessage, bool box = true);
void Error(const char* &asMessage, bool box = true);
void Error(const AnsiString &asMessage, bool box = false);
void Error(const std::string &asMessage, bool box = false);
void Error(const char* &asMessage, bool box = false);
void ErrorLog(const std::string &str, bool newline = true);
//void ErrorLog(const AnsiString &asMessage);
void WriteLog(const AnsiString &str, bool newline = true);