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>()); } }
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); } } }