예제 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.SubjectActivity);

            Enum.TryParse <SubjectsEnumeration> (Intent.GetStringExtra("TestType"), out subjectType);

            subjectName = SubjectHelper.GetSubjectName(subjectType, this);
            SetSubjectNameTextView();
            LoadStatistics();
            (FindViewById <Button> (Resource.Id.TraningButton)).Click += TrainingButtonClick;
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.ChooseTrainingTasksLayout);

            Enum.TryParse <SubjectsEnumeration> (Intent.GetStringExtra("TestType"), out subjectType);
            themeNum          = Intent.GetIntExtra("ThemeNum", 1).ToString();
            subjectStringName = SubjectHelper.GetSubjectName(subjectType, this);
            theme             = (new ThemesRetriever(subjectType)).GetThemes.FirstOrDefault(x => x.Num == themeNum);

            taskButtonsLayout = FindViewById <LinearLayout> (Resource.Id.TasksLinearLayout);
            (FindViewById <TextView> (Resource.Id.ThemeName)).Text = theme.Name;
        }
예제 #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.ChooseTrainingLayout);

            Enum.TryParse <SubjectsEnumeration> (Intent.GetStringExtra("TestType"), out subjectType);
            subjectStringName = SubjectHelper.GetSubjectName(subjectType, this);

            FindViewById <TextView> (Resource.Id.SubjectNameTextView).Text = subjectStringName;

            themeButtonsLayout = FindViewById <LinearLayout> (Resource.Id.ThemesLinearLayout);
            subjectRetriever   = new SubjectRetriever(subjectType, this.ApplicationContext);
            LoadThemesButtons();
        }
예제 #4
0
        protected void SetParameters()
        {
            Enum.TryParse <SubjectsEnumeration> (Intent.GetStringExtra("TestType"), out subjectType);
            themeNum          = Intent.GetStringExtra("ThemeNum");
            currentTaskToShow = Intent.GetIntExtra("TaskNum", 0);
            subjectStringName = SubjectHelper.GetSubjectName(subjectType, this);
            subjectRetriever  = new SubjectRetriever(subjectType, ApplicationContext);
            theme             = subjectRetriever.GetThemeByNum(themeNum);
            tasks             = subjectRetriever.GetTasks(themeNum);

            taskImages = new Drawable[tasks.Count];

            isAnswered      = new List <bool> (tasks.Count);
            isRightAnswered = new List <bool> (tasks.Count);
            isShowAnswer    = new List <bool> (tasks.Count);
            for (int i = 0; i < tasks.Count; i++)
            {
                isAnswered.Add(false);
                isRightAnswered.Add(false);
                isShowAnswer.Add(false);
            }
        }