Example #1
0
        public bool RetrievePreferences(ISharedPreferences spr)
        {
            var kvps = spr.GetAll();

            if (kvps.Size() > 0)
            {
                TableOf = (int)kvps.Get("TableOf");
                string strRandomQuestions = (string)kvps.Get("strRandomQuestions");
                if (strRandomQuestions == "true")
                {
                    RandomQuestions = true;
                }
                else
                {
                    RandomQuestions = false;
                }
                UpperLimit = (int)kvps.Get("UpperLimit");
                CounterMin = (int)kvps.Get("CounterMin");
                CounterMax = (int)kvps.Get("CounterMax");
            }
            else
            {
                StorePreferences(spr);
            }

            return(kvps.Size() > 0);
        }
Example #2
0
    public bool RetrievePreferences(ISharedPreferences spr)
    {
      var kvps = spr.GetAll();

      if (kvps.Size() > 0)
      {
        TableOf = (int)kvps.Get("TableOf");
        string strRandomQuestions = (string)kvps.Get("strRandomQuestions");
        if (strRandomQuestions == "true")
          RandomQuestions = true;
        else
          RandomQuestions = false;
        UpperLimit = (int)kvps.Get("UpperLimit");
        CounterMin = (int)kvps.Get("CounterMin");
        CounterMax = (int)kvps.Get("CounterMax");
      }
      else
      {
        StorePreferences(spr);
      }

      return kvps.Size() > 0;
    }