diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-05-03 23:12:56 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-05-03 23:12:56 +0000 |
| commit | 21cb50c82f18b3a2ee1e77a7de11413ce45e6587 (patch) | |
| tree | 33d1c600c9e26756580c92ea6b331041699510eb /pokemod/Author.cpp | |
| parent | 621d0f09fafba69aa650bc1555927f41e9c8e60e (diff) | |
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@7 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Author.cpp')
| -rw-r--r-- | pokemod/Author.cpp | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/pokemod/Author.cpp b/pokemod/Author.cpp index 20801e01..d01ae45e 100644 --- a/pokemod/Author.cpp +++ b/pokemod/Author.cpp @@ -46,47 +46,63 @@ PokeGen::PokeMod::Author::~Author() LogDtor("Author", id, name);
}
-#ifdef POKEMODR
-void PokeGen::PokeMod::Author::Validate(wxListBox &output)
-#else
void PokeGen::PokeMod::Author::Validate()
-#endif
{
isValid = true;
LogValidateStart("Author", id, name);
if (name == "")
{
LogVarNotSet("Author", "name", id);
-# ifdef POKEMODR
+ isValid = false;
+ }
+ if (email == "")
+ {
+ LogVarNotSet("Author", "email", id, name);
+ }
+ else if (!IsValidEmail())
+ {
+ LogVarNotValid("Author", "email", id, name);
+ isValid = false;
+ }
+ if (role == "")
+ {
+ LogValNotSet("Author", "role", id, name);
+ isValid = false;
+ }
+ LogValidateOver("Author", isValid, id, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::Author::Validate(wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("Author", id, name);
+ if (name == "")
+ {
+ LogVarNotSet("Author", "name", id);
output.Append(ConsoleLogVarNotSet("Author", "name", id)));
-# endif
isValid = false;
}
if (email == "")
{
LogVarNotSet("Author", "email", id, name);
-# ifdef POKEMODR
output.Append(ConsoleLogVarNotSetW("Author", "email", id)));
-# endif
}
else if (!IsValidEmail())
{
LogVarNotValid("Author", "email", id, name);
-# ifdef POKEMODR
output.Append(ConsoleLogVarNotValid("Author", "email", id, name));
-# endif
isValid = false;
}
if (role == "")
{
LogValNotSet("Author", "role", id, name);
-# ifdef POKEMODR
output.Append(ConsoleLogValNotSet("Author", "role", id, name)));
-# endif
isValid = false;
}
LogValidateOver("Author", isValid, id, name);
}
+#endif
void PokeGen::PokeMod::Author::ImportXml(XmlElement &xml, unsigned _id)
{
|
