// Constructor public MainPage() { InitializeComponent(); Loaded += (s, e) => { _flipTemplate = new FlipTileTemplate(); IOHelper io = new IOHelper(); string profile = io.Read("profile.json"); if (profile.Equals("")) { io.Write("profile.json", JsonConvert.SerializeObject(new Profile() { QuizContent = new QuizContent(), SolvedCount = 0, SolvedQuizes = new List <string>() })); profile = io.Read("profile.json"); } QuizHelper qh = new QuizHelper(); System.Diagnostics.Debug.WriteLine(qh.getProfileString()); _flipTemplate.SFlipTileTemplate(); }; //Shows the rate reminder message, according to the settings of the RateReminder. (App.Current as App).rateReminder.Notify(); }
public CatchTheGame() { InitializeComponent(); Loaded += (s, e) => { IOHelper io = new IOHelper(); string profile = io.Read("profile.json"); if (profile.Equals("")) { io.Write("profile.json", JsonConvert.SerializeObject(new Profile() { QuizContent = new QuizContent(), SolvedCount = 0, SolvedQuizes = new List <string>() })); profile = io.Read("profile.json"); } QuizHelper qh = new QuizHelper(); System.Diagnostics.Debug.WriteLine(qh.getProfileString()); }; }