Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            oUsersRepository = new UsersRepository();
            oLanguagesRepository = new LanguagesRepository();
            oSettingsRepository = new SettingsRepository();
            oDictionaryRepository = new DictionaryRepository();
            oCourseRepository = new CourseRepository();
            oSessionRepository = new SessionRepository();

            oUsersRepository.Load();
            oLanguagesRepository.Load();
            oSettingsRepository.Load();
            oDictionaryRepository.Load();
            oCourseRepository.Load();
            oSessionRepository.Load();
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            oUsersRepository = new UsersRepository();
            oLanguagesRepository = new LanguagesRepository();
            oSettingsRepository = new SettingsRepository();
            oDictionaryRepository = new DictionaryRepository();
            oCourseRepository = new CourseRepository();
            oSessionRepository = new SessionRepository();

            oUsersRepository.Load();
            oLanguagesRepository.Load();
            oSettingsRepository.Load();
            oDictionaryRepository.Load();
            oCourseRepository.Load();
            oSessionRepository.Load();

            if (oLanguagesRepository.lLanguages.Count == 0)
            {
                Languages lang = new Languages(oLanguagesRepository.lLanguages, "English");
                oLanguagesRepository.lLanguages.Add(lang);
                lang = new Languages(oLanguagesRepository.lLanguages, "Français");
                oLanguagesRepository.lLanguages.Add(lang);
            }
        }