Пример #1
0
        public LoginForm()
        {
            InitializeComponent();

            context        = ContextProvider.GetApplicationContext();
            loginValidator = new LoginModelValidator();
        }
Пример #2
0
        public RegisterForm()
        {
            InitializeComponent();

            mapper  = AutoMapperProvider.GetIMapper();
            context = ContextProvider.GetApplicationContext();
            registrationValidator = new RegistrationModelValidator();
        }
Пример #3
0
        public TimeResultForm(Guid testResultId)
        {
            mapper  = AutoMapperProvider.GetIMapper();
            context = ContextProvider.GetApplicationContext();

            InitializeComponent();

            SetFields(testResultId);
        }
Пример #4
0
        public QuestionsForm(Guid testId, int stepNumber)
        {
            InitializeComponent();

            context      = ContextProvider.GetApplicationContext();
            userProgress = UserProgressProvider.GetInstance();

            GetTestInfo(testId, stepNumber);
        }
Пример #5
0
        public ManageUsersForm(ManageUsersFormType formType)
        {
            InitializeComponent();
            context = ContextProvider.GetApplicationContext();

            this.formType = formType;

            ChangeFormType(formType);
        }
Пример #6
0
        public UserResultsForm(Guid userId)
        {
            InitializeComponent();

            mapper  = AutoMapperProvider.GetIMapper();
            context = ContextProvider.GetApplicationContext();

            FillUserResultsGrid(userId);
        }
Пример #7
0
        public AllTestForm()
        {
            InitializeComponent();

            mapper  = AutoMapperProvider.GetIMapper();
            context = ContextProvider.GetApplicationContext();

            SetItemsToTypeComboBox();
            SetItemsToTopicComboBox();
        }
Пример #8
0
        public ResultsForm()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;

            mapper  = AutoMapperProvider.GetIMapper();
            context = ContextProvider.GetApplicationContext();

            FillUserResultsGrid(string.Empty);
        }
Пример #9
0
        public NewTestForm()
        {
            InitializeComponent();
            StartPosition         = FormStartPosition.CenterScreen;
            mapper                = AutoMapperProvider.GetIMapper();
            context               = ContextProvider.GetApplicationContext();
            newTestModelValidator = new NewTestModelValidator();

            SetItemsToTypeComboBox();
            SetItemsToTopicComboBox();
        }
Пример #10
0
        public UserMainForm(ApplicationUser user)
        {
            InitializeComponent();

            context   = ContextProvider.GetApplicationContext();
            this.user = user;

            TestTopicsComboBox.Visible = false;
            TestNamesComboBox.Visible  = false;
            StartTestButton.Enabled    = false;
            SetItemsToTypeComboBox();
        }
Пример #11
0
        public QwestForm(Guid testId, int stepNumber, int numberOfSteps)
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;

            mapper      = AutoMapperProvider.GetIMapper();
            context     = ContextProvider.GetApplicationContext();
            this.testId = testId;

            this.Text = string.Format("Question #{0}/{1}", stepNumber, numberOfSteps);
            if (stepNumber == numberOfSteps)
            {
                ContinueButton.Text = "End";
            }

            quizModelValidator = new QuizModelValidator();
        }
Пример #12
0
        private void InitializeLanguages(EF.ApplicationContext db)
        {
            db.Languages.AddOrUpdate(new Language
            {
                Name          = "Русский",
                Code          = "ru",
                FlagImagePath = "ru.png",
            });

            db.Languages.AddOrUpdate(new Language
            {
                Name          = "English",
                Code          = "en",
                FlagImagePath = "en.png",
            });

            db.Languages.AddOrUpdate(new Language
            {
                Name          = "Deutsch",
                Code          = "de",
                FlagImagePath = "de.png",
            });

            db.Languages.AddOrUpdate(new Language
            {
                Name          = "French",
                Code          = "fr",
                FlagImagePath = "fr.png",
            });

            db.Languages.AddOrUpdate(new Language
            {
                Name          = "Español",
                Code          = "es",
                FlagImagePath = "es.png",
            });

            db.Languages.AddOrUpdate(new Language
            {
                Name          = "Italian",
                Code          = "it",
                FlagImagePath = "it.png",
            });

            db.SaveChanges();
        }
Пример #13
0
 public UserRepository(EF.ApplicationContext db)
 {
     Db = db;
 }
Пример #14
0
 public CollectionRepository(EF.ApplicationContext db)
 {
     Db = db;
 }