public void CheckChoicesData() { if (choices == null) { appContentChoicesData = new AppContentChoicesData(); } }
public void LoadChoices(int total) { CheckChoices(); CheckChoicesData(); ListClear(listGridRoot); choices.Clear(); appContentChoicesData = new AppContentChoicesData(); List <AppContentChoice> choicesFilter = AppContentChoices.Instance.GetAll(); // Randomize choicesFilter.Shuffle(); int countChoices = choicesFilter.Count; LogUtil.Log("LoadChoices:countChoices:" + countChoices); // select total choices to try for (int i = 0; i < total; i++) { AppContentChoice choice = choicesFilter[i]; if (choice != null) { if (!choices.ContainsKey(choice.code)) { choices.Add(choice.code, choice); LogUtil.Log("LoadChoices:choice.code:" + choice.code); } } } LogUtil.Log("LoadChoices:choices.Count:" + choices.Count); }