コード例 #1
0
        private void BtnTest_Click(object sender, EventArgs e)
        {
            ISharedPreferencesEditor editor = prefs.Edit();

            editor.PutInt("npOldQuestions_Value", npOldQuestions.Value);
            editor.PutInt("npNewQuestions_Value", npNewQuestions.Value);
            editor.PutBoolean("checkInputAnswers_Value", checkInputAnswers.Checked);
            editor.Commit();

            List <long> checked_ids = Category_Get_Checked();

            DictionaryDBHelper dbHelper = new DictionaryDBHelper();

            dbHelper.UncheckCategories();
            dbHelper.CheckCategories(checked_ids);

            var    intent = new Intent(this, typeof(TestActivity));
            Bundle bundle = new Bundle();

            bundle.PutInt("oldQuestions", npOldQuestions.Value);
            bundle.PutInt("newQuestions", npNewQuestions.Value);
            bundle.PutLongArray("categories", checked_ids.ToArray());
            bundle.PutBoolean("show_testinput", checkInputAnswers.Checked);
            intent.PutExtra("testParams", bundle);
            StartActivityForResult(intent, ACTIVITY_TEST);
        }