public void Draw() { switch (Status) { case CardStatus.NoCard: Pbx.Image = null; Activable = false; Selected = false; TtAyuda.SetToolTip(Pbx, ""); SetHelp(IconChar.None, ""); break; case CardStatus.FaceUp: Pbx.Image = Development.GetImage(); SetHelp(IconChar.None, ""); TtAyuda.SetToolTip(Pbx, Development.ToStringWithPrice()); break; case CardStatus.FaceDown: Pbx.Image = NamedPath.DevelopmentBack(Development.Level).GetImage(); TtAyuda.SetToolTip(Pbx, ""); SetHelp(IconChar.None, ""); break; default: break; } }
public static IAsyncEnumerable <Comic> FromRootPathAsync( UserProfile profile, NamedPath category, CancellationToken cc = default ) { if (!profile.RootPaths.Contains(category)) { throw new ProgrammerError(); } return(FromRootPathAsync(profile, category, cc)); }
private static async IAsyncEnumerable <Comic> FromCategoryAsync( UserProfile profile, NamedPath rootPath, [EnumeratorCancellation] CancellationToken cc = default ) { var folder = await StorageFolder.GetFolderFromPathAsync(rootPath.Path); foreach (var authorFolder in await folder.GetFoldersInNaturalOrderAsync()) { if (UserProfile.IsIgnoredFolder(authorFolder)) { continue; } await foreach (var comic in FromAuthorFolderAsync(profile, authorFolder, rootPath.Name, authorFolder.Name, cc)) { yield return(comic); } cc.ThrowIfCancellationRequested(); } }