예제 #1
0
        public async override Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            try
            {
                // Fill Genres and Kinds dictionaries
                GenresDictionary = await SoundCloudHelper.GetGenres();

                KindsDictionary = await SoundCloudHelper.GetKinds();

                foreach (var g in GenresDictionary)
                {
                    Genres.Add(g.Value);
                }
                foreach (var k in KindsDictionary)
                {
                    Kinds.Add(k.Value);
                }
                // Select first Genre and Kind
                SelectedGenre = Genres.FirstOrDefault();
                SelectedKind  = Kinds.FirstOrDefault();
                await base.OnNavigatedToAsync(parameter, mode, state);
            }
            catch (Exception ex)
            {
                Logger.LogError(this, ex.Message);
                ShowErrorMessage("There was an error during fetching tracks from SoundCloud.");
            }
        }
예제 #2
0
        public override bool DeSerialize(byte[] data, Pointer p)
        {
            base.DeSerialize(data, p);
            IsRefresh      = BitPacker.GetBool(data, p);
            IsServerPacket = BitPacker.GetBool(data, p);
            int num = BitPacker.GetInt(data, p);

            for (int i = 0; i < num; i++)
            {
                if (!IsRefresh)
                {
                    MatchNotificationType kind = (MatchNotificationType)BitPacker.GetInt(data, p);
                    Kinds.Add(kind);
                }

                Game theGame = BitPacker.GetComponent(data, p, IsServerPacket) as Game;

                TheGames.Add(theGame);
                bool hasTargetPlayer = BitPacker.GetBool(data, p);
                if (!IsRefresh && hasTargetPlayer)
                {
                    TargetPlayers.Add(BitPacker.GetComponent(data, p, false) as ICharacterInfo);
                }
            }
            return(true);
        }
 public ReflectedMemberOccurence(IReference reference, IDeclaredElement target, OccurenceType occurenceType, IProjectFile projectFile = null)
     : base(reference, target, occurenceType, projectFile)
 {
     Kinds.Clear();
     Kinds.Add(ReflectedMemberOccurenceKindProvider.ReflectionOccurenceKind);
 }