Beispiel #1
0
 public UsersModel()
 {
     // Users cannot be stored in the data dir path from the registry beacause we need to
     // use them before the user is connected to check wether or not the account exists
     DataFile = Functions.GetInitialXmlsPath() + "\\users.xml";
     if (!File.Exists(DataFile))
     {
         XML.Create <User>(DataFile, new List <User>());
     }
 }
Beispiel #2
0
 public CompetitionsModel()
 {
     DataFile = Functions.GetXmlFilePath("competitions");
     if (!File.Exists(DataFile))
     {
         try {
             XML.Create <Competition>(DataFile, new List <Competition>());
         } catch (Exception e) {
             Logs.Write(e.Message);
         }
     }
 }
 public ShootersModel()
 {
     DataFile = Functions.GetXmlFilePath("shooters");
     if (!File.Exists(DataFile))
     {
         try {
             XML.Create <Shooter>(DataFile, new List <Shooter>());
         } catch (Exception e) {
             Logs.Write(e.Message);
         }
     }
 }