Exemplo n.º 1
0
        private void RetrieveSubjectTheme(string fileName)
        {
            themes = new List <SubjectTheme> ();
            AssetManager assets = MRApplication.GetAssetManager();

            using (StreamReader reader = new  StreamReader(assets.Open(fileName))) {
                string content = reader.ReadToEnd();

                var json = JsonObject.Parse(content);

                JsonArray themesJson = json ["Themes"] as JsonArray;
                foreach (JsonObject theme in themesJson)
                {
                    SubjectTheme newTheme = new SubjectTheme(theme ["Num"], theme ["Name"], theme ["InetLink"], theme ["LocalLink"]);
                    themes.Add(newTheme);
                }
            }
        }
Exemplo n.º 2
0
 public override void OnCreate()
 {
     base.OnCreate();
     singleton = this;
 }