Ejemplo n.º 1
0
 internal void LoadApplicationState()
 {
     string tryGetBG = StorageUtility.readObjectFromFile<string>(isf, "currentBackgroundKey.txt");
     currentBackgroundKey = tryGetBG ?? "Reflection";
     songs = StorageUtility.readSongArrayFromFile(isf);
     currentMood = StorageUtility.readObjectFromFile<Tag>(isf, "currentMood.txt");
     selectedTags = StorageUtility.readListFromFile<Tag>(isf, "selectedTags.txt");
     topTags = StorageUtility.readListFromFile<Tag>(isf, "topTags.txt");
     songsForTagDictionary = StorageUtility.readObjectFromFile<Dictionary<string, Song[]>>(isf, "songsForTagDictionary.txt");
     favoritesDict = StorageUtility.readObjectFromFile<Dictionary<string, Song>>(isf, "favoritesDict.txt");
 }
Ejemplo n.º 2
0
        private void loadFinishedWithArray(int METHOD, Tag[] tags)
        {
            unblockUI();

            switch (METHOD)
            {
                case Constants.METHOD_SELECTED_TAGS:
                    {
                        if (tags != null)
                        {
                            selectedTagsList.ItemsSource = itemCollections.selectedTags = new List<Tag>(tags);
                        }
                        else
                        {
                            restCommunication.getSelectedTags();
                        }
                    }
                    break;
                case Constants.METHOD_TOP_TAGS:
                    {
                        if (tags != null)
                        {
                            topTagsList.ItemsSource = itemCollections.topTags = new List<Tag>(tags);
                        }
                        else
                        {
                            restCommunication.getTopTags();
                        }
                    }
                    break;
            }

        }